Skip to content

Always open model picker, even when model config is missing - #1740

Merged
trissim merged 1 commit into
mainfrom
ccr-b936959e-6yflrv
Nov 11, 2026
Merged

trissim merged 1 commit into
mainfrom
ccr-b936959e-6yflrv

Conversation

@trissim

@trissim trissim commented Nov 11, 2026

Copy link
Copy Markdown

The bug

When the backend fails to advertise a model option — e.g. Pi reports a bare model name like claude-opus-4-6 without the provider slash, and ChosenModel.__post_init__ throws IdentityConflict — Toad's model picker becomes unreachable:

  • /model flashes "This agent has no model selector"
  • Clicking the agent info bar does nothing

This is the exact state where the user needs the picker most: to fix the broken configuration.

The fix

ModelConfigurationSetting.picker_settings() already returns (self,) unconditionally — the comment says "Provider setup remains reachable before a model is advertised." The model switcher widget handles the no-option case: it shows recent models and the "Connect a provider" action.

The two gates blocking it were the bug:

  • slash_command.py:246 — ModelCommand.apply() checked model_selection_available before focusing the switcher
  • prompt.py:859 — on_agent_info_click checked the same property before focusing

Both gates removed. The dead model_selection_available property on ConversationSessionBinding deleted (zero remaining consumers).

What changed

File Change
slash_command.py /model always opens the picker
widgets/prompt.py Agent info click always opens the picker
widgets/conversation.py Dead model_selection_available property deleted

3 files, −10/+2 lines.



Generated by Claude Code

When the backend fails to advertise a model option (e.g. bare model
name without provider slash), the model picker was unreachable:
/model said "no model selector" and clicking the agent info did
nothing. This is exactly the state where the user needs the picker
most — to fix the broken configuration.

ModelConfigurationSetting.picker_settings already returns itself
unconditionally ("Provider setup remains reachable before a model
is advertised"), so the model switcher handles the no-option case.
The two gates blocking it were the bug.

Removed: model_selection_available property (no remaining consumers).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dRAz8kKfiXqtrtZQJi
Copilot AI balanced review requested due to automatic review settings November 11, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 5991498 into main Nov 11, 2026
1 of 2 checks passed
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.

3 participants