fix(buzz-acp): accept id-keyed config options when resolving model switch#2795
Open
chillerno1 wants to merge 1 commit into
Open
fix(buzz-acp): accept id-keyed config options when resolving model switch#2795chillerno1 wants to merge 1 commit into
chillerno1 wants to merge 1 commit into
Conversation
…itch resolve_model_switch_method only read the configId key from session/new configOptions entries. claude-agent-acp keys its entries with id, so every entry was skipped, the desired model was never matched, and sessions fell back to the CLI default model. Accept either spelling and cover the id-keyed shape with a test mirroring the real adapter response. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: chillerno1 <gh.chiller@pm.me>
chillerno1
force-pushed
the
fix/acp-model-configid-fallback
branch
from
July 25, 2026 00:31
15eec6c to
e003191
Compare
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.
Summary
Fixes #2794. Related: #2692.
resolve_model_switch_method()reads theconfigIdkey from eachsession/newconfigOptionsentry and skips entries that lack it.claude-agent-acp(v0.61.0) keys its entries withid, so every model-category entry was skipped, the desired model never matched, and Claude Code sessions fell back to the CLI default from the user's~/.claude/settings.json. The only trace was apool::modelWARN that never reaches the per-agent log files.This is the ACP-side half of the symptom reported in #2692. The open desktop-side PRs (#2695, #2701, #2696) inject
ANTHROPIC_MODELat spawn, which masks the problem for spawn-time selection but leaves the config-option switch path broken.Changes
resolve_model_switch_method()accepts eitherconfigIdoridwhen extracting the config id. The set request is unchanged: the ACP SDK schema takesconfigIdas the request param and the adapter resolves it against itsid-keyed entries, so only the read side needed fixing.id-keyedconfigOptionspayload mirroring the real adapter response (includingmodels: null, so the unstable fallback path cannot rescue the match).extract_model_config_options()notes the key drift.Testing
cargo test -p buzz-acp --lib: 599 passed, 0 failed. The new test fails on main and passes with this change.Verified against the real adapter: a stdio JSON-RPC probe of the bundled
claude-agent-acp0.61.0 confirmssession/newreturnsid-keyed config options withopus[1m]present as a value, and the SDK'sSetSessionConfigOptionRequestschema accepts{sessionId, configId, value}as sent bysession_set_config_option().🤖 Generated with Claude Code