feat(events): expose native tool call ids - #7189
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesNative tool execution now separates provider call IDs from locally generated message IDs. Started, error, and finished tool usage events report provider IDs when available. Tests cover successful, failed, and missing-ID execution paths. Native tool call ID propagation
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This PR adds an optional native tool-call correlation ID to lifecycle events while preserving existing execution behavior and backward compatibility; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue Full details: Out of Scope Changes checkExplanation The production and test changes support the linked issue. Updates to agent_utils.py and experimental/agent_executor.py cover additional native event emit sites and are related to the requested correlation behavior. No unrelated changes are evident. ✨ Finishing Touches🧪 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 |
|
@z2Ace0107 Thanks for picking this up ,the coverage is broader than I described. I pointed only at
The new call_id is therefore sometimes the provider's id and sometimes a value CrewAI invented, with nothing distinguishing them. The synthesized branch derives from Smallest fix (my own suggestion): populate Do the new tests cover the no-provider-id path? From the diff they look like they exercise cases where an id is present Also, I've accidentally closed the issue by mistake.. Could a maintainer flip back open #7178? It shouldn't read as resolved while this is still in review. |
Fixes #7178
Summary
call_idfield toToolUsageEvent.This allows event consumers to correlate a tool execution with the model tool call that initiated it.
Verification
Additional context
This PR was prepared with AI assistance. I reviewed the changed implementation and tests. Please apply the required
llm-generatedlabel.