Repository navigation
Group the ACP model picker by inference type - #265
Conversation
The Model dropdown in Zed mixed on-device models and siGit Code Cloud
tiers in one flat list, and any entry could be picked whatever the Local
inference toggle said. The picker now shows two groups with the active
one first: on-device models and Cloud tiers. Both stay visible so the
user can see what runs locally next to what Cloud offers.
ACP has no disabled flag on a select option, so the inactive group is
labelled ("turn on/off Local inference to use") and the agent refuses a
pick from it. handle_set_session_config_option returns the unchanged
options and posts a status saying which toggle to flip. The current
model stays selected even when it falls in the inactive group after a
flip, since flipping never switches or loads a model.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: siGit Code v1.7.5-acp <noreply@sigit.si>
There was a problem hiding this comment.
The change restructures the ACP model picker to group models by inference type (on-device vs. Cloud), always showing both groups but only allowing selection from the group matching the current Local inference mode. The agent enforces this by rejecting attempts to select from the inactive group and providing user feedback. The grouping logic is implemented in build_config_options_for, and new/updated tests verify the grouping and selection behavior. Status and description copy is updated to use 'selectable' instead of 'highlighted'. Test and integration assertions are updated to match the new UI and wording. No findings from earlier reviews remain unresolved.
Automated review by siGit Code Review · commit 656b6ce · see the review dashboard
What
In Zed the Model dropdown listed on-device models and siGit Code Cloud tiers in one flat list, and any entry could be picked no matter what the Local inference toggle was set to. The picker now splits into two groups with the active one first: on-device models and Cloud tiers. Both groups stay visible, so you can see what runs locally next to what Cloud offers.
How
ACP has no
disabledflag on a select option, so "non-selectable" is enforced by the agent rather than the client:build_config_options_forbuilds twoSessionConfigSelectGroups, active first. The inactive group's name carries a hint ("turn on/off Local inference to use") and each of its options is described as unavailable in the current mode.handle_set_session_config_optionrefuses a pick whose inference kind does not match the active mode: it returns the unchanged options so the picker snaps back and posts a status telling the user which toggle to flip.Tests
acp_model_picker_groups_by_inference_kindandmodel_kind_of_follows_the_cloud_prefix.acp_config_option_labels_show_context_windowadapted to the grouped shape, and the integration assertion inacp_permissions.rsupdated to the new wording.cargo fmt --check,cargo clippy --tests -- -D warnings, andcargo test --lockedall pass (604 tests).