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:
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
What happened?
--model gemini-2.5-flashis resolved togemini-3.5-flashwhen using Vertex AISummary
When invoking Gemini CLI with
--model gemini-2.5-flash, the CLI appears to resolve the request togemini-3.5-flashinstead 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
Reproduction
Run:
Actual Behavior
The request fails with the following error:
Although
gemini-2.5-flashwas specified, the CLI appears to send the request togemini-3.5-flash.Expected Behavior
The CLI should send the request to
gemini-2.5-flashwhen it is explicitly specified with: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:
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
geminito enter the interactive CLI, then run the/aboutcommand.Login information
No response
Anything else we need to know?
No response