Skip to content

fix(providers): replace retired gemini-2.0-flash default with gemini-3.6-flash - #1697

Open
pcbeingused33 wants to merge 1 commit into
nextlevelbuilder:devfrom
pcbeingused33:fix/gemini-default-model
Open

pcbeingused33 wants to merge 1 commit into
nextlevelbuilder:devfrom
pcbeingused33:fix/gemini-default-model

Conversation

@pcbeingused33

Copy link
Copy Markdown
Contributor

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.go with gemini-2.0-flash as its default model. Google shut that model down on 2026-06-01 and lists gemini-3.6-flash as 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

  • Add providers.GeminiDefaultModel = "gemini-3.6-flash" next to VertexDefaultModel and use it when registering the gemini provider.
  • Update the default shown in docs/02-providers.md.
  • No request-parameter changes were needed: the existing Gemini route already maps thinking_level to reasoning_effort and handles Gemini 3 thought signatures.
  • Left alone: 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-flash is 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 with thinking_level=low carries the default model and reasoning_effort=low. It fails to compile on dev (no constant) and passes with the fix. go test ./internal/providers/, go vet and go 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.

…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 clark-cant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 model across PRs/issues; the only related item, issue 1642, is about Gemini TTS defaults, not the native provider.
  • Project standards: docs found — CONTRIBUTING.md:15 requires PRs to target dev; this PR targets dev. ✓
  • 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 at google/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 -001 version, but worth a follow-up so Vertex users without a pinned model do not hit the same 404.
  • Suggestion: the new TestGeminiDefaultModel partially overlaps the existing openai_gemini_thinking_test.go thinking→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

@clark-cant clark-cant added agent:github-maintain Processed by github-maintain automation maintain:triaged Triaged by maintain workflow pr:reviewed Reviewed by maintainer labels Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation maintain:triaged Triaged by maintain workflow pr:reviewed Reviewed by maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants