You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
anthropic-beta header is hardcoded, preventing 1M context window #54
In adapter.py, the anthropic-beta header is hardcoded and added to blocked_overrides, which prevents clients from passing additional beta tags.
Current code (v0.2.7):
# Line ~91filtered_headers["anthropic-beta"] ="claude-code-20250219,oauth-2025-04-20"# Line ~96blocked_overrides= {"authorization", "x-api-key", "anthropic-beta"}
This means Claude Max Plan subscribers cannot enable the 1M context window, which requires the context-1m-2025-08-07 beta tag. Even if the client sends this tag, it gets silently dropped by the proxy.
Impact
All requests through ccproxy-api are limited to 200K context, even for users with Max Plan 5X subscriptions that support 1M context.
Suggested Fix
Replace the hardcoded beta header with a merge strategy that preserves required tags while allowing client-provided tags to pass through:
And remove "anthropic-beta" from blocked_overrides:
blocked_overrides= {"authorization", "x-api-key"}
This way, the proxy still enforces the required OAuth/Claude Code beta tags, but also forwards any additional beta tags from the client (such as context-1m-2025-08-07).
Workaround
Currently we manually patch adapter.py after every upgrade, which works but is not ideal.
Fixed in #56. The adapter now merges client-provided and CLI-detected anthropic-beta tags with the required OAuth tags (claude-code-20250219, oauth-2025-04-20), so Max Plan subscribers can enable context-1m-2025-08-07 for 1M context. Tags detected by the Claude CLI detection service (interleaved-thinking, context-management, prompt-caching-scope, etc.) also flow through automatically.
Activity
fix: merge client anthropic-beta tags with required OAuth tags (#54)
CaddyGlow commentedon Apr 13, 2026
Fixed in #56. The adapter now merges client-provided and CLI-detected
anthropic-betatags with the required OAuth tags (claude-code-20250219,oauth-2025-04-20), so Max Plan subscribers can enablecontext-1m-2025-08-07for 1M context. Tags detected by the Claude CLI detection service (interleaved-thinking, context-management, prompt-caching-scope, etc.) also flow through automatically.fix: merge client anthropic-beta tags with required OAuth tags (#54) (#…