Skip to content

Conversation

@palashgo
Copy link

@palashgo palashgo commented Jan 31, 2026

I deleted tests that enforced env key selection rules since you don't need to choose between using AI Gateway and direct API key (you can have both)

mgpai22 added a commit to mgpai22/moltworker that referenced this pull request Jan 31, 2026
… pro/max subscription

- Pass ANTHROPIC_API_KEY and ANTHROPIC_OAUTH_TOKEN directly instead of
  letting AI Gateway override them, enabling authenticated gateway use
  alongside a direct provider key
- When both AI_GATEWAY_API_KEY and a direct key are set, pass the gateway
  key via cf-aig-authorization header instead of replacing the provider key
- Add ANTHROPIC_OAUTH_TOKEN support for Claude Code subscription token auth
- Update env validation to accept ANTHROPIC_OAUTH_TOKEN as alternative
- Remove precedence tests that enforced mutually exclusive key selection

Based on cloudflare#81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support for AI Gateway Authenticated Gateway (cf-aig-authorization header)

1 participant