gemini-cli - 💡(How to fix) Fix Model Mismatch - 3.1 Pro requests being routed/aliased to 3 Flash [1 participants]

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…
GitHub stats
google-gemini/gemini-cli#26181Fetched 2026-04-30 06:44:50
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
2
Participants
Timeline (top)
labeled ×1

There is a significant routing/aliasing error in the CLI. When configured to use Gemini 3.1 Pro, the requests are being redirected to Gemini 3 Flash.

Note: The logs specifically show it is redirecting to 3 Flash, not 3.1 Pro

This was discovered via a 429 "Resource Exhausted" error. Despite the User-Agent and configuration intending to use 3.1 Pro, the server response explicitly cites capacity issues for the Flash model.

Error Message

There is a significant routing/aliasing error in the CLI. When configured to use Gemini 3.1 Pro, the requests are being redirected to Gemini 3 Flash. This was discovered via a 429 "Resource Exhausted" error. Despite the User-Agent and configuration intending to use 3.1 Pro, the server response explicitly cites capacity issues for the Flash model. The server returns a 429 error identifying the model as gemini-3-flash-preview: "error": { │ ' "error": {\n' +

Root Cause

Steps to Reproduce

  1. Set CLI model to gemini-3.1-pro-preview.
  2. Execute a prompt to immediately hit a rate limit because you still have not fixed https://github.com/google-gemini/gemini-cli/issues/24188
  3. Open Debug using F12 To see it

Code Example

"error": {
  "code": 429,
  "message": "No capacity available for model gemini-3-flash-preview on the server",
  "status": "RESOURCE_EXHAUSTED",
  "details": [
    {
      "@type": "[type.googleapis.com/google.rpc.ErrorInfo](https://type.googleapis.com/google.rpc.ErrorInfo)",
      "reason": "MODEL_CAPACITY_EXHAUSTED",
      "metadata": {
        "model": "gemini-3-flash-preview"
      }
    }
  ]
}

---

User-Agent: 'GeminiCLI/0.39.1/gemini-3.1-pro-preview (linux; x64; terminal)'
...
│ data: '{\n' + 
'  "error": {\n' + 
'    "code": 429,\n' + 
'    "message": "No capacity available for model gemini-3-flash-preview on the server",\n'

---

> /about
│                                                                                                                                                                                                                                                                                                                          │
About Gemini CLI│                                                                                                                                                                                                                                                                                                                          │
CLI Version                                                                                                  0.39.1Git Commit                                                                                                   4d73f3413                                                                                                                                                                                                   │
Model                                                                                                        gemini-3.1-pro-preview                                                                                                                                                                                      │
Sandbox                                                                                                      no sandbox                                                                                                                                                                                                  │
OS                                                                                                           linux                                                                                                                                                                                                       │
Auth Method                                                                                                  Signed in with Google (redacted@redacted.com)Tier                                                                                                         Gemini Code Assist in Google One AI Pro│                                                                                                                                                                                                                                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
RAW_BUFFERClick to expand / collapse

What happened?

[Bug]: Model Mismatch - 3.1 Pro requests being routed/aliased to 3 Flash

Description

There is a significant routing/aliasing error in the CLI. When configured to use Gemini 3.1 Pro, the requests are being redirected to Gemini 3 Flash.

Note: The logs specifically show it is redirecting to 3 Flash, not 3.1 Pro

This was discovered via a 429 "Resource Exhausted" error. Despite the User-Agent and configuration intending to use 3.1 Pro, the server response explicitly cites capacity issues for the Flash model.

Environment

  • CLI Version: 0.39.1
  • User-Agent in logs: GeminiCLI/0.39.1/gemini-3.1-pro-preview (linux; x64; terminal)
  • Platform: Linux x64

Steps to Reproduce

  1. Set CLI model to gemini-3.1-pro-preview.
  2. Execute a prompt to immediately hit a rate limit because you still have not fixed https://github.com/google-gemini/gemini-cli/issues/24188
  3. Open Debug using F12 To see it

Expected Behavior

Requests should be routed to the 3.1 Pro endpoint/infrastructure.

Actual Behavior

The server returns a 429 error identifying the model as gemini-3-flash-preview:

"error": {
  "code": 429,
  "message": "No capacity available for model gemini-3-flash-preview on the server",
  "status": "RESOURCE_EXHAUSTED",
  "details": [
    {
      "@type": "[type.googleapis.com/google.rpc.ErrorInfo](https://type.googleapis.com/google.rpc.ErrorInfo)",
      "reason": "MODEL_CAPACITY_EXHAUSTED",
      "metadata": {
        "model": "gemini-3-flash-preview"
      }
    }
  ]
}

Relevant Log Snippet

│ User-Agent: 'GeminiCLI/0.39.1/gemini-3.1-pro-preview (linux; x64; terminal)'
...
│ data: '{\n' + 
│ '  "error": {\n' + 
│ '    "code": 429,\n' + 
│ '    "message": "No capacity available for model gemini-3-flash-preview on the server",\n'

What did you expect to happen?

I excepted it to use 3.1 Pro

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│                                                                                                                                                                                                                                                                                                                          │
│ About Gemini CLI                                                                                                                                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                                                                                          │
│ CLI Version                                                                                                  0.39.1                                                                                                                                                                                                      │
│ Git Commit                                                                                                   4d73f3413                                                                                                                                                                                                   │
│ Model                                                                                                        gemini-3.1-pro-preview                                                                                                                                                                                      │
│ Sandbox                                                                                                      no sandbox                                                                                                                                                                                                  │
│ OS                                                                                                           linux                                                                                                                                                                                                       │
│ Auth Method                                                                                                  Signed in with Google ([email protected])                                                                                                                                                          │
│ Tier                                                                                                         Gemini Code Assist in Google One AI Pro                                                                                                                                                                     │
│                                                                                                                                                                                                                                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
</details>

Login information

Google Oauth Account

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can be resolved by ensuring the correct model is specified in the request, potentially by updating the CLI configuration or the User-Agent header to accurately reflect the intended model, Gemini 3.1 Pro.

Guidance

  • Verify the User-Agent header in the request is correctly set to GeminiCLI/0.39.1/gemini-3.1-pro-preview to ensure the server recognizes the request as intended for the 3.1 Pro model.
  • Check the CLI configuration for any overrides or defaults that might be redirecting requests to the Gemini 3 Flash model instead of 3.1 Pro.
  • Review the server-side routing logic to identify any potential misconfigurations that could cause requests intended for 3.1 Pro to be routed to 3 Flash.
  • Consider testing with a different model or configuration to isolate if the issue is specific to the 3.1 Pro model or a more general routing problem.

Example

No specific code example is provided due to the lack of direct code references in the issue, but ensuring the correct model is specified in the request, such as in the User-Agent header, is crucial.

Notes

The issue seems to stem from a mismatch between the intended model (3.1 Pro) and the model the requests are being routed to (3 Flash), as indicated by the server response. The root cause could be a configuration issue on the client-side, server-side, or a combination of both.

Recommendation

Apply a workaround by explicitly specifying the model in the request or updating the CLI configuration to ensure accuracy, as the issue seems to be related to model routing rather than a version-specific problem.

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

gemini-cli - 💡(How to fix) Fix Model Mismatch - 3.1 Pro requests being routed/aliased to 3 Flash [1 participants]