Skip to content

Model suggestions go stale: use Claude aliases and read agy's live model list #92

Description

@astetic-dev

Problem

The model field's suggestion list is a hardcoded snapshot that ages out of date with every model release. Claude Fable is the current example: it is not in the list, so it looks unsupported — even though typing claude-fable-5 in the field already works today (the field is free text and build_command passes --model through verbatim).

src/main.js:

const CLAUDE_MODELS = {
  "Claude Opus 4.8": "claude-opus-4-8",
  "Claude Sonnet 4.6": "claude-sonnet-4-6",
  "Claude Haiku 4.5": "claude-haiku-4-5",
};

This maps a display name onto a pinned model ID, so every entry is frozen to one generation. The agy list has the same problem and is already two releases behind: it lists Gemini 3.5/3.1 but not the 3.6 line, and misses both Claude entries agy now offers.

Fix, per agent

Neither half needs a hosted registry or an API key — the CLIs already provide the answer.

1. claude — suggest aliases, not pinned IDs

claude --model accepts an alias that resolves to the newest model in that line. From claude --help:

Provide an alias for the latest model (e.g. 'fable', 'opus', or 'sonnet') or a model's full name (e.g. 'claude-fable-5').

Verified against the installed CLI — fable, opus, sonnet, haiku, default and opusplan are all accepted. Suggesting aliases makes the list correct by construction: a new model shows up without an app update, because the resolution happens CLI-side.

  • Replace the claude suggestions with the alias set.
  • Keep the display-name→ID map as a legacy lookup in resolveModelArg() only, so projects saved with "Claude Opus 4.8" keep launching.
  • Free text stays supported, so pinning an exact ID remains possible; say so in the field hint.

2. agy — read the live list

agy models prints the available models, one label per line, which is exactly the string agy's --model expects. Current output:

Gemini 3.6 Flash (High/Medium/Low)
Gemini 3.5 Flash (High/Medium/Low)
Gemini 3.1 Pro (High/Low)
Claude Sonnet 4.6 (Thinking)
Claude Opus 4.6 (Thinking)
GPT-OSS 120B (Medium)
  • New Tauri command list_agent_models(agent) that runs the subcommand through the existing resolve_program() (so the cmd/bat shim path from Launch fails when Claude Code is installed via npm (claude.cmd, no claude.exe) #40 keeps working), with CREATE_NO_WINDOW, null stdin and a wall-clock timeout.
  • Frontend caches the result per agent and refills the datalist; on any failure (agy not installed, offline, timeout) the built-in list stays, so nothing regresses.
  • Applies to both datalists: the launch form and the per-row list in the projects editor.

Acceptance

  • Fable is selectable from the launch form without typing an ID.
  • claude suggestions contain no pinned model IDs; a saved project holding an old display name still launches.
  • agy suggestions come from agy models and include the 3.6 line.
  • With agy absent from PATH the field still works and shows the built-in list.
  • Unit test for the output parser (pure helper, in the spirit of Refactor: split lib.rs and main.js into modules; add unit tests for pure helpers #82).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions