fix(moa): preserve caller tool schemas - #1344
Conversation
Co-authored-by: michaelneale <14976+michaelneale@users.noreply.github.com> Signed-off-by: michaelneale <14976+michaelneale@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughTool selection no longer filters tools by prompt text. Query and tool-result paths preserve all caller-provided tools unless ChangesTool selection behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change preserves caller-provided tool schemas while retaining explicit forced subsets, with regression coverage for the affected multi-turn workflow; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Caller
participant QueryHandling
participant ToolSelection
participant ReducerContextPacking
Caller->>QueryHandling: provide tools or allowed_tools
QueryHandling->>ToolSelection: derive selected tools
ToolSelection-->>QueryHandling: all tools or allowed subset
QueryHandling->>ReducerContextPacking: pass selected tool schemas
ReducerContextPacking-->>Caller: packed context with selected schemas
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
tool_choicebehavior as a single-tool subsetread_file->read_file->write_fileregressionWhy
MoA's schema relevance classifier recognized
write,file_write, andedit_file, but not the common schema namewrite_file. A read-then-write workflow therefore gave the actor onlyread_file; after each tool result the recent read chain stayed selected and the reducer genuinely could not callwrite_file.Tool availability is an API contract, not something MoA should infer from prompt wording. This deletes that heuristic class rather than adding another alias.
Verification
At commit
e8dc0e8d216a543fb22ed856696838e7b5a88ae2:cargo test -p mesh-mixture-of-agents(174 unit tests plus complete crate integration/doc suite; 10 network/cost tests remain explicitly ignored)cargo clippy -p mesh-mixture-of-agents --all-targets -- -D warningscargo fmt --checkgit diff --checkSummary by CodeRabbit