fix ai clarify opencode headless credentials#765
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a34d4baabd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `For MiniMax/GLM presets, configure credentials with ${MODEL_ONBOARDING_PROVIDER_PRESET_COMMAND} (or ${MODEL_ONBOARDING_SETUP_COMMAND} --preset <preset>).`, | ||
| `For custom API-compatible providers, use ${MODEL_ONBOARDING_API_PROVIDER_COMMAND}.`, | ||
| `For OAuth/subscription providers, use ${MODEL_ONBOARDING_OAUTH_COMMAND}.`, | ||
| `For OAuth/subscription providers, use ${MODEL_ONBOARDING_OAUTH_COMMAND} (interactive; not available in headless/print mode).`, |
There was a problem hiding this comment.
Add a coding-agent changelog entry
This changes packages/coding-agent user-facing no-credential onboarding text, but the only changelog update is in packages/ai/CHANGELOG.md; the root AGENTS.md contract says package changelogs under packages/*/CHANGELOG.md need Unreleased entries. Without a packages/coding-agent/CHANGELOG.md entry, the coding-agent release notes omit this behavior change.
Useful? React with 👍 / 👎.
|
Fixed the failing affected-path shard by giving the slow SDK no-model fallback test a 30s timeout. CI showed the test passed its assertions but exceeded Bun's default 5s timeout on Commit pushed: Verification:
CI expectation: affected-path validation should pass on the pushed branch; the previously failing test now has headroom for the observed ~26.5s CI runtime. — |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1321bd5e9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| describe("streamSimple missing credentials", () => { | ||
| it("throws OpenCode Go headless guidance on the actual no-key path (#755)", () => { | ||
| delete Bun.env.OPENCODE_API_KEY; |
There was a problem hiding this comment.
Isolate OpenCode credentials in the no-key test
When OPENCODE_API_KEY is exported or present in a user/GJC env file, $credentialEnv has already captured that value while importing @gajae-code/ai/stream, so delete Bun.env.OPENCODE_API_KEY here does not make getEnvApiKey("opencode-go") return undefined. In that environment streamSimple does not throw the missing-key guidance (and may start a real provider request), making this new regression test fail for contributors/CI with OpenCode credentials; run the assertion in an isolated process/env before importing stream or otherwise suppress the credential snapshots.
Useful? React with 👍 / 👎.
|
MERGE_READY Reviewed exact diff against origin/dev at head 1321bd5: scoped to OpenCode credential guidance/error text, focused regression coverage, changelog, and the timeout-only test harness fix. GitHub PR checks are green, including affected-path validation and gjc-state-gates. Blocker risk is low: production behavior only improves missing-credential diagnostics; the timeout change does not mask assertions and matches observed CI runtime. Safe to squash-merge to dev. — |
Summary
Tests
Fixes #755