Gemini CLI: Model Discovery With the New `models` Command

Gemini CLIView original changelog

Gemini CLI v0.67.0 added a gemini models command and a --list-models flag so users and scripts can discover which models the CLI can use without starting an interactive session. A JSON output mode returns structured data per model, including its ID, display name, description and token limits. The flag exits before the terminal UI or sandbox starts, so it is suited to piping into tools like jq.

Key Takeaways

  • Gemini CLI v0.67.0 added a gemini models subcommand and a --list-models flag, giving users a built-in way to discover available models from the terminal.
  • The listing runs non-interactively, so it works in scripts without opening the terminal UI.
  • Adding --output-format json (or -o json) returns a structured array that includes each model's ID, display name, description and input and output token limits.
  • The flag exits before sandboxing or TUI startup and skips non-interactive auth refreshes, so piped output stays clean for tools such as jq.
  • Failures produce a non-zero exit code, and logs outside JSON mode go to stderr, which makes the command safe to use in automation.
  • The code first shipped in v0.67.0-preview.0 on October 27 and reached stable on November 4, 2026, ahead of geminicli.com, which still lists v0.64.0 as its latest stable.

What Changed

Gemini CLI v0.67.0, the stable release published on November 4, 2026, added a way to list models directly from the command line. The release introduced a new gemini models subcommand and a matching --list-models flag. Both are aimed at model discovery: finding out which models the CLI can use, without opening an interactive session and without checking the documentation.

How to Use It

Users can run gemini models to see the listing, or gemini models list for the explicit form. The top-level gemini --list-models flag does the same job and runs non-interactively. By default the output is human-readable text in the terminal.

For scripts and tooling, the output can be switched to JSON with --output-format json or -o json. In JSON mode the command prints a structured array. Each entry includes a modelId, an id, a name, a displayName, a description and contextLimits containing input and output token counts.

Built for Scripting

The pull request behind the feature describes it as enabling programmatic model discovery, and several details point at that use. The --list-models flag exits before sandboxing or the terminal interface initializes, so it returns quickly. Listing skips non-interactive authentication refreshes so that credential-related log lines do not pollute standard output when the result is piped into tools such as jq. If listing fails, the command returns a non-zero exit code, and log messages outside JSON mode go to standard error.

Why It Matters

Model names change often, and a name typed into a --model argument or a settings file is easy to get wrong. A built-in listing gives users one place to check which model identifiers are available and how large their token limits are. The JSON output also lets teams build that check into scripts, wrappers and CI jobs instead of hard-coding assumptions.

Availability

The feature merged into the main branch on October 23, 2026, first appeared in v0.67.0-preview.0 on October 27, and reached the stable channel with v0.67.0 on November 4, 2026. The release notes describe it in a single line, so details such as exactly which models appear in the listing are best confirmed by running the command.

Gemini CLI models Command: List Models From the Terminal | Yet Another Changelog