mirror of https://github.com/garrytan/gstack.git
fix: codex auth error message — use codex login, not OPENAI_API_KEY
Codex authenticates via ChatGPT OAuth (codex login), not an env var.
This commit is contained in:
parent
c9cead34e2
commit
0b009d2e84
|
|
@ -424,8 +424,8 @@ If token count is not available, display: `Tokens: unknown`
|
|||
## Error Handling
|
||||
|
||||
- **Binary not found:** Detected in Step 0. Stop with install instructions.
|
||||
- **API key missing:** Codex prints an auth error to stderr. Surface the error:
|
||||
"Codex authentication failed. Set OPENAI_API_KEY in your environment."
|
||||
- **Auth error:** Codex prints an auth error to stderr. Surface the error:
|
||||
"Codex authentication failed. Run `codex login` in your terminal to authenticate via ChatGPT."
|
||||
- **Timeout:** If the Bash call times out (5 min), tell the user:
|
||||
"Codex timed out after 5 minutes. The diff may be too large or the API may be slow. Try again or use a smaller scope."
|
||||
- **Empty response:** If `$TMPRESP` is empty or doesn't exist, tell the user:
|
||||
|
|
|
|||
|
|
@ -278,8 +278,8 @@ If token count is not available, display: `Tokens: unknown`
|
|||
## Error Handling
|
||||
|
||||
- **Binary not found:** Detected in Step 0. Stop with install instructions.
|
||||
- **API key missing:** Codex prints an auth error to stderr. Surface the error:
|
||||
"Codex authentication failed. Set OPENAI_API_KEY in your environment."
|
||||
- **Auth error:** Codex prints an auth error to stderr. Surface the error:
|
||||
"Codex authentication failed. Run `codex login` in your terminal to authenticate via ChatGPT."
|
||||
- **Timeout:** If the Bash call times out (5 min), tell the user:
|
||||
"Codex timed out after 5 minutes. The diff may be too large or the API may be slow. Try again or use a smaller scope."
|
||||
- **Empty response:** If `$TMPRESP` is empty or doesn't exist, tell the user:
|
||||
|
|
|
|||
|
|
@ -1176,10 +1176,10 @@ describe('Codex skill', () => {
|
|||
expect(content).not.toContain('/opt/homebrew/bin/codex');
|
||||
});
|
||||
|
||||
test('codex/SKILL.md contains error handling for missing binary and API key', () => {
|
||||
test('codex/SKILL.md contains error handling for missing binary and auth', () => {
|
||||
const content = fs.readFileSync(path.join(ROOT, 'codex', 'SKILL.md'), 'utf-8');
|
||||
expect(content).toContain('NOT_FOUND');
|
||||
expect(content).toContain('OPENAI_API_KEY');
|
||||
expect(content).toContain('codex login');
|
||||
});
|
||||
|
||||
test('codex/SKILL.md uses mktemp for temp files', () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue