fix(acp): forward Pi model selection to the adapter - #10707
Merged
alexhancock merged 1 commit intoJul 27, 2026
Conversation
The Pi ACP provider's model selection was display-only. goose read the
adapter-advertised model config option to populate the picker, but
whatever you selected never reached pi-acp — it kept using the Pi
Droid session's default model. The UI showed one model while a
different one served the session.
Root cause: pi_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: pi-acp advertises a "model" config option (MODEL_CONFIG_ID) and
applies it via setSessionModel → proc.setModel(provider, id). Wire the
selection through by setting model_config_option_id: Some("model"),
mirroring the Copilot provider — the only one that previously wired
this up. Also populate session_config_options at session creation when
a concrete model is configured, so resumed or switched sessions use the
requested model instead of the agent default.
cargo check -p goose-providers passes. The apply_model_if_changed
behavior is already covered by generic tests in acp/provider.rs; this
is a config change with no new branching to test (Copilot's identical
config is likewise untested at the provider level).
alexhancock
approved these changes
Jul 27, 2026
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) ...
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.
Problem
The Pi (ACP) provider's model selection was display-only. goose read the adapter-advertised model config option to populate the picker, but whatever you selected never reached
pi-acp— it kept using the Pi Droid session's default model. The UI (or Buzz'sset_model) showed one model while a different one served the session.Root cause
pi_acp.rsbuilt itsAcpProviderConfigwithmodel_config_option_id: None. The generic ACP provider only pushes a model choice to the agent (viasession/set_config_option) when that id isSome; withNone,apply_model_if_changedshort-circuits and sends nothing.Fix
I verified against the installed adapter (
pi-acp) that it advertises the model as a config option with id"model"(MODEL_CONFIG_ID), and itssetSessionConfigOptionhandler applies the value viasetSessionModel → proc.setModel(provider, id)(withprovider/idparsing for prefixed IDs). 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. Also populatesession_config_optionsat session creation when a concrete model is configured, so resumed or switched sessions use the requested model instead of the agent default.This is the same pattern as #10675 (which fixes the equivalent issue for the Claude Code ACP provider).
Testing
cargo check -p goose-providerspasses. Theapply_model_if_changedbehavior is already covered by generic tests inacp/provider.rs(apply_model_if_changed_sends_set_config_option_on_change,apply_model_if_changed_skips_when_model_unchanged,apply_model_if_changed_noop_without_option_id,apply_model_if_changed_skips_sentinel_model); this is a one-line config change with no new branching to test (Copilot's identical config is likewise untested at the provider level).