Skip to content

Keep probing ACP model efforts after one model fails - #4149

Merged
ymichael merged 1 commit into
get-bb:mainfrom
Danielalnajjar:fix/acp-model-catalog-partial-probe
Sep 26, 2026
Merged

ymichael merged 1 commit into
get-bb:mainfrom
Danielalnajjar:fix/acp-model-catalog-partial-probe

Conversation

@Danielalnajjar

@Danielalnajjar Danielalnajjar commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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 with session/set_config_option, one model at a time, all inside a single try. The first switch that fails ends the loop, and the catch returns the partial result as if it were complete. buildModelCatalogFromConfigOptions then gives every model it did not reach the single medium fallback ("Reasoning effort is managed by the connected ACP agent."), and that catalog is stored in provider_model_catalogs with 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:

probe default 53ms default,low,medium,high,xhigh,max
probe sonnet 11ms default,low,medium,high,xhigh,max
probe claude-fable-5-1[1m] 344ms {"code":-32603,"message":"Internal error","data":{"details":"API error: 429 ... rate_limit_error ..."}}
probe opus 1ms default,low,medium,high,xhigh,max
probe haiku 1ms default,low,medium,high,xhigh,max

Opus and Haiku accept the full effort set, but BB stops at the Fable 429 and lists only medium for all three.

What changed

  • bridge.ts: each model's probe has its own try. A failed probe writes acp 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: discoverAcpNativeReasoningByModel now returns an empty map instead of null when there is nothing to probe, and loadSessionDiscoveredModels always 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_VALUE makes the probe fail for one model value, so the test can reproduce this.

No wire change; HOST_DAEMON_PROTOCOL_VERSION is unchanged. No CLI or docs changes.

How you verified

  • New bridge.test.ts case: three models, with the probe failing for the second. The third keeps low/medium/high, and only the failed model gets the fallback. On main the test fails, because the third model gets the fallback too.
  • CI on this head passes, including the package and integration test jobs.

Fixes #4154

AGENT GENERATED

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
Danielalnajjar force-pushed the fix/acp-model-catalog-partial-probe branch from c3cdf65 to aad8a30 Compare September 23, 2026 08:27
@ymichael
ymichael merged commit 5625c94 into get-bb:main Sep 26, 2026
16 checks passed
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.

ACP model catalog: one failed reasoning probe drops efforts for every later model

2 participants