Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/config/auto.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func (e *AutoModelFallbackError) Error() string {
}

var DefaultModels = map[string]string{
"openai": "gpt-5-mini",
"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".

"dmr": "ai/qwen3:latest",
"mistral": "mistral-small-latest",
"amazon-bedrock": "global.anthropic.claude-sonnet-4-5-20250929-v1:0",
Expand Down
10 changes: 5 additions & 5 deletions pkg/config/auto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestAutoModelConfig(t *testing.T) {
"OPENAI_API_KEY": "test-key",
},
expectedProvider: "openai",
expectedModel: "gpt-5-mini",
expectedModel: "gpt-5",
expectedMaxTokens: 32000,
},
{
Expand All @@ -186,7 +186,7 @@ func TestAutoModelConfig(t *testing.T) {
"GOOGLE_API_KEY": "test-key",
},
expectedProvider: "google",
expectedModel: "gemini-2.5-flash",
expectedModel: "gemini-3.5-flash",
expectedMaxTokens: 32000,
},
{
Expand Down Expand Up @@ -287,9 +287,9 @@ func TestDefaultModels(t *testing.T) {
}

// Test specific model values
assert.Equal(t, "gpt-5-mini", DefaultModels["openai"])
assert.Equal(t, "gpt-5", DefaultModels["openai"])
assert.Equal(t, "claude-sonnet-4-6", DefaultModels["anthropic"])
assert.Equal(t, "gemini-2.5-flash", DefaultModels["google"])
assert.Equal(t, "gemini-3.5-flash", DefaultModels["google"])
assert.Equal(t, "ai/qwen3:latest", DefaultModels["dmr"])
assert.Equal(t, "mistral-small-latest", DefaultModels["mistral"])
assert.Equal(t, "global.anthropic.claude-sonnet-4-5-20250929-v1:0", DefaultModels["amazon-bedrock"])
Expand Down Expand Up @@ -423,7 +423,7 @@ func TestAutoModelConfig_UserDefaultModel(t *testing.T) {
defaultModel: nil,
envVars: map[string]string{"GOOGLE_API_KEY": "test-key"},
expectedProvider: "google",
expectedModel: "gemini-2.5-flash",
expectedModel: "gemini-3.5-flash",
expectedMaxTokens: 32000,
},
{
Expand Down
13 changes: 11 additions & 2 deletions pkg/config/builtin-agents/default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
models:
smart:
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.

- mistral/mistral-small-latest
- dmr/ai/qwen3

agents:
root:
model: auto
model: smart
description: A helpful AI assistant
welcome_message: |
Hello! I'm your AI assistant. How can I help you today?
Expand All @@ -15,4 +24,4 @@ agents:
toolsets:
- type: filesystem
- type: shell
- type: fetch
- type: fetch
Loading