Skip to content

Support new TaskSpanData and TurnSpanData from openai-agents 0.14#1888

Merged
alexmojaki merged 28 commits into
mainfrom
add-openai-agents-task-turn-span-data
May 8, 2026
Merged

Support new TaskSpanData and TurnSpanData from openai-agents 0.14#1888
alexmojaki merged 28 commits into
mainfrom
add-openai-agents-task-turn-span-data

Conversation

@alexmojaki

Copy link
Copy Markdown
Collaborator

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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 28, 2026

Copy link
Copy Markdown

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 424b2f8
Status: ✅  Deploy successful!
Preview URL: https://426c0629.logfire-docs.pages.dev
Branch Preview URL: https://add-openai-agents-task-turn.logfire-docs.pages.dev

View logs

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Base automatically changed from update-deps-2026-04-28 to main April 28, 2026 13:54
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.
Comment thread tests/conftest.py Outdated
Comment thread tests/otel_integrations/test_openai_agents.py Outdated
devin-ai-integration[bot]

This comment was marked as resolved.

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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@alexmojaki alexmojaki merged commit b2bc308 into main May 8, 2026
19 checks passed
@alexmojaki alexmojaki deleted the add-openai-agents-task-turn-span-data branch May 8, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant