Bug
When enable1mContext is true and the API returns a 400 with:
You're out of extra usage. Add more at claude.ai/settings/usage and keep going.
the retry logic in index.js:240-269 should drop the context-1m-2025-08-07 beta and retry at 200k context. Instead, the request fails outright because isLongContextError() doesn't match this error message.
Root Cause
isLongContextError in dist/betas.js only checks for two patterns:
export function isLongContextError(responseBody) {
return (
responseBody.includes("Extra usage is required for long context requests") ||
responseBody.includes("long context beta is not yet available")
);
}
The "You're out of extra usage" message — which occurs on Max subscriptions when 1M context requests hit extra usage billing limits — is not matched.
Suggested Fix
Add a third condition:
responseBody.includes("You're out of extra usage")
This allows the existing beta-exclusion retry loop to gracefully fall back to 200k context instead of failing.
Environment
opencode-claude-auth@1.4.7
- Claude Max subscription
enable1mContext: true, model claude-opus-4-6
Bug
When
enable1mContextistrueand the API returns a 400 with:the retry logic in
index.js:240-269should drop thecontext-1m-2025-08-07beta and retry at 200k context. Instead, the request fails outright becauseisLongContextError()doesn't match this error message.Root Cause
isLongContextErrorindist/betas.jsonly checks for two patterns:The
"You're out of extra usage"message — which occurs on Max subscriptions when 1M context requests hit extra usage billing limits — is not matched.Suggested Fix
Add a third condition:
This allows the existing beta-exclusion retry loop to gracefully fall back to 200k context instead of failing.
Environment
opencode-claude-auth@1.4.7enable1mContext: true, modelclaude-opus-4-6