Skip to content

fix(acp): forward Claude Code model picker selection to the adapter - #10675

Merged
alexhancock merged 1 commit into
aaif-goose:mainfrom
kojiromike:fix/claude-acp-model-picker-10669
Jul 27, 2026
Merged

fix(acp): forward Claude Code model picker selection to the adapter#10675
alexhancock merged 1 commit into
aaif-goose:mainfrom
kojiromike:fix/claude-acp-model-picker-10669

Conversation

@kojiromike

Copy link
Copy Markdown
Contributor

Problem

The Claude Code (ACP) provider's model picker was display-only. goose read the adapter-advertised Model config option to populate the dropdown, but whatever you selected never reached claude-agent-acp — it kept using whatever its own config dictated (env / ~/.claude/settings.json / /model). The UI showed one model while a different one served the session.

Root cause

claude_acp.rs built its AcpProviderConfig with model_config_option_id: None. The generic ACP provider only pushes a model choice to the agent (via session/set_config_option) when that id is Some; with None, apply_model_if_changed short-circuits and sends nothing.

Fix

I verified against the installed adapter (@agentclientprotocol/claude-agent-acp) that it advertises the model as a select config option with id "model" (MODEL_CONFIG_ID), and its setSessionConfigOption handler applies the value via query.setModel(...) (with a resolveModelPreference fallback for non-exact values). So the adapter fully supports model changes over ACP.

Wire the picker's selection through by setting model_config_option_id: Some("model"), mirroring the Copilot provider — the only one that previously wired this up.

Testing

cargo check -p goose passes. The apply_model_if_changed behavior is already covered by generic tests in acp/provider.rs; this is a one-line config change with no new branching to test (Copilot's identical config is likewise untested at the provider level).

Fixes #10669

The claude-acp provider built its AcpProviderConfig with
model_config_option_id: None, so apply_model_if_changed short-circuited
and never sent session/set_config_option. The model picker was
display-only: goose read the adapter's advertised Model config option to
populate the dropdown, but the selection never reached
claude-agent-acp, which kept using whatever model its own config
dictated.

The adapter advertises the model as a select config option with id
"model" (MODEL_CONFIG_ID) and its setSessionConfigOption handler
applies it via query.setModel, so wire the selection through by setting
model_config_option_id: Some("model"), mirroring the Copilot provider.

Fixes aaif-goose#10669

Assisted-by: Claude Code

@samrusani samrusani 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.

Verified against the current claude-agent-acp adapter: it advertises the model config option as model, and setSessionConfigOption applies it through query.setModel. Goose's existing apply_model_if_changed_sends_set_config_option_on_change regression passes with this wiring, and the provider now activates that tested path. I also confirmed the patch is limited to the Claude ACP provider and the applicable CI is green. LGTM.

@alexhancock
alexhancock merged commit 64b10ce into aaif-goose:main Jul 27, 2026
24 checks passed
@kojiromike
kojiromike deleted the fix/claude-acp-model-picker-10669 branch July 27, 2026 20:38
lifeizhou-ap added a commit that referenced this pull request Jul 28, 2026
* main: (28 commits)
  chore(deps): bump postcss from 8.5.10 to 8.5.23 in /documentation (#10721)
  chore(deps-dev): bump js-yaml from 4.2.0 to 4.3.0 in /documentation (#10735)
  chore(deps): bump fast-uri from 3.1.2 to 3.1.4 in /documentation (#10647)
  chore(deps): bump svgo from 3.3.3 to 3.3.4 in /documentation (#10646)
  chore(deps): bump docker/login-action from 4.4.0 to 4.5.1 (#10670)
  chore(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 (#10671)
  chore(deps): bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.1 (#10674)
  fix(providers): update DeepSeek model names to v4 API (#10729)
  fix(acp): forward Claude Code model picker selection to the adapter (#10675)
  fix(acp): forward Pi model selection to the adapter (#10707)
  fix(config): preserve enabled flag when migrating platform extensions (#10690)
  fix(acp): pass session working_dir to on_call_tool (#10689)
  fix(security): preserve adversary tool arguments (#10529)
  fix(local-inference): keep XML snippets inside JSON as data (#10606)
  fix: sync generated chat title in header (#10578)
  feat: tab completion and switch provider for `model` (#10585)
  fix(telegram): prompt for tool approval in gateway sessions (#10613)
  fix: keep CLI provider prompts out of process arguments (#10547)
  fix(providers): ignore stale inventory for static model lists (#10591)
  fix(ui): Refine dark theme message surfaces for consistent, compliant dark mode UX. (#10693)
  ...
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.

Claude Code (ACP) model picker is a silent no-op — selection never reaches the adapter

3 participants