Skip to content

Feature: per-account /model picker (Claude Code's modelPicker) #184

Done

Description

@siddicky

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.

  1. No per-profile picker. ProfileConfig in src/profile.rs has 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 with replaceBuiltInOptions my Anthropic accounts lose Opus and Sonnet from /model.
  2. A switch never touches it. build_settings in src/claude.rs sets or removes model and advisorModel per profile, but leaves modelPicker as the base had it. A picker set by hand for one account survives every switch onto another.
  3. Settings sync shares it. modelPicker is not in PER_PROFILE_TOP_FIELDS in src/settings_sync.rs, so sync treats it as a shared key and copies one session's picker into sibling clauth start runtime copies and into the base.

Proposed behavior

  1. A [model_picker] table in config.toml. It holds replace_built_in and [[model_picker.options]] rows with model, label, description and behaves_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 blank model, 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.
  2. Written on switch and start. The live rows go into settings.json as top-level modelPicker, and an account with no picker removes the key, the same set-or-remove rule model follows.
  3. Per-account in sync. modelPicker joins PER_PROFILE_TOP_FIELDS next to model and advisorModel.
  4. Visible in Setup. The table is hand-edited, so the account header gets a read-only picker line (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.json and tell people to edit it per switch. That is what happens today, and every account then gets one provider's list.
  • Pass it through --settings only on clauth start. A plain claude after 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, /model and silk, 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 modelPicker only from managed settings, --settings or the SDK, and user settings, and the highest source that defines it wins, with no merging. A managed modelPicker (an org policy, say) therefore hides the profile's rows, and clauth can't change that.
  • A clauth start session 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 changed modelPicker at all.

AI

AI-assisted, I reviewed everything

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions