#10346: Add Anthropic to implicit model catalog (Opus 4.6 allowlist)
agents
stale
Cluster:
Model Configuration Enhancements
## Context
Users with Anthropic API keys see `/models anthropic` list Opus 4.6, but `/model anthropic/claude-opus-4-6` fails with "model not allowed" unless they manually configure providers. This happens because Anthropic is not included in `resolveImplicitProviders`, so the implicit model catalog does not include Anthropic models by default.
## Changes
- Add an implicit Anthropic provider when an Anthropic auth profile or env key exists.
- Seed a minimal Anthropic model list (Opus 4.6, Opus 4.5, Sonnet 4.5) so the catalog/allowlist works out of the box.
## Why this fixes the bug
The allowlist uses the model catalog. By adding Anthropic to implicit providers, the catalog includes `claude-opus-4-6`, so `/model` selections are allowed without requiring manual provider configuration.
## Notes
Costs are set to zero (same pattern as other providers without published pricing).
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
- Adds an implicit Anthropic provider to the runtime model/provider catalog when Anthropic credentials are detected.
- Seeds a minimal Anthropic model list (Opus 4.6 / 4.5, Sonnet 4.5) with default context/max tokens and zeroed costs.
- Integrates the implicit provider into the same implicit-provider resolution flow used for other providers (e.g., MiniMax/Moonshot).
<h3>Confidence Score: 2/5</h3>
- This PR is not safe to merge as-is due to a credential wiring bug that will break Anthropic authentication for implicit providers.
- The new implicit Anthropic provider populates `apiKey` from the environment *variable name* rather than the secret value, which will lead to runtime auth failures whenever Anthropic is enabled via env vars (a primary intended path for this PR).
- src/agents/models-config.providers.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#7821: feat: Support ANTHROPIC_BASE_URL environment variable for custom en...
by y1y2u3u4 · 2026-02-03
75.9%
#14508: fix(models): allow forward-compat models in allowlist check
by jonisjongithub · 2026-02-12
75.7%
#9163: Fix: Save Anthropic setup token to config file
by vishaltandale00 · 2026-02-04
75.0%
#11938: feat: support ANTHROPIC_AUTH_TOKEN environment variable
by EricMymj · 2026-02-08
74.7%
#13188: fix: add cross-provider fallback when primary provider is rate-limited
by 1bcMax · 2026-02-10
74.5%
#13976: fix(anthropic): include Anthropic in tool call ID sanitization
by omair445 · 2026-02-11
74.4%
#13650: feat(agents): support env var overrides for default provider and model
by xrehpicx · 2026-02-10
74.1%
#10831: fix(agents): set Opus 4.6 context window to 1M in forward-compat fa...
by slawt · 2026-02-07
73.9%
#13119: fix: add forward-compat for google-antigravity claude-opus-4-6 models
by sdb001 · 2026-02-10
73.1%
#7570: fix: allow models from providers with auth profiles configured
by DonSqualo · 2026-02-03
72.9%