Repository navigation
Done
Description
Problem / motivation
Claude Code's modelPicker setting decides what /model lists. It holds options[] rows with model, label, description and behavesAs, and replaceBuiltInOptions hides the built-in list. Providers behind an API key ship one for their own models. Silk's setup guide (https://silkcompute.com/docs/claude-code) has you put five rows and replaceBuiltInOptions: true into settings.json. clauth has no per-account place for that setting, which leaves three gaps.
- No per-profile picker.
ProfileConfiginsrc/profile.rshas no table for it, so the only place to put it is the shared~/.claude/settings.json. Every account then sees the silk list, and withreplaceBuiltInOptionsmy Anthropic accounts lose Opus and Sonnet from/model. - A switch never touches it.
build_settingsinsrc/claude.rssets or removesmodelandadvisorModelper profile, but leavesmodelPickeras the base had it. A picker set by hand for one account survives every switch onto another. - Settings sync shares it.
modelPickeris not inPER_PROFILE_TOP_FIELDSinsrc/settings_sync.rs, so sync treats it as a shared key and copies one session's picker into siblingclauth startruntime copies and into the base.
Proposed behavior
- A
[model_picker]table inconfig.toml. It holdsreplace_built_inand[[model_picker.options]]rows withmodel,label,descriptionandbehaves_as. Claude Code's camelCase spellings (replaceBuiltInOptions,behavesAs) load as aliases, so a provider example copied over from JSON still loads. clauth drops a row with a blankmodel, and a table with no live row counts as unset. clauth reads the table and never edits it, so a save of another key leaves the block as written. - Written on switch and start. The live rows go into
settings.jsonas top-levelmodelPicker, and an account with no picker removes the key, the same set-or-remove rulemodelfollows. - Per-account in sync.
modelPickerjoinsPER_PROFILE_TOP_FIELDSnext tomodelandadvisorModel. - Visible in Setup. The table is hand-edited, so the account header gets a read-only
pickerline (none,2 options,5 options (replaces built-in)).
Alternatives considered
- Editable Setup rows for the picker. A list of rows with four fields each is a lot of new TUI for something most accounts never set, so I kept the table hand-edited and the Setup line read-only.
- Keep it in the shared
~/.claude/settings.jsonand tell people to edit it per switch. That is what happens today, and every account then gets one provider's list. - Pass it through
--settingsonly onclauth start. A plainclaudeafter a switch would not get it.
clauth version
0.18.2 (code read at 4c5a8031)
Surface
other
OS
macOS 27.2
Notes
- I searched open and closed issues and PRs for
modelPicker,model_picker,model picker,/modelandsilk, and found nothing that covers this. feat(models): set Claude Code's effort per model in each account #173 and fix(models): a switch removes only the model values clauth wrote #180 touch the[models]code but not the picker. - Claude Code reads
modelPickeronly from managed settings,--settingsor the SDK, and user settings, and the highest source that defines it wins, with no merging. A managedmodelPicker(an org policy, say) therefore hides the profile's rows, and clauth can't change that. - A
clauth startsession that auto-switch moves to another account keeps the picker its runtime copy started with, because the swap rewrites only the effort key. I haven't confirmed whether a running Claude Code re-reads a changedmodelPickerat all.
AI
AI-assisted, I reviewed everything
Metadata
Metadata
Assignees
Labels
No labels
Activity