Skip to content

ACP model discovery stores reasoning levels from a config reply that describes a different model #6871

Closed

Description

@dimiboi

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 main at ba6e3c8.
  • Built-in provider acp-opencode, OpenCode 2.2.5 (opencode acp), workspace-scoped model catalogue.
  • 8 models in OpenCode's model option. lmstudio/recursivesi/flint (thought_level: medium, default) comes right after lmstudio/prism-ml/bonsai-27b (no thought_level option).

Steps to reproduce

  1. Use acp-opencode with an OpenCode config whose model list has a model with a thought_level option directly after one without (Flint after bonsai here).
  2. 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
  3. 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_option reply whose currentValue differs 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, inside discoverAcpNativeModelSupport (L1279).
  • A reply with no thought_level option becomes known + [] + 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-opencode uses modelCatalogScope: "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 from session/new, not a switch, which is why an environment flips to correct once a Flint thread starts there.
  • How measured: repeated bb provider models reads and the probe script. No model inference is involved in either.
  • The resulting Workflows rejection, from an environment whose catalogue was empty: bb workflows validate on agent("…", {provider: "acp-opencode", model: "lmstudio/recursivesi/flint", reasoningLevel: "medium"}) failed 3 of 3 with Unsupported reasoning level for literal workflow selection acp-opencode/lmstudio/recursivesi/flint/medium.

What you ruled out

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

AGENT GENERATED

Activity

  1. added theissue type on Nov 2, 2026
  2. added
    providers
    provider-acp
    confirmed-repro
    on Nov 2, 2026
  3. bb-slop-cop commented on Nov 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Low; labels providers, provider-acp, confirmed-repro. All classifications were previously unset; no existing values were replaced.
    • Report: https://get-bb.github.io/reports/issues/6871.html — REPRODUCED, root-cause confidence high.
    • Root cause: ACP discovery stores a reply's reasoning and service-tier support under the requested model without confirming the model identified by the reply.
    • Verification: Four bridge-boundary regressions fail on unchanged trusted main in two clean checkouts and pass after the fix. The owning package's 572 tests, lint, and typecheck pass; four tests skip. Strict recorded ACP parity passes. External agent race frequency was not measured.
    • Fix: Ready PR Confirm ACP model identity before recording discovery support #6874 confirms model identity, retries once, and leaves unverifiable reasoning unknown. Three files, 136 changed text lines. Not merged.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproprovider-acpproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions