Repository navigation
fix(providers): replace retired gemini-2.0-flash default with gemini-3.6-flash - #1697
pcbeingused33 wants to merge 1 commit into
Conversation
…3.6-flash gemini-2.0-flash was shut down on 2026-06-01, so the native Gemini provider registered without an explicit model returned 404s. Introduce providers.GeminiDefaultModel and use it for registration.
clark-cant
left a comment
There was a problem hiding this comment.
Summary: Replaces the native Gemini provider's default model — gemini-2.0-flash, which Google retired on 2026-06-01 — with gemini-3.6-flash, introduced as a new providers.GeminiDefaultModel constant, and updates docs/02-providers.md.
Risk level: Low — 4 files, +33/−2, one commit; the only behaviour change is the model ID used when an agent does not pin a Gemini model.
Mandatory gates:
- Duplicate / prior implementation: clear — no merged or open PR/issue changes the native Gemini default. Searched
gemini default modelacross PRs/issues; the only related item, issue 1642, is about Gemini TTS defaults, not the native provider. - Project standards: docs found —
CONTRIBUTING.md:15requires PRs to targetdev; this PR targetsdev. ✓ - Strategic necessity: clear value — the current default returns a 404 from the Gemini API for every agent that does not pin a model.
Findings:
- Suggestion (scope note, author-flagged):
VertexDefaultModel(internal/providers/vertex.go:21) still points atgoogle/gemini-2.0-flash-001, the Vertex sibling of the retired model. The PR deliberately leaves it (Vertex has its own retirement schedule), which is defensible for a pinned-001version, but worth a follow-up so Vertex users without a pinned model do not hit the same 404. - Suggestion: the new
TestGeminiDefaultModelpartially overlaps the existingopenai_gemini_thinking_test.gothinking→reasoning_effort coverage; fine here as a default-model regression guard.
Verification (against dev 5849a984): cmd/gateway_providers.go:98 is the only hardcoded native Gemini default; resolveModel (internal/providers/openai_config.go:211) falls back to the provider default; the Gemini route maps thinking_level→reasoning_effort (internal/providers/openai_request.go:307, isGeminiRoute). CI release-versioning / go / web all green at head aa7e70f7; MERGEABLE / CLEAN.
Verdict: Approve — no critical or important issues. Merge-ready pending a maintainer approval (the specific replacement model ID is a maintainer call, as the PR itself notes).
Posted by /ck:review-pr at 2026-11-24T07:10:38Z
The native Gemini provider default points at a model Google has already shut down.
Summary
The native Gemini provider is registered in
cmd/gateway_providers.gowithgemini-2.0-flashas its default model. Google shut that model down on 2026-06-01 and listsgemini-3.6-flashas its replacement, so any agent that does not pin a model gets a 404 from the Gemini API.Root cause
resolveModel("")falls back to the provider's default model, which was the retired ID.Fix
providers.GeminiDefaultModel = "gemini-3.6-flash"next toVertexDefaultModeland use it when registering thegeminiprovider.docs/02-providers.md.thinking_leveltoreasoning_effortand handles Gemini 3 thought signatures.VertexDefaultModel(Vertex AI has its own retirement schedule, so that is a separate change) and the openrouter default.Which replacement to default to (cost vs. reasoning, e.g. a flash-lite or a newer flash) is a maintainer decision;
gemini-3.6-flashis the one Google names as the direct replacement.Test
TestGeminiDefaultModel(internal/providers): the default is not the retired ID,resolveModel("")returns it, and a request withthinking_level=lowcarries the default model andreasoning_effort=low. It fails to compile ondev(no constant) and passes with the fix.go test ./internal/providers/,go vetandgo build ./cmd/...pass.This PR was prepared with AI assistance (Claude Code); the change and tests were generated and run by the assistant, and the submitter has not independently reviewed the code line by line.