Repository navigation
Keep probing ACP model efforts after one model fails - #4149
Merged
ymichael merged 1 commit intoSep 26, 2026
Merged
Conversation
3 tasks done
The ACP reasoning probe ran every session/set_config_option call inside one try, so the first failing call stopped the loop and the partial map was kept as if it were complete. Every model after the failed one fell back to the single "medium" effort. A 429 on one Claude model wiped the effort lists of the models probed after it. Each probe now fails on its own: the failure is logged to stderr with the model id and the remaining models are still probed. When the discovery timeout fires, the loop stops quietly as before. With the outer catch gone, discovery always yields a map (empty when there is no model option), so the caller's null branch is removed; an empty map builds the same catalog. The fake ACP agent gains FAKE_ACP_SET_CONFIG_MODEL_ERROR_VALUE to fail the probe for one model value, and a bridge test covers three models where the second probe fails and the third still gets low/medium/high. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Danielalnajjar
force-pushed
the
fix/acp-model-catalog-partial-probe
branch
from
September 23, 2026 08:27
c3cdf65 to
aad8a30
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.
Human comments
I added some of my other claude subs to the bb picker as individual acp providers and I noticed that could only select medium reasoning for opus when I hit my Fable rate limit with a subscription.
What was wrong
discoverAcpNativeReasoningByModel(packages/provider-bridge-acp/src/bridge/bridge.ts) learns each model's reasoning efforts by switching the session to that model withsession/set_config_option, one model at a time, all inside a singletry. The first switch that fails ends the loop, and thecatchreturns the partial result as if it were complete.buildModelCatalogFromConfigOptionsthen gives every model it did not reach the singlemediumfallback ("Reasoning effort is managed by the connected ACP agent."), and that catalog is stored inprovider_model_catalogswith no error.With Claude Code's ACP agent (claude-agent-acp 0.70.0), switching to Fable makes an API call, and it fails with a 429 when the account has used up its Fable allowance. Probing in BB's order on such an account:
Opus and Haiku accept the full effort set, but BB stops at the Fable 429 and lists only
mediumfor all three.What changed
bridge.ts: each model's probe has its owntry. A failed probe writesacp bridge: ACP-native reasoning discovery for model "<id>" failed: <message>to stderr, and the remaining models are still probed. Only the failed model gets the fallback. When the discovery timeout fires, the loop stops without logging, as before.bridge.ts:discoverAcpNativeReasoningByModelnow returns an empty map instead ofnullwhen there is nothing to probe, andloadSessionDiscoveredModelsalways builds the catalog from that map. When every probe fails, the catalog is the same as before: every model gets the fallback.fake-acp-agent.mjs:FAKE_ACP_SET_CONFIG_MODEL_ERROR_VALUEmakes the probe fail for one model value, so the test can reproduce this.No wire change;
HOST_DAEMON_PROTOCOL_VERSIONis unchanged. No CLI or docs changes.How you verified
bridge.test.tscase: three models, with the probe failing for the second. The third keepslow/medium/high, and only the failed model gets the fallback. On main the test fails, because the third model gets the fallback too.Fixes #4154