Skip to content

Group the ACP model picker by inference type - #265

Merged
setoelkahfi merged 1 commit into
developmentfrom
feature/model-picker-inference-groups
Oct 26, 2026
Merged

setoelkahfi merged 1 commit into
developmentfrom
feature/model-picker-inference-groups

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

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 disabled flag on a select option, so "non-selectable" is enforced by the agent rather than the client:

  • build_config_options_for builds two SessionConfigSelectGroups, 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_option refuses 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.
  • The current model stays selected even when it falls in the inactive group right after a toggle flip, since flipping never switches or loads a model.
  • Copy changed from "highlighted" to "selectable" across the toggle descriptions and status messages. The TUI path is left as-is.

Tests

  • New acp_model_picker_groups_by_inference_kind and model_kind_of_follows_the_cloud_prefix.
  • acp_config_option_labels_show_context_window adapted to the grouped shape, and the integration assertion in acp_permissions.rs updated to the new wording.
  • cargo fmt --check, cargo clippy --tests -- -D warnings, and cargo test --locked all pass (604 tests).

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>
@setoelkahfi setoelkahfi self-assigned this Oct 26, 2026
@setoelkahfi
setoelkahfi requested a review from paydii October 26, 2026 14:55

@sigit-code-review sigit-code-review Bot 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.

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

@setoelkahfi
setoelkahfi merged commit 0600bed into development Oct 26, 2026
16 of 18 checks passed
@setoelkahfi
setoelkahfi deleted the feature/model-picker-inference-groups branch October 26, 2026 18:39
@setoelkahfi setoelkahfi added this to the v1.7.6 milestone Oct 26, 2026
@keypair34 keypair34 mentioned this pull request Oct 27, 2026
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.

2 participants