Skip to content

fix(openai): capture server tool output items - #700

Merged
lmolkova merged 3 commits into
open-telemetry:mainfrom
lmolkova:fix-openai-server-tool-parts
Sep 13, 2026
Merged

lmolkova merged 3 commits into
open-telemetry:mainfrom
lmolkova:fix-openai-server-tool-parts

Conversation

@lmolkova

Copy link
Copy Markdown
Member

Maps provider-executed Responses API output items to server tool message parts instead of dropping them. Covers web search, file search, code interpreter, image generation, MCP, and server-executed tool search; Chat Completions remains unchanged because its function calls are client-executed.\n\nThe conformance cassette is synthetic and must be re-recorded.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-13 23:00 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Copilot AI 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.

🟡 Changes recommended

Tool-search IDs do not correlate correctly, lifecycle states are misreported, and several claimed mappings lack tests.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Captures OpenAI Responses API server-side tool output in GenAI output messages.

Changes:

  • Maps hosted tool calls and responses to server-tool message parts.
  • Adds unit and conformance coverage with a synthetic cassette.
  • Adds a changelog fragment.
File summaries
File Description
response_extractors.py Adds server-tool output extraction.
test_response_extractors.py Tests server-tool mappings.
test_conformance.py Registers the new scenario.
responses_server_tool_calling.py Validates web-search telemetry.
responses_server_tool_calling_conformance.yaml Provides synthetic API replay data.
.changelog/700.fixed Documents the fix.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lmolkova
lmolkova marked this pull request as ready for review September 12, 2026 20:31
@lmolkova
lmolkova requested a review from a team as a code owner September 12, 2026 20:31
@lmolkova
lmolkova added this pull request to the merge queue Sep 13, 2026
Merged via the queue into open-telemetry:main with commit 76cec71 Sep 13, 2026
75 checks passed
@lmolkova
lmolkova deleted the fix-openai-server-tool-parts branch September 13, 2026 22:40
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.

3 participants