Skip to content

Use Claude CLI model aliases instead of pinned model ids - #180

Open
Th1nkK1D wants to merge 1 commit into
nkzw-tech:mainfrom
Th1nkK1D:claude-model-aliases
Open

Th1nkK1D wants to merge 1 commit into
nkzw-tech:mainfrom
Th1nkK1D:claude-model-aliases

Conversation

@Th1nkK1D

@Th1nkK1D Th1nkK1D commented Oct 9, 2026

Copy link
Copy Markdown

Why

The Claude backend pins exact model ids (claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5), so we can't use the newest model considered how fast it changes. Moreover, normalizeClaudeModel silently replaces any id outside that list with Sonnet 4.6, so users can't work around it by editing their config.

How

  • Use the Claude Code CLI's model aliases (opus / sonnet / haiku) as the model ids. It will resolves to the latest model in that family, so the picker stays current without a Codiff release.
  • Sonnet stays the default.
  • Existing configs keep working: normalizeClaudeModel maps any legacy claude-(opus|sonnet|haiku)… id to its alias before validating.
  • Updated config/defaults.json, the config JSON schema (default + description), and the README example. The schema keeps claudeModel as a free string to support legacy values.

Related issue: #177 fixed the same "unknown ids silently replaced" problem for Codex by reading the model catalog from the Codex app-server. Unfortunately, Claude CLI has no equivalent listing, so aliases should be the way to go.

Verification

  • vp check --fix: clean
  • vp test: new/updated cases in electron/__tests__/claude.test.ts pass (legacy ids → aliases, unknown → sonnet)
  • vp run build: passes
  • Test Claude CLI alias model resolving with claude -p --model sonnet --output-format json
  • Manual testing with legacy name, and after changing model to the new alias from the options.

AI disclosure

Research, code, tests, and this PR description were drafted with Claude Code (Claude Opus). I reviewed the plan, references, code diff, manual tested to confirm by myself, and updated the PR details. Any AI-assisted replies to review comments will be noted.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant