Skip to content

feat(ios): current Claude model family in the picker via CLI-resolved aliases - #329

Open
kingbootoshi wants to merge 1 commit into
0xSero:mainfrom
kingbootoshi:feat/claude-model-family
Open

feat(ios): current Claude model family in the picker via CLI-resolved aliases#329
kingbootoshi wants to merge 1 commit into
0xSero:mainfrom
kingbootoshi:feat/claude-model-family

Conversation

@kingbootoshi

Copy link
Copy Markdown

Brings the Claude model picker up to the current family - Fable, Opus, Sonnet (default), Haiku - and makes it structurally unable to go stale again.

Root cause

Codex and Claude both flow through the same model/list RPC, but codex is answered dynamically by the installed CLI while claude's list is a hand-curated table in the alleycat claude bridge (pinned rev), written before the Fable 5 generation existed. The app could never show fable no matter how current the host CLI was.

Fix

One layer, in this repo's existing precedent for deficient host lists (the amp mode normalization in ffi/client.rs):

  • claude wire models from the stale bridge list are dropped
  • four alias entries are supplied - fable, opus, sonnet (default), haiku - with claude's minimal/low/medium/high reasoning tiers
  • the ids are CLI aliases, so the claude binary on the host resolves each to its latest revision at spawn time. New model generations appear without any app change - this is the closest thing to dynamic discovery claude offers
  • fallback also fires when the claude model/list call fails, mirroring amp

Verification

  • cargo test -p codex-mobile-client --lib: 784 passed, 0 failed (includes new claude_wire_models_are_replaced_by_family_aliases)
  • iOS sim build: BUILD SUCCEEDED
  • Live on-device over the SSH bridge: picker shows Claude Code 4 (Fable/Opus/Sonnet/Haiku), old 4.x entries gone, selecting Fable spawns claude --model fable on the host

Demo

claude-model-family.mp4

🤖 Generated with Claude Code

The claude model list came from alleycat-claude-bridge's hand-curated
handle_model_list (claude-opus-4-7 / claude-sonnet-4-6 / claude-haiku-4-5),
which predates the Fable 5 generation, while codex lists stay current
because the codex CLI answers model/list itself. Claude has no model
introspection API, so the list rots wherever a point version is pinned.

Replace claude wire models client-side with the four family aliases the
claude CLI resolves natively (fable, opus, sonnet, haiku -> latest
revision of each), mirroring the existing amp mode normalization in
refresh_models. Aliases keep the picker current across future model
generations without another code change, and the family still appears
when the bridge's model/list call fails.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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