Skip to content

fix: preserve canonical chat completions providerData fields#1064

Merged
seratch merged 1 commit intomainfrom
fix/chatcompletions-providerdata-filtering
Mar 5, 2026
Merged

fix: preserve canonical chat completions providerData fields#1064
seratch merged 1 commit intomainfrom
fix/chatcompletions-providerdata-filtering

Conversation

@seratch
Copy link
Copy Markdown
Member

@seratch seratch commented Mar 5, 2026

This pull request fixes the Chat Completions converter so provider-specific metadata can still flow through without overwriting the canonical message and tool-call envelopes that the SDK constructs. It adds reserved-key filtering for content parts, message-level providerData, built-in file_search_call replay, function call replay, and function call results, and adds regression coverage for both the helper and the converter paths. The behavior change is intentionally narrow: extra providerData is still preserved, but fields such as role, content, tool_calls, nested function name, nested function arguments, and tool result tool_call_id can no longer silently replace the SDK-authored values.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: b8b6723

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@openai/agents-openai Patch
@openai/agents Patch
@openai/agents-core Patch
@openai/agents-realtime Patch
@openai/agents-extensions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added this to the 0.5.x milestone Mar 5, 2026
@seratch seratch merged commit a5bce45 into main Mar 5, 2026
6 checks passed
@seratch seratch deleted the fix/chatcompletions-providerdata-filtering branch March 5, 2026 22:54
@seratch seratch modified the milestones: 0.5.x, 0.6.x Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant