• Your Name's avatar
    fix: Use SDK auth_token parameter with OAuth2 token (not API key) · 252d45e4
    Your Name authored
    Your theory was correct! Claude Code uses the Anthropic SDK with the
    authToken parameter (not apiKey) for OAuth2 authentication.
    
    From vendors/claude/src/services/api/client.ts lines 300-315:
        const clientConfig = {
          apiKey: isClaudeAISubscriber() ? null : apiKey || getAnthropicApiKey(),
          authToken: isClaudeAISubscriber()
            ? getClaudeAIOAuthTokens()?.accessToken
            : undefined,
        }
        return new Anthropic(clientConfig)
    
    Changes:
    - providers.py: Use auth_token=access_token (not api_key) for SDK client
    - claude_auth.py: Remove create_api_key() and get_api_key() methods
      (not needed - OAuth2 token is used directly with SDK auth_token)
    
    The create_api_key endpoint is only for creating API keys for use in
    other contexts (CI/CD, IDEs), not for the main CLI.
    252d45e4
Name
Last commit
Last update
aisbf Loading commit data...
config Loading commit data...
docs Loading commit data...
static Loading commit data...
templates Loading commit data...
.gitignore Loading commit data...
.providers.json.swp Loading commit data...
=0.5.0 Loading commit data...
AI.PROMPT Loading commit data...
API_EXAMPLES.md Loading commit data...
CHANGELOG.md Loading commit data...
CLAUDE_OAUTH2_DEEP_DIVE.md Loading commit data...
CLAUDE_OAUTH2_SETUP.md Loading commit data...
DEBUG_GUIDE.md Loading commit data...
DOCUMENTATION.md Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
PYPI.md Loading commit data...
README.md Loading commit data...
TODO.md Loading commit data...
aisbf.sh Loading commit data...
build.sh Loading commit data...
clean.sh Loading commit data...
cli.py Loading commit data...
main.py Loading commit data...
pyproject.toml Loading commit data...
requirements.txt Loading commit data...
screenshot.png Loading commit data...
setup.py Loading commit data...
start_proxy.sh Loading commit data...
test_google.sh Loading commit data...
test_kiro_models_origin.py Loading commit data...
test_proxy.sh Loading commit data...
test_response_cache.py Loading commit data...