gemini-cli - 💡(How to fix) Fix Vertex AI: flash model router maps to non-existent gemini-3-flash

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When using Vertex AI authentication, the model router remaps all flash model requests to gemini-3-flash, which does not exist on Vertex AI. This makes it impossible to use any flash model (including gemini-3.5-flash) through the CLI with Vertex AI.

Error Message

ModelNotFoundError: Publisher Model projects/<project>/locations/us-central1/publishers/google/models/gemini-3-flash was not found

Root Cause

In hasGemini35FlashGAAccess(), the Vertex AI branch sets both flash model slots to gemini-3-flash:

if (authType === AuthType2.USE_GEMINI) {
  setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");  // correct
} else {
  setFlashModels("gemini-3-flash", "gemini-3-flash");  // bug — should be gemini-3.5-flash
}

The AI Studio (USE_GEMINI) path correctly uses gemini-3.5-flash, but the Vertex AI path uses gemini-3-flash for both slots.

Fix Action

Workaround

Patch the bundle at chunk-LSXUKR6W.js line 375645, changing:

setFlashModels("gemini-3-flash", "gemini-3-flash");

to:

setFlashModels("gemini-3.5-flash", "gemini-3.5-flash");

Code Example

[Routing] Selected model: gemini-3-flash (Source: agent-router/override, Latency: 0ms)

---

ModelNotFoundError: Publisher Model `projects/<project>/locations/us-central1/publishers/google/models/gemini-3-flash` was not found

---

if (authType === AuthType2.USE_GEMINI) {
  setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");  // correct
} else {
  setFlashModels("gemini-3-flash", "gemini-3-flash");  // bug — should be gemini-3.5-flash
}

---

setFlashModels("gemini-3-flash", "gemini-3-flash");

---

setFlashModels("gemini-3.5-flash", "gemini-3.5-flash");
RAW_BUFFERClick to expand / collapse

Description

When using Vertex AI authentication, the model router remaps all flash model requests to gemini-3-flash, which does not exist on Vertex AI. This makes it impossible to use any flash model (including gemini-3.5-flash) through the CLI with Vertex AI.

Steps to Reproduce

  1. Configure Gemini CLI for Vertex AI auth ("selectedType": "vertex-ai" in settings.json)
  2. Run: gemini -m gemini-3.5-flash -p "hello"
  3. Observe the error references gemini-3-flash, not the model you requested

Expected Behavior

The CLI should send gemini-3.5-flash to the Vertex AI API (which works — verified via direct curl to the Vertex AI endpoint).

Actual Behavior

The agent router overrides the model to gemini-3-flash regardless of what is passed via -m:

[Routing] Selected model: gemini-3-flash (Source: agent-router/override, Latency: 0ms)

Error:

ModelNotFoundError: Publisher Model `projects/<project>/locations/us-central1/publishers/google/models/gemini-3-flash` was not found

Root Cause

In hasGemini35FlashGAAccess(), the Vertex AI branch sets both flash model slots to gemini-3-flash:

if (authType === AuthType2.USE_GEMINI) {
  setFlashModels("gemini-3-flash-preview", "gemini-3.5-flash");  // correct
} else {
  setFlashModels("gemini-3-flash", "gemini-3-flash");  // bug — should be gemini-3.5-flash
}

The AI Studio (USE_GEMINI) path correctly uses gemini-3.5-flash, but the Vertex AI path uses gemini-3-flash for both slots.

Workaround

Patch the bundle at chunk-LSXUKR6W.js line 375645, changing:

setFlashModels("gemini-3-flash", "gemini-3-flash");

to:

setFlashModels("gemini-3.5-flash", "gemini-3.5-flash");

Environment

  • Gemini CLI version: 0.45.2
  • Auth: Vertex AI
  • OS: macOS (Darwin 25.4.0, arm64)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING