Skip to content

feat: update default agent to use first_available model selection#2997

Open
dgageot wants to merge 2 commits into
docker:mainfrom
dgageot:board/1c512c4c63a78532
Open

feat: update default agent to use first_available model selection#2997
dgageot wants to merge 2 commits into
docker:mainfrom
dgageot:board/1c512c4c63a78532

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Jun 3, 2026

The default agent now uses the new first_available model selection mechanism introduced in the previous commit. Instead of relying on environment detection at startup, the agent tries a prioritized list of models in order: Claude Sonnet 4.6, GPT-5, Gemini 3.5 Flash, Mistral Small, and Qwen3 (local fallback).

This change also bumps the default model versions for cloud providers. OpenAI moves from gpt-5-mini to gpt-5, and Google moves from gemini-2.5-flash to gemini-3.5-flash. The test expectations are updated to reflect these newer versions.

No breaking changes; the agent continues to work seamlessly across different environments without requiring users to reconfigure anything.

@dgageot dgageot requested a review from a team as a code owner June 3, 2026 17:06
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

Comment thread pkg/config/auto.go
"openai": "gpt-5",
"anthropic": "claude-sonnet-4-6",
"google": "gemini-2.5-flash",
"google": "gemini-3.5-flash",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[LIKELY HIGH] Potentially non-existent Google model name gemini-3.5-flash

The DefaultModels map was updated from "gemini-2.5-flash" to "gemini-3.5-flash", and the same name appears in default.yaml (google/gemini-3.5-flash).

Google's Gemini versioning has followed the series 1.0, 1.5, 2.0, 2.5 — a jump to 3.5 is a significant version skip. As of 2026-06-03, gemini-3.5-flash does not appear in Google's Gemini API catalog, while gemini-2.5-flash is a confirmed, released model.

Impact: Any user whose sole configured key is GOOGLE_API_KEY (or GOOGLE_GENAI_API_KEY) will receive an API error ("unknown model" or similar) when the first_available resolver or DefaultModels auto-detection selects the Google provider. The two affected code paths are:

  1. default.yaml line 6: - google/gemini-3.5-flash (new first_available path)
  2. auto.go line 58: "google": "gemini-3.5-flash" (legacy DefaultModels path)

If the intent is to bump to a newly available model, please verify the exact model identifier in the Google Generative AI model docs before merging. If it should remain the previous version, revert to "gemini-2.5-flash".

first_available:
- anthropic/claude-sonnet-4-6
- openai/gpt-5
- google/gemini-3.5-flash
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[LIKELY HIGH] Potentially non-existent Google model name gemini-3.5-flash

Same issue as flagged in auto.go — this YAML entry uses the same model name google/gemini-3.5-flash. If gemini-3.5-flash is not a valid Google API model identifier, users with only Google credentials configured will fall through to dmr/ai/qwen3 (local fallback) unexpectedly, or fail with an API error if google is the resolved provider.

@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/feat PR adds a new feature (maps to feat: commit prefix) 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/feat PR adds a new feature (maps to feat: commit prefix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants