Repository navigation
Description
Summary
To build an ACP provider's model catalogue, bb switches a discovery session through each model with session/set_config_option and stores the reply's thought_level option as that model's reasoning levels. It never checks that the reply's model currentValue is the model it asked for. OpenCode 2.2.5 sometimes replies with the previously selected model's options (anomalyco/opencode#60316), so bb stores one model's reasoning levels under another. With OpenCode and LM Studio's Flint, Flint's catalogue entry flips between medium, default and the known-empty shape behind #6792; other models get wrong levels too.
Versions and environment
- bb 0.48.1 (desktop app), macOS 26.6.1. The code path is unchanged on
mainat ba6e3c8. - Built-in provider
acp-opencode, OpenCode 2.2.5 (opencode acp), workspace-scoped model catalogue. - 8 models in OpenCode's
modeloption.lmstudio/recursivesi/flint(thought_level:medium, default) comes right afterlmstudio/prism-ml/bonsai-27b(nothought_leveloption).
Steps to reproduce
- Use
acp-opencodewith an OpenCode config whose model list has a model with athought_leveloption directly after one without (Flint after bonsai here). - Run this several times, in a few projects or environments, and read Flint's
supportedReasoningEfforts:bb provider models acp-opencode --project <project-id> --selected-model lmstudio/recursivesi/flint --json
- To see the agent-side cause without bb, run the probe script from ACP: session/set_config_option reply can describe the previously selected model anomalyco/opencode#61302 (closed as a duplicate of ACP: set_config_option can answer with the previous selection when the switch echo lands late anomalyco/opencode#60316). It reports each
set_config_optionreply whosecurrentValuediffers from the requested model.
Did not reproduce when Flint is probed first, straight after session/new: correct in 10 of 10 runs.
Expected vs actual
Expected: Flint always has supportedReasoningEfforts [medium, default].
Actual, repeated bb provider models reads (Flint's supportedReasoningEfforts):
sandbox project [] 6 of 6 (hours later: [medium, default] 8 of 8)
second project [medium, default] 1 of 6, [] 5 of 6
third project's env [] 4 of 4, then [medium, default] 3 of 3 after a Flint thread started there
whenever empty: reasoningDiscovery "known", defaultReasoningEffort "medium"
Direct ACP probe in bb's order (session/new, then session/set_config_option per model,
as discoverAcpNativeModelSupport does), 12 runs, reply received for Flint:
described lmstudio/prism-ml/bonsai-27b (no thought_level) 9
described lmstudio/recursivesi/flint (medium, default) 3
Other models were misattributed in the same sweeps. For example, the reply for openrouter/z-ai/glm-5.3-flash described openrouter/recursive/flint-v1.0:free. In every case the reply described the model requested just before.
Evidence
- The reply is stored under the requested model without checking
currentValue: bridge.ts#L1350-L1364, insidediscoverAcpNativeModelSupport(L1279). - A reply with no
thought_leveloption becomesknown+[]+medium: model-catalog.ts#L134-L161. That is correct for bonsai, but here it is recorded for Flint. - The result differs per environment because
acp-opencodeusesmodelCatalogScope: "workspace"(known-agents.ts#L95), so each environment keeps whatever its last discovery got. A Flint thread's own session opens on Flint, and its snapshot comes fromsession/new, not a switch, which is why an environment flips to correct once a Flint thread starts there. - How measured: repeated
bb provider modelsreads and the probe script. No model inference is involved in either. - The resulting Workflows rejection, from an environment whose catalogue was empty:
bb workflows validateonagent("…", {provider: "acp-opencode", model: "lmstudio/recursivesi/flint", reasoningLevel: "medium"})failed 3 of 3 withUnsupported reasoning level for literal workflow selection acp-opencode/lmstudio/recursivesi/flint/medium.
What you ruled out
- Not a duplicate of Workflows rejects inherited settings for models with no configurable reasoning levels #6792 / PR fix(workflows): accept native reasoning defaults #6793. That fix makes Workflows accept a known-empty list. Here the list itself is wrong: fix(workflows): accept native reasoning defaults #6793 would accept Flint's misattributed entry but leave other models with another model's levels.
- Not ACP model catalog: one failed reasoning probe drops efforts for every later model #4154 (one failed probe drops later models' efforts): no probe fails here; replies succeed but describe a different model.
- Not ACP-native model discovery overwrites the agent's saved default model (probe never restores the original selection) #4478 (the probe never restores the selection): a different effect of the same loop.
- Still present on
mainat ba6e3c8. - The agent-side race is ACP: set_config_option can answer with the previous selection when the switch echo lands late anomalyco/opencode#60316. It reproduces on 2.2.5 with all plugins and MCP servers removed (data in ACP: session/set_config_option reply can describe the previously selected model anomalyco/opencode#61302).
Suggested fix
After each session/set_config_option, compare the reply's model currentValue with model.value. On a mismatch, request again once, and if it still disagrees, leave that model's reasoning unknown instead of storing the reply. This also protects against any other ACP agent that replies before applying a switch.
Suggested priority and effort
Medium: wrong reasoning levels for several models in pickers and Workflows validation, for any ACP agent that answers before applying a switch. Workaround for the empty-list case only: a custom ACP profile with nativeReasoning. Effort probably low.
Checks
- Reproduced on 0.48.1; the code is unchanged on
mainat ba6e3c8. - Searched open and closed issues (closest: Workflows rejects inherited settings for models with no configurable reasoning levels #6792, ACP model catalog: one failed reasoning probe drops efforts for every later model #4154, ACP-native model discovery overwrites the agent's saved default model (probe never restores the original selection) #4478).
- Agent-written; investigated in bb thread thr_8x465ahdr2.
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 2, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-acp,confirmed-repro. All classifications were previously unset; no existing values were replaced.