feat(langchain): Record run_name in on_tool_start#5925
feat(langchain): Record run_name in on_tool_start#5925alexander-alderman-webb wants to merge 4 commits intowebb/langchain/pipeline-namefrom
run_name in on_tool_start#5925Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Langchain
Other
Bug Fixes 🐛Ci
Openai
Other
Documentation 📚
Internal Changes 🔧Ai
Langchain
Openai
Other
Other
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 7.78s All tests are passing successfully. ❌ Patch coverage is 0.00%. Project has 14672 uncovered lines. Files with missing lines (1)
Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| ) | ||
|
|
||
| run_name = kwargs.get("name") | ||
| if run_name: |
There was a problem hiding this comment.
Inconsistent None check for run_name across callbacks
Low Severity
The run_name guard in on_tool_start uses a truthy check (if run_name:) whereas the equivalent check in on_chat_model_start uses if run_name is not None:. This means an empty-string run_name would be recorded as GEN_AI_PIPELINE_NAME for chat model spans but silently dropped for tool spans, creating inconsistent behavior across callback methods for the same field.


Description
Issues
Reminders
tox -e linters.feat:,fix:,ref:,meta:)