Skip to content

refactor(coder): use first_available model selection with multi-provider fallbacks#2996

Open
dgageot wants to merge 1 commit into
docker:mainfrom
dgageot:board/85d0e4d3f87f3577
Open

refactor(coder): use first_available model selection with multi-provider fallbacks#2996
dgageot wants to merge 1 commit into
docker:mainfrom
dgageot:board/85d0e4d3f87f3577

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Jun 3, 2026

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_available model selection feature to work seamlessly with any configured provider.

The coder agent's default and fast models now each list candidate provider/model combinations across Anthropic, OpenAI, and Google, with a fallback to the local dmr model. 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 fast model was renamed from haiku for consistency, and the librarian sub-agent reference was updated accordingly.

@dgageot dgageot requested a review from a team as a code owner June 3, 2026 17:03
Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

provider: anthropic
model: claude-haiku-4-5
first_available:
- anthropic/claude-opus-4-8
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@aheritier aheritier added area/agent For work that has to do with the general agent loop/agentic features of the app area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) kind/refactor PR refactors code without behavior change labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent For work that has to do with the general agent loop/agentic features of the app area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) kind/refactor PR refactors code without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants