Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3b14dad
chore: Update dependencies
alexmojaki Apr 28, 2026
7a051c8
chore: Remove unnecessary pyright ignores after pyarrow upgrade
alexmojaki Apr 28, 2026
3a9f992
chore: Update test snapshots after dependency upgrade
alexmojaki Apr 28, 2026
2d03b06
test: Use IsStr for non-deterministic fields in openai-agents tests
alexmojaki Apr 28, 2026
0e08695
test: Ignore deprecation warning for older claude models in cassettes
alexmojaki Apr 28, 2026
c4bbf6f
Support new TaskSpanData and TurnSpanData from openai-agents 0.14
alexmojaki Apr 28, 2026
1e8e2c2
Flatten data attributes for TaskSpanData and TurnSpanData
alexmojaki Apr 28, 2026
ce25718
test: Ignore pydantic protected namespace warning from openai-agents
alexmojaki Apr 28, 2026
0124a23
Revert "Flatten data attributes for TaskSpanData and TurnSpanData"
alexmojaki Apr 28, 2026
2199529
Revert "Support new TaskSpanData and TurnSpanData from openai-agents …
alexmojaki Apr 28, 2026
78b59ad
test: Add TaskSpanData and TurnSpanData to expected SpanData subclasses
alexmojaki Apr 28, 2026
fc630a7
Explain the model_info warning filter in more detail
alexmojaki Apr 28, 2026
828af73
Support new TaskSpanData and TurnSpanData from openai-agents 0.14
alexmojaki Apr 28, 2026
cd30b26
Flatten data attributes for TaskSpanData and TurnSpanData
alexmojaki Apr 28, 2026
08368f6
Merge main into add-openai-agents-task-turn-span-data
alexmojaki Apr 28, 2026
964865c
test: Replace model_info warning filter with deeper importorskip target
alexmojaki Apr 28, 2026
32a8aee
Mark always-true isinstance check as no-branch for coverage
alexmojaki Apr 28, 2026
1a3bb61
test: Silence model_info warning during agents.tracing import in conf…
alexmojaki Apr 28, 2026
67f34b2
Revert "test: Silence model_info warning during agents.tracing import…
alexmojaki Apr 28, 2026
73814f4
Revert "test: Replace model_info warning filter with deeper importors…
alexmojaki Apr 28, 2026
39fc63d
Bump openai-agents dev dep to >=0.14.0
alexmojaki Apr 28, 2026
582f387
chore: Sync uv.lock with bumped openai-agents constraint
alexmojaki Apr 28, 2026
7643cdb
Merge branch 'main' into add-openai-agents-task-turn-span-data
alexmojaki Apr 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions logfire/_internal/integrations/openai_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from contextlib import nullcontext
from dataclasses import dataclass
from types import TracebackType
from typing import TYPE_CHECKING, Any, Generic, TypeVar
from typing import TYPE_CHECKING, Any, Generic, TypeVar, cast

import agents
from agents import (
Expand All @@ -27,7 +27,7 @@
TranscriptionSpanData,
)
from agents.models.openai_responses import OpenAIResponsesModel
from agents.tracing import ResponseSpanData, response_span
from agents.tracing import ResponseSpanData, TaskSpanData, TurnSpanData, response_span
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
from agents.tracing.scope import Scope
from agents.tracing.spans import NoOpSpan, SpanError, TSpanData
from agents.tracing.traces import NoOpTrace
Expand Down Expand Up @@ -110,6 +110,10 @@ def create_span(
msg_template = 'Speech → Text with {gen_ai.request.model!r}'
elif isinstance(span_data, MCPListToolsSpanData):
msg_template = 'MCP: list tools from server {server}'
elif isinstance(span_data, TaskSpanData):
msg_template = 'Task: {name}'
elif isinstance(span_data, TurnSpanData):
msg_template = 'Turn {turn} for agent {agent_name}'
else:
msg_template = 'OpenAI agents: {type} span'

Expand Down Expand Up @@ -382,6 +386,10 @@ def attributes_from_span_data(span_data: SpanData, msg_template: str) -> dict[st
attributes['output'] = {k: v for k, v in attributes['output'].items() if k != 'data'}
elif isinstance(span_data, FunctionSpanData):
attributes['output'] = span_data.output
elif isinstance(span_data, (TaskSpanData, TurnSpanData)):
data = attributes.pop('data', None)
if isinstance(data, dict): # pragma: no branch
attributes.update(cast('dict[str, Any]', data))
return attributes
except Exception: # pragma: no cover
log_internal_error()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ dev = [
"botocore >= 1.31.57",
"greenlet >= 3.1.1",
"pytest-xdist>=3.6.1",
"openai-agents[voice]>=0.9.0; python_version >= '3.10'",
"openai-agents[voice]>=0.14.0; python_version >= '3.10'",
"pydantic-ai-slim>=0.0.39",
"pydantic-evals>=1.0.0; python_version >= '3.10'",
"langchain>=0.0.27",
Expand Down
Loading
Loading