Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion src/agents/mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ async def cleanup(self):
async with self._cleanup_lock:
try:
await self.exit_stack.aclose()
self.session = None
except Exception as e:
logger.error(f"Error cleaning up server: {e}")
finally:
self.session = None
Comment on lines +142 to +143
Copy link
Member Author

Choose a reason for hiding this comment

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

codex found this unrelated bug



class MCPServerStdioParams(TypedDict):
Expand Down
6 changes: 6 additions & 0 deletions src/agents/tracing/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def export(self, items: list[Trace | Span[Any]]) -> None:
"OpenAI-Beta": "traces=v1",
}

if self.organization:
headers["OpenAI-Organization"] = self.organization

if self.project:
headers["OpenAI-Project"] = self.project

# Exponential backoff loop
attempt = 0
delay = self.base_delay
Expand Down
2 changes: 1 addition & 1 deletion src/agents/tracing/span_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def __init__(

@property
def type(self) -> str:
return "speech-group"
return "speech_group"

def export(self) -> dict[str, Any]:
return {
Expand Down