-
Notifications
You must be signed in to change notification settings - Fork 578
feat(openai-agents): Set system instruction attribute #5355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| "type": "text", | ||
| "content": system_instructions, | ||
| } | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System instruction format uses wrong key name
Medium Severity
The _transform_system_instruction function and TextPart TypedDict use "content" as the dictionary key, but the OpenTelemetry semantic conventions and the rest of the codebase use "text". The docstring example for GEN_AI_SYSTEM_INSTRUCTIONS shows {"type": "text", "text": "..."}, and existing code in utils.py, anthropic.py, and langchain.py all use the "text" key. This inconsistency means the telemetry data won't conform to the OTel structure as intended by the PR.
Additional Locations (1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
um check the link in the PR description.
Description
Set the system instruction attribute, conforming to OTtel structure:
https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-system-instructions
Issues
Reminders
tox -e linters.feat:,fix:,ref:,meta:)