Skip to main content

Module models

Module models 

Source
Expand description

Available model lists per agent: built-in for Claude, queried from each CLI for others. Shared by TUI and daemon (Web UI).

Structs§

ModelQuery
Result of querying the model list: when problem is set, the list may be incomplete (e.g., not logged in or expired), and the user should be informed.

Constants§

ANTIGRAVITY_MODELS
Default available models for Antigravity (agy).
CLAUDE_MODELS
Available models for Claude Code. The claude CLI has no subcommand to list models, so this is built-in: the first entries are aliases (always pointing to the latest in each family), followed by pinned version ids. Update here when new models launch; the Web UI fetches this same list via the daemon’s list_models.
COPILOT_MODELS
Default available models for GitHub Copilot CLI (copilot has no models subcommand). Keep in sync with MODEL_CATALOG.copilot in crates/ertangle-daemon/src/web/index.html.

Functions§

parse_codex_models
codex debug models outputs {"models":[{slug,display_name,visibility}]}; keep only visibility == list.
parse_models
Parse output of the models subcommand: ignore blank lines and prompt lines that do not look like an id.
query_models
Query the agent CLI for available models (opencode models, agy models), waiting up to 8 seconds. Each output line has the model id in the first column, followed by the display name (tab-separated). agy’s list embeds effort in the model id (xxx-high), whereas ACP separates model and effort, so variants are merged here.
query_models_detailed
Same as query_models, but includes any query problem description.
query_raw_models
Same as query_raw_models_detailed, returning only the list.
query_raw_models_detailed
Query the agent CLI for raw available models (opencode models, agy models, codex debug models), waiting up to 8 seconds. Does not merge antigravity effort variants; attaches a description if the query fails or the CLI reports an error.
split_effort_variants
Merge combined “model + effort” ids such as base-low/-medium/-high/-xhigh/-max into base (with effort selected separately). Only merges when a base has two or more variants, avoiding mis-splitting standalone ids like gpt-oss-120b-medium. Input is (display_label, id), preserving original order.