-
Your Name authored
Claude Code doesn't use the OAuth2 access token directly for API requests. Instead, it exchanges the OAuth2 token for an API key via: POST https://api.anthropic.com/api/oauth/claude_cli/create_api_key Authorization: Bearer {oauth_access_token} This returns a 'raw_key' which is the actual API key used for API requests. Changes: - claude_auth.py: Add create_api_key() and get_api_key() methods - create_api_key(): Exchanges OAuth2 token for API key - get_api_key(): Gets stored API key or creates one if needed - providers.py: Update _get_sdk_client() to use API key instead of OAuth2 token This matches the Claude Code flow in vendors/claude/src/services/oauth/client.ts
9bb2c090