All insights

Coding agents

Gemini CLI Models: How to Choose, Select, and Use One with an API

Compare Gemini CLI’s documented Auto presets with a Manual preview candidate, learn how to select a model, and check its API counterpart and production eligibility.

Illustration for Gemini cli models

The short answer

Gemini CLI’s model-selection documentation recommends Auto for most users and lists Auto presets for Gemini 3 and Gemini 2.5. A separate Gemini 3 guide describes a rollout of gemini-3.1-pro-preview; it says to check /model → Manual to see whether it is available to you. That guide does not establish universal access or specify a CLI version or preview-setting prerequisite. Treat the 3.1 entry as a guide-reported rollout candidate, not another Auto preset. (Gemini CLI model selection; Gemini 3 guide)

A CLI model ID can match an API model ID on a particular channel, but that match alone does not provide API access. For example, Google Cloud’s Gemini Enterprise Agent Platform documentation identifies gemini-3-flash-preview and lists GenerateContent as supported. It also explicitly permits production or commercial use of this preview offering, subject to the obligations and restrictions in the agreement that governs your Google Cloud access. (Google Cloud model documentation)

Which models does Gemini CLI document?

The model-selection page lists these Auto presets:

CLI option Models listed in the selection documentation
Auto (Gemini 3) gemini-3-pro-preview, gemini-3-flash-preview
Auto (Gemini 2.5) gemini-2.5-pro, gemini-2.5-flash
Manual Choose a specific model from the options available to your CLI

Separately, the Gemini 3 guide says that gemini-3.1-pro-preview is rolling out and instructs users to open /model → Manual to check for it. It does not establish that the model is available to every user, nor does it specify a version or preview-setting prerequisite. (Gemini CLI model selection; Gemini 3 guide)

The documented lists are not a guarantee that every model is available to every account. Use the options in your own CLI to check what you can select. The Gemini API has a separate models.list method for checking models available through that API; that list is not a catalog of your CLI choices. (Gemini API model listing)

How to choose a model for your task

  • Not sure? Start with Auto. Gemini CLI recommends Auto for most users and describes it as choosing a model based on task complexity. (Gemini CLI model selection)
  • Complex tasks or reasoning: Consider a Pro model if it is available and you need to select a specific model. The CLI documentation positions Pro models for complex tasks and reasoning. (Gemini CLI model selection)
  • Speed: Consider a Flash model when speed is the priority. The CLI documentation positions Flash models for high-speed results. (Gemini CLI model selection)

These are broad recommendations from the CLI documentation, not a guarantee that one model will perform best for your particular codebase or task. A /model choice or --model flag does not override the model used by sub-agents. The routing documentation also says a model failure, such as a quota or server error, can trigger fallback; the selected model therefore does not prove that every operation used it. (Gemini CLI model selection; model routing)

Select and check a model in Gemini CLI

Choose during a session

  1. Start Gemini CLI and enter /model.
  2. Choose an Auto option, or choose Manual and select one of the available models.
  3. To check the selected model, the Google Codelab says to look at the model display in the terminal’s bottom-right corner. This display does not establish which model a sub-agent or fallback operation used. (Google Codelab: Hands-on with Gemini CLI; Gemini CLI model selection)

Select a model at launch

Gemini CLI supports the --model flag, also written -m. The Google Codelab gives this example:

gemini -m "gemini-2.5-flash"

This is an example of the flag syntax, not a guarantee that the model ID is available to your account. Check your CLI’s Manual options first. (Google Codelab: Hands-on with Gemini CLI; CLI reference)

For a project default, the model-routing documentation describes model.name in settings.json. Its precedence is launch-time --model, then GEMINI_MODEL, then model.name. A workspace settings file is .gemini/settings.json. Use a model ID available to your CLI; a project setting does not guarantee access for another user, machine, or API channel. (Gemini CLI model routing)

{
  "model": {
    "name": "YOUR_AVAILABLE_MODEL_ID"
  }
}

Can you use a selected CLI model with a production API?

For gemini-3-flash-preview, the CLI model-selection documentation and Google Cloud’s Gemini Enterprise Agent Platform documentation use the same model ID; the Google Cloud page lists GenerateContent as supported. This establishes a documented ID match for that model on that API channel—not that every CLI model is available through every API. (Gemini CLI model selection; Google Cloud model documentation)

Production use is permitted for this preview offering, but only subject to the obligations and restrictions in the agreement under which you access Google Cloud. Check that agreement and the model page for your intended use; permission for this Google Cloud offering does not establish availability or terms for the Google AI API or another channel. (Gemini 3 Flash model terms; Google Cloud Generative AI Preview terms)

For the Google Cloud channel, follow the Gemini 3 quickstart: authenticate with an API key or Application Default Credentials (ADC), configure your Google Cloud project, and use the global endpoint, which the quickstart specifies for gemini-3-flash-preview. CLI selection alone does not configure API authentication or establish API access. The model’s preview terms and your applicable Google Cloud agreement govern production use; do not infer API pricing or billing terms from a CLI selection.

Sources

Gemini CLI model selection (/model command)

Gemini 3 Pro and Gemini 3 Flash on Gemini CLI

Gemini CLI model routing

Hands-on with Gemini CLI

Gemini CLI cheatsheet

Gemini 3 Flash | Gemini Enterprise Agent Platform

Get started with Gemini 3 | Gemini Enterprise Agent Platform

Additional Terms for Generative AI Preview Products

Models | Gemini API

Contact us