Support new TaskSpanData and TurnSpanData from openai-agents 0.14#1888
Open
alexmojaki wants to merge 23 commits intomainfrom
Open
Support new TaskSpanData and TurnSpanData from openai-agents 0.14#1888alexmojaki wants to merge 23 commits intomainfrom
alexmojaki wants to merge 23 commits intomainfrom
Conversation
Deploying logfire-docs with
|
| Latest commit: |
7643cdb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0e9d7174.logfire-docs.pages.dev |
| Branch Preview URL: | https://add-openai-agents-task-turn.logfire-docs.pages.dev |
Importing agents.sandbox triggers DynamicCompactionPolicy class definition inside pytest.importorskip's catch_warnings block, silencing the protected-namespace UserWarning on pydantic <2.10. The subsequent 'from agents import ...' no longer fires it because the class is already cached in sys.modules. This lets us drop the global warning filter.
Matches the surrounding pragma usage on the TranscriptionSpanData and SpeechSpanData branches above.
…test conftest.py imports from openai-agents during setup, which on pydantic <2.10 triggers the DynamicCompactionPolicy protected-namespace UserWarning. With filterwarnings=error in pyproject.toml that aborts test collection. Wrapping the import in warnings.catch_warnings() silences it without needing a global filter.
alexmojaki
commented
Apr 28, 2026
alexmojaki
commented
Apr 28, 2026
TaskSpanData and TurnSpanData (used in logfire/_internal/integrations/openai_agents.py) were introduced in openai-agents 0.14, so the existing >=0.9.0 floor was misleading. The lock file already pinned 0.14.3 and CI tested against that — this just makes the constraint match reality.
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.
Stacked on top of #1887.
Adds message templates for the new `TaskSpanData` and `TurnSpanData` span types introduced in openai-agents 0.14, and flattens the nested `data` attribute they expose so the templates can use `{name}`, `{turn}`, and `{agent_name}` directly.