Skip to content

gemini-cli accepts invalid model names with --model flag #21391

@JaisalJain

Description

@JaisalJain

What happened?

When running the CLI with an invalid model name using the --model flag, the CLI starts normally instead of failing early.

Example:

gemini --model gemini-4-pro

gemini --model gemini-5-pro

Even though the model does not exist, the CLI launches successfully. The error only appears later when a request is made.

This can confuse users because it is not clear that the model name is invalid during startup.

What did you expect to happen?

The CLI should validate the model name during startup and exit with an error if the model does not exist.

Example expected behavior:

gemini --model gemini-4-pro

Invalid model: "gemini-4-pro"

Client information

Details

CLI Version - 0.32.1
OS - linux (ubuntu24.04)
login Using Google Account login.

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitystatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions