Skip to content

Cap context to 200k and strip context-1m beta header for OAuth users#44

Open
okhsunrog wants to merge 1 commit intoanomalyco:masterfrom
okhsunrog:feat/oauth-context-cap
Open

Cap context to 200k and strip context-1m beta header for OAuth users#44
okhsunrog wants to merge 1 commit intoanomalyco:masterfrom
okhsunrog:feat/oauth-context-cap

Conversation

@okhsunrog
Copy link

Summary

  • Cap model.limit.context to 200k for OAuth users in the auth loader, since the context-1m-2025-08-07 beta header is not available for OAuth/subscription users
  • Strip context-1m-* beta headers from outgoing requests for OAuth users to avoid API errors ("long context beta is not available for this subscription")

This affects Opus 4.6, Sonnet 4.5, and Sonnet 4 — the three models that support 1M context via the beta header. API key users are unaffected since the OAuth branch (auth.type === "oauth") is the only code path modified.

Related: anomalyco/opencode#12342

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