feat(autogen): add AG2-019, ambiguous tool name - #106
Open
bradAGI wants to merge 1 commit into
Open
Conversation
Ports the ambiguous-name check to autogen. Claude SDK (CSDK-007), OpenAI (OAI-007), ADK (ADK-007), and MCP (MCP-003) all ship it; the five newer packs had none. The tool name sits directly beside the description in what the model sees, so it is half the selection signal, and a generic verb like process or handle spends that half on nothing.
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.
Ports the ambiguous-name check to AutoGen. Claude SDK (CSDK-007), OpenAI (OAI-007), ADK (ADK-007), and MCP (MCP-003) all ship it; the newer packs had none.
The tool name sits directly beside the description in what the model sees, so it is half the selection signal — and a generic verb like
processorhandlespends that half on nothing. Each wrong pick costs a full round of the conversation — propose, execute, reply — so an ambiguous name spends the AG2-004max_roundbudget rather than the chat reaching an answer.Same
name_inlist as CSDK-007, so behavior stays consistent across packs.Verification — engine built at
main:Fire (tool named
process): includesAG2-019Silent (same tool renamed
summarize_invoice):AG2-019absentA note on scope. I drafted a fifth rule in this batch for the Vercel AI SDK and dropped it after testing:
ToolDef.Nameis deliberately empty forvercel_ai_tool, because the SDK derives a tool's name from the key in thetools: { ... }record rather than from thetool({...})call. The engine asserts this directly —so every name-based predicate (
name_in,name_has_prefix) is structurally inert for that pack — it also blocks a Vercel idempotency rule, which is why the pack has none. Back-fillingNamefrom the record key at discovery time would unblock both. Happy to open that engine PR if it'd be useful.Paired engine PR follows, mirroring the rule into
testdata/rules-fixture/with fire/silent cases.