feat(auth): standardize provider credentials with api_key and oauth_token#261
Merged
feat(auth): standardize provider credentials with api_key and oauth_token#261
Conversation
Switch built-in Anthropic provider from ANTHROPIC_API_KEY to CLAUDE_CODE_OAUTH_TOKEN for OAuth-based auth. Clears ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN when OAuth token is set to prevent conflicts. - Rename settings field from auth_token to oauth_token for Anthropic - Update CLI --oauth-token flag (--auth-token still accepted) - Update README docs and settings example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…y support Standardize credential field names across providers: rename OpenAI's auth_token to api_key, and add api_key support for Anthropic alongside existing oauth_token. When no credentials are configured, the process inherits environment variables directly (useful for Docker deployments). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Description
Standardize credential field naming across providers and add flexible auth options. Rename
auth_tokentoapi_keyfor both providers, add Anthropicapi_keysupport alongside existingoauth_token, and useCLAUDE_CODE_OAUTH_TOKENfor OAuth-based Anthropic auth. When no credentials are configured in settings, processes inherit environment variables directly, enabling Docker deployments with container-level env vars.Changes
auth_tokentoapi_keyin Settings type and all references (CLI, invoke, README)oauth_tokenfield for Anthropic, exported asCLAUDE_CODE_OAUTH_TOKEN(clearsANTHROPIC_API_KEYandANTHROPIC_AUTH_TOKEN)api_keyfield for Anthropic, exported asANTHROPIC_API_KEY(oauth_token takes priority if both set)--oauth-tokenand--api-key(replacing--auth-token)Testing
Checklist
type(scope): description)