fix: clarify Claude Code credential auth error#20283
fix: clarify Claude Code credential auth error#20283Joeyzzyy wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
I checked the failing e2e jobs and they are both failing in packages/app e2e review flows (), which looks unrelated to this provider error messaging change. The provider-focused test and typecheck pass locally. I have re-run the failed jobs to check whether this is a flaky CI failure. |
|
I checked the failing e2e jobs and they are both failing in packages/app e2e review flows (session-review.spec.ts), which looks unrelated to this provider error messaging change. The provider-focused test and typecheck pass locally. I have re-run the failed jobs to check whether this is a flaky CI failure. |
|
I re-checked this against current upstream/dev. This change is still not present on mainline, so this PR is not obsolete or duplicated by recent upstream changes.\n\nThe remaining failures are still only the cross-platform e2e jobs; the provider-specific change here is narrow and the focused provider test plus typecheck are green. Re-running the failed workflow once more to see whether those e2e failures clear independently of this PR. |
|
Closing this to focus review on the smaller prompt-history search change in #21253. |
Issue for this PR
Closes #7456
Type of change
What does this PR do?
When OpenCode receives Anthropic auth errors for Claude Code-only credentials, the existing error text does not clearly tell the user what to do next.
This change detects that specific credential error and replaces it with clearer guidance that says the credential is restricted to Claude Code, cannot be used with OpenCode, and that the user should use a standard Anthropic API key and run
opencode auth login anthropic.The change is intentionally narrow and only affects provider error messaging for this specific Anthropic auth case.
How did you verify your code works?
bun test test/provider/error.test.tsbun typecheckScreenshots / recordings
Not a UI change.
Checklist