feat(chat): add a custom model id entry to the model picker - #641
Open
Adam-Dalloul wants to merge 1 commit into
Open
feat(chat): add a custom model id entry to the model picker#641Adam-Dalloul wants to merge 1 commit into
Adam-Dalloul wants to merge 1 commit into
Conversation
A brand-new model is often live on the wire days before an agent's curated list catches up (claude-fable-5-1 answered while the published picker list still lacked it), and the stack already handles out-of-picker ids: the claude adapter deliberately tracks the raw id of a model outside its options, and every codeg trigger falls back to rendering that raw id. The only missing piece was a place to type one. Each model-picker surface (the inline dropdown, the searchable popover, and the collapsed cog panel) now ends in a "Use custom model ID..." row opening a small entry dialog. The trimmed id takes the exact path an advertised pick takes: optimistic apply, saved preference, and session/set_config_option (Grok's set_model variant included), so an agent that adopts it runs it, one that settles elsewhere raises the existing config_option_rejected toast naming the typed id, and the preference replays on the next connect. Model option only, no per-agent code, no validation beyond trim. One rejection shape was silent before: an agent that refuses the set outright (a JSON-RPC error, e.g. an id claude cannot resolve) emitted only a recoverable Error, so the composer kept showing an optimistic value the agent never ran. A failed set now re-emits the last adopted option list first, the same revert-then-report recovery the Grok cross-agent-type switch already uses. Sibling options stay honest for free: an agent answering a model switch with a rebuilt list (claude seeds effort levels per model, and a custom id carries none, so effort drops out) replaces the selector wholesale, and a new test pins that adoption.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anthropic shipped
claude-fable-5-1days before their published picker list included it: the newest claude adapter advertises only the five curated entries, yet the id already works on the wire (verified live, the model answers). The adapter even handles an out-of-picker id deliberately, per its own source: "The switched-to model may not be among the options ... we track the raw id: the picker shows no selection, but the model-dependent bookkeeping and any later setModel round-trip stay truthful to what the SDK is running." Codeg just offered no way to type one.Every model-picker surface (the inline dropdown, the searchable popover, the collapsed cog panel) now ends in a "Use custom model ID..." row that opens a small entry dialog. The trimmed id goes through the exact same path as picking an advertised option, for the model option only, with nothing per-agent and no validation beyond trim: agents that reject simply reject.
Three honesty properties. A current id outside the advertised options renders as the raw id on every trigger, now pinned by a test. A pick the agent settles elsewhere still raises the config_option_rejected toast naming the typed id, and a set the agent refuses outright now re-emits the last adopted option list before the error (the same revert-then-report recovery the Grok cross-agent switch uses) instead of leaving the refused id on the trigger. The typed id persists in the saved selector preferences and replays at the next connect like any picked value.
Sibling options follow the agent's own answer: a model switch that rebuilds the option list replaces the selector wholesale, so when claude's per-model effort seeding drops effort for a custom id, the effort selector disappears rather than offering levels that would silently no-op.