Skip to content

Unexpected model resolution: gemini-2.5-flash is mapped to gemini-3.5-flash #29213

Description

@YannisZang

What happened?

--model gemini-2.5-flash is resolved to gemini-3.5-flash when using Vertex AI

Summary

When invoking Gemini CLI with --model gemini-2.5-flash, the CLI appears to resolve the request to gemini-3.5-flash instead of the specified model.

As a result, the request fails because my Vertex AI project does not have access to gemini-3.5-flash.

Environment

  • Gemini CLI version: 0.58.0
  • Also reproduced on: 0.54.0
  • Node.js: v24.13.0
  • Authentication: Vertex AI (ADC)

Reproduction

Run:

echo "hello" | gemini \
  --model gemini-2.5-flash \
  --prompt ""

Actual Behavior

The request fails with the following error:

Error when talking to Gemini API

ModelNotFoundError: Publisher model
`projects/.../locations/us-central1/publishers/google/models/gemini-3.5-flash`
was not found or your project does not have access to it.

Although gemini-2.5-flash was specified, the CLI appears to send the request to gemini-3.5-flash.

Expected Behavior

The CLI should send the request to gemini-2.5-flash when it is explicitly specified with:

--model gemini-2.5-flash

It should not resolve or rewrite the model name to gemini-3.5-flash.

Additional Information

Using the same environment and authentication, the following command works as expected:

echo "hello" | gemini \
  --model gemini-2.5-pro \
  --prompt ""

What did you expect to happen?

It should not resolve or rewrite the model name to gemini-3.5-flash.

Client information

Client Information

Run on Linux

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

> /about
│ About Gemini CLI                                                                                                                                                                                                                                                                  │
│                                                                                                                                                                                                                                                                                   │
│ CLI Version                                                                                     0.54.0                                                                                                                                                                            │
│ Git Commit                                                                                      a74b483d1                                                                                                                                                                         │
│ Model                                                                                           gemini-2.5-pro                                                                                                                                                                    │
│ Sandbox                                                                                         no sandbox                                                                                                                                                                        │
│ OS                                                                                              linux                                                                                                                                                                             │
│ Auth Method                                                                                     vertex-ai                                                                                                                                                                         │
│ GCP Project                                                                                     ***                                                                                                                                                    │
│ IDE Client                                                                                      VS Code                                                                                                                                                                           │

Login information

No response

Anything else we need to know?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalityeffort/small1 day or less: trivial logic, UI adjustments, docskind/bugpriority/p2Important but can be addressed in a future release.status/bot-triaged

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions