feat(anthropic): full OAuth token support for Anthropic provider#620
Open
codevjs wants to merge 5 commits intoValueCell-ai:mainfrom
Open
feat(anthropic): full OAuth token support for Anthropic provider#620codevjs wants to merge 5 commits intoValueCell-ai:mainfrom
codevjs wants to merge 5 commits intoValueCell-ai:mainfrom
Conversation
- Add anthropic.png logo to model-providers assets - Register AnthropicPng in assets/png/index.ts - Add anthropic entry to MODEL_PROVIDER_ICONS - Add conditional form in model-detail.tsx: - Anthropic: shows OAuth Token field (ANTHROPIC_AUTH_TOKEN) - Other providers: shows standard API key field - Hide API Host field for Anthropic provider
- ai-model-form.tsx: conditionally hide API key input when provider=anthropic - Show info box explaining OAuth token is used from server environment - Prevents user confusion when adding trading strategy with Anthropic
Backend: - ProviderUpdateRequest: add auth_token field - update_provider_config: save auth_token via auth_token_env - check_model: Anthropic uses direct SDK call with OAuth headers Frontend: - api/setting.ts: pass auth_token in updateConfig mutation
- Add AnthropicProvider to factory with OAuth token + Claude Code headers - Fix validate_provider() to accept auth_token as alternative to api_key - Add Save button to Anthropic OAuth field in settings UI (replace onBlur) - Add auth_token_set field to provider detail API so UI can show saved status - Fix check availability: treat 429 rate_limit as success (token is valid) - Fix token persistence: empty string no longer clears saved auth token - Add Docker Compose setup with volume mount for user config persistence - Add CLAUDE.md project documentation Co-Authored-By: Claude Sonnet 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.
Summary
factory.pywith OAuth token support and Claude Code headers (anthropic-beta: oauth-2025-04-20)auth_token_envas alternative toapi_key— Anthropic OAuth users no longer get "API key not found" error when using OAuth token instead of API keyonBlurauto-save with explicit Save button; addauth_token_setindicator ("✓ Token already saved") so user knows token is persisted after page refreshauth_tokenon page reloaddocker-compose.yml,Dockerfile.frontend, nginx config, and named volume for user config persistence across container restartsTest plan
sk-ant-oat01-...token, click Save → green "✓ Token already saved" appearsok: true / reachabledocker compose up -d --build→ container starts, token loaded from volume on restart🤖 Generated with Claude Code