fix: clarify Claude Code credential auth error#20283
Open
Joeyzzyy wants to merge 1 commit intoanomalyco:devfrom
Open
fix: clarify Claude Code credential auth error#20283Joeyzzyy wants to merge 1 commit intoanomalyco:devfrom
Joeyzzyy wants to merge 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
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. |
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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