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
Builtin anthropic provider rejects valid model IDs (e.g. claude-opus-4-6) #21019
When using the builtin anthropic provider with -m anthropic/claude-opus-4-6, opencode returns:
Model not found: claude-opus-4-6/
The builtin anthropic provider appears to maintain a hardcoded list of known models. When a newer Anthropic model (like claude-opus-4-6) is released, opencode rejects it until the model list is updated in a new release.
Expected Behavior
The builtin anthropic provider should accept arbitrary model IDs and forward them to the Anthropic API as-is. The API itself will validate whether the model exists — there's no need for client-side model validation that goes stale.
Steps to Reproduce
opencode run "hello" -m anthropic/claude-opus-4-6 --format json
Returns: Model not found: claude-opus-4-6/
Environment
opencode version: 1.3.7 (also reproduced on 1.3.13)
OS: macOS (Darwin 25.3.0)
Node: v22.17.0
Installed via: npm install -g opencode-ai
Suggested Fix
For builtin providers, allow pass-through of unknown model IDs to the upstream API rather than rejecting them client-side. This would make opencode forward-compatible with new model releases without requiring a version bump.
Alternatively, if client-side validation is desired, provide a config option or flag to bypass it (e.g. --allow-unknown-model).
Workaround
We currently work around this by generating a runtime config file (opencode.json) with an explicit models map that registers the model, and passing it via OPENCODE_CONFIG env var. This bypasses the builtin provider's model validation.
If your issue is specifically about the builtin Anthropic provider rejecting valid model IDs, it may be worth linking to or commenting on those issues rather than filing separately.
Activity
github-actions commentedon Apr 4, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is specifically about the builtin Anthropic provider rejecting valid model IDs, it may be worth linking to or commenting on those issues rather than filing separately.
fix: opencode builtin providers (anthropic/google) now get runtime co…
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
fix(ci): inject trusted anthropic-auth plugin for pr-review
fix(ci): give codex_web_search its own OpenAI credential
fix(opencode): track .opencode plugin dependency manifest (#48)