Skip to content

fix(anthropic): add oauth beta-header handling for Claude OAuth tokens#58

Merged
drpedapati merged 1 commit intomainfrom
chore/anthropic-oauth-beta-header-clean-20260222-150744
Feb 22, 2026
Merged

fix(anthropic): add oauth beta-header handling for Claude OAuth tokens#58
drpedapati merged 1 commit intomainfrom
chore/anthropic-oauth-beta-header-clean-20260222-150744

Conversation

@drpedapati
Copy link
Owner

Summary

  • detect Anthropic OAuth tokens by prefix
  • add required anthropic-beta: oauth-2025-04-20 header for OAuth-backed Claude calls
  • improve error hints for expired/invalid OAuth tokens
  • add provider tests for OAuth header behavior and error wrapping

Verification

  • go test ./pkg/providers -run 'TestClaudeProvider|TestIsAnthropicOAuthToken|TestWrapClaudeAPIError' -count=1

@cloudflare-workers-and-pages
Copy link

Deploying sciclaw with  Cloudflare Pages  Cloudflare Pages

Latest commit: f24242a
Status: ✅  Deploy successful!
Preview URL: https://5ec8f0a7.sciclaw.pages.dev
Branch Preview URL: https://chore-anthropic-oauth-beta-h-yktc.sciclaw.pages.dev

View logs

@drpedapati drpedapati merged commit 6c6d0d1 into main Feb 22, 2026
1 of 2 checks passed
@drpedapati drpedapati deleted the chore/anthropic-oauth-beta-header-clean-20260222-150744 branch February 22, 2026 20:08
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.

1 participant