Repository navigation
Fix ACP agents without reasoning levels - #1197
SawyerHood merged 3 commits into
Conversation
|
🚨 SLOP COP 🚨 · I am the SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and end-to-end behavior. |
…s-cannot-declare-they-have-no-thr_i9w6rbhu5c # Conflicts: # packages/host-daemon-contract/test/contract.test.ts
SawyerHood
left a comment
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
ELI5
This change lets an ACP agent hide a reasoning control when the agent provides no compatible reasoning levels. That prevents bb from showing a control that does nothing.
Result
I found no blocking code, security, or performance issue. The change is small, correct, and well covered.
One low-priority documentation gap remains. The ACP configuration guide explains absent thought_level options, but it does not explain declared empty or unmapped options. Please add that case to docs/configuration.md in a later change.
Review details
-
Security: The change adds no shell, path, network, file, authentication, or trust-boundary behavior.
-
Correctness: Empty arrays pass the wire schema. The user interface and server consumers guard this state.
-
Protocol: The 82-to-83 daemon protocol update is correct because the result meaning changed.
-
Performance: The new branch adds no requests or loops. The option scan remains linear.
-
Architecture: I found no new duplicate implementation. Existing ACP fallback paths serve different discovery sources, so this change does not need a refactor.
Validation
-
The agent-runtime suite passed 833 tests.
-
The host-daemon-contract suite passed 49 tests.
-
Turbo type checks passed for both changed packages.
-
The dev app started successfully.
-
A fake custom ACP provider returned empty reasoning lists through the CLI.
-
The browser showed both fake models and correctly hid the Reasoning section.
## Reproduction An ACP agent declared a `thought_level` option with no bb-compatible values. The model catalog still returned a single `medium` level. ## Root cause The ACP catalog used its legacy fallback whenever no declared value mapped to a bb reasoning level. ## Fix Keep the fallback only when the agent omits `thought_level`. Return no supported levels when the agent declares an empty or unmappable list. Fixes get-bb#1113
Reproduction
An ACP agent declared a
thought_leveloption with no bb-compatible values. The model catalog still returned a singlemediumlevel.Root cause
The ACP catalog used its legacy fallback whenever no declared value mapped to a bb reasoning level.
Fix
Keep the fallback only when the agent omits
thought_level. Return no supported levels when the agent declares an empty or unmappable list.Fixes #1113