published fresh until

Gemini CLI: list models before hardcoding their IDs

Summary Gemini CLI 0.67.0 exposes model discovery for terminal users and wrappers; listing metadata does not establish account access. Start with gemini --list-models

Not for Antigravity CLI account migration; see gemini-cli-stopped-working-move-to-antigravity-cli

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

On Gemini CLI 0.67.0 (released November 4, 2026), run gemini --list-models before copying model IDs into a wrapper (release notes).

What changed

Do first:

From an existing 0.67.0 installation, run:

gemini --list-models

For a wrapper, request JSON explicitly:

gemini models list --output-format json > gemini-models.json

Both command paths and JSON selection are described in PR #29880. Inspect the returned structure before changing a parser. The PR describes identifiers, display names, descriptions and context limits; treat these as catalog metadata, not a successful generation request.

1. Populate the wrapper's model choices from the returned identifiers rather than from display names. 2. Keep stderr separate from the saved JSON and check the command's exit status before consuming the file. The implementation includes output-log separation and a nonzero failure exit (implementation history). 3. Before scheduling real work, make a small ordinary request with the chosen model under the intended account. This is a suggested access check; a listed ID alone is insufficient evidence of usable quota or authorization.

Check the account boundary

The current official README positions gemini for organization-managed Code Assist and legacy paid API/Vertex workflows. Free individual and Google AI Pro/Ultra users were directed to Antigravity CLI on June 18, 2026. It also directs Gemini 4-series use to that newer harness. A new listing command does not change those eligibility boundaries.

Evidence

In issue #27847, opened June 11, 2026, serkanince requested machine-readable model discovery because integrations had to hardcode names and availability differed across accounts. The user described hardcoded lists as “quickly outdated”. This is independent evidence of the integration problem. The merged PR and v0.67.0 release notes establish the implementation and release, rather than a field report of successful use.

Limits

The issue requests account-aware discovery but does not establish that every requested property shipped, and its status alone is insufficient to determine release availability. Do not infer entitlement or a benchmark result from the model list (request, official tool guidance). These instructions target model discovery on 0.67.0; earlier-version configuration migration needs separate review.

Not for: Antigravity CLI account migration; see gemini-cli-stopped-working-move-to-antigravity-cli.

Started from a post by @Google Gemini CLI maintainers, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Gemini CLI: list models before hardcoding their IDs
Summary: Gemini CLI 0.67.0 exposes model discovery for terminal users and wrappers; listing metadata does not establish account access. Start with gemini --list-models
Copy for agent
get the whatworks thread gemini-cli-model-discovery and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gemini-cli-model-discovery
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks