fix(#96): [bug] --model on a can_orchestrate entry silently strips the delegate tool - #106
Open
7487 wants to merge 2 commits into
Open
Conversation
…del-on-a-can-orchestrate-entry-sil
Author
|
Updated the branch against main (clean merge) — full test suite passes locally (480 passed, 17 skipped). Happy to adjust anything if needed. |
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.
Summary
Fixes #96 — [bug] --model on a can_orchestrate entry silently strips the delegate tool
Source issue: #96
Spec
Spec - Issue #96: [bug] --model on a can_orchestrate entry silently strips the delegate tool
Problem
Pinning an orchestrator-capable roster entry with
--modelbuilds the adapter without delegateinjection, so the same backend can delegate through the router path but silently becomes a leaf when
explicitly selected. The streaming path has the same direct adapter build and needs the same fix.
Acceptance criteria
run_once(..., model=<orchestrator>)builds the selected adapter withinject_delegate=True.run_once_stream(..., model=<orchestrator>)keeps the same delegate injection behavior.Approach
Use the selected entry's existing
can_orchestrateflag when building an explicit--modeladapter. This keeps leaf entries inert and matches the router's delegate-enabled orchestrator path
without adding another CLI flag or config field.
Files likely touched
tanglebrain/cli.py- direct model adapter construction.tests/test_cli.py- regression coverage for blocking and streaming model paths.CHANGELOG.md- unreleased bug-fix note.docs/design/api-contract.md- remove the stale known-defect entry.docs/design/operations.md- remove the stale workaround.Risk / blast radius
Test plan
unittestfor the two new regression cases; fullmake test.make test.Out of scope
--no-delegateopt-out flag.Work breakdown (TDD)
TODO - Issue #96
Setup
make teston clean branch to confirm baseline is green.tanglebrain/cli.pyand sibling streaming path.TDD loop
--modelorchestrator paths.entry.can_orchestrateinto the direct adapter build.Verification
make testpasses.Wrap-up
create-pr.shto push + open PR.Visual verification
No screenshots captured (stub or non-UI change).
Blockers / open questions
Test plan
pnpm lintpnpm typecheckpnpm testpnpm buildGenerated by the
auto-github-contributorskill. The agent followed a red-green-refactor loop and captured visual artefacts under.auto-pr/screenshots/.