refactor(coder): use first_available model selection with multi-provider fallbacks#2996
refactor(coder): use first_available model selection with multi-provider fallbacks#2996dgageot wants to merge 1 commit into
Conversation
| provider: anthropic | ||
| model: claude-haiku-4-5 | ||
| first_available: | ||
| - anthropic/claude-opus-4-8 |
There was a problem hiding this comment.
[MEDIUM] Speculative model IDs in default first_available list may cause runtime API failures
The new default model candidates include anthropic/claude-opus-4-8, openai/gpt-5.5, and google/gemini-3.5-flash. None of these are known public model identifiers. The first_available selector picks the first candidate whose credentials are configured — not whether the model ID is valid — so a user with Anthropic credentials will always resolve to anthropic/claude-opus-4-8, and the subsequent API call will fail if Anthropic's API does not recognize that model ID.
The old config used claude-opus-4-6 (also non-public), so this project likely uses pre-release/internal model names. If these are intentional internal identifiers, this is expected. If they are typos or speculative future names, users with cloud credentials will get runtime failures instead of a working fallback — the local dmr/ai/qwen3 fallback is only reached when no cloud credentials are configured at all.
Consider verifying these model IDs against the provider's current API catalog (e.g., Anthropic's model list, OpenAI's /v1/models, Google's Gemini API).
| fast: | ||
| first_available: | ||
| - anthropic/claude-haiku-4-5 | ||
| - openai/gpt-5.4-mini |
There was a problem hiding this comment.
[MEDIUM] Unrecognized model IDs in fast first_available list may cause runtime API failures
openai/gpt-5.4-mini and google/gemini-3.1-flash-lite are not recognized public model identifiers. The current OpenAI fast/mini model is typically gpt-4o-mini; gpt-5.4-mini is not a known offering. Similarly gemini-3.1-flash-lite does not match any known Gemini model name.
As with the default list, the first_available runtime resolves on credential availability, not model validity. A user with OpenAI credentials will select openai/gpt-5.4-mini and receive an API error at inference time if the model ID is wrong.
anthropic/claude-haiku-4-5 (unchanged from the old config) follows the same versioning pattern, so this may be an intentional pre-release naming scheme — but worth confirming that all three provider IDs are correct before shipping.
The builtin coder agent previously hardcoded Anthropic models, which meant users without Anthropic credentials had to manually configure alternative providers. This change leverages the new
first_availablemodel selection feature to work seamlessly with any configured provider.The coder agent's
defaultandfastmodels now each list candidate provider/model combinations across Anthropic, OpenAI, and Google, with a fallback to the localdmrmodel. The agent automatically selects the first available option based on the user's configured credentials, eliminating the need for manual configuration in most cases.The
fastmodel was renamed fromhaikufor consistency, and the librarian sub-agent reference was updated accordingly.