Skip to content

[agents] Reject unpaired function outputs in Chat Completions - #4699

Merged
apcha-oai merged 1 commit into
mainfrom
apcha/agents-optional-call-id
Aug 27, 2026
Merged

[agents] Reject unpaired function outputs in Chat Completions#4699
apcha-oai merged 1 commit into
mainfrom
apcha/agents-optional-call-id

Conversation

@apcha-oai

Copy link
Copy Markdown
Collaborator

Summary

openai/openai-python#3738 makes Responses function-output call IDs optional. These outputs can represent unpaired external context, while Chat Completions tool messages still need to identify the call they answer.

This pull request preserves unpaired outputs on the Responses path and gives callers an actionable error when they try to convert them to Chat Completions, directing them to a Responses model. Existing outputs with a call ID are unchanged. This lets the Agents SDK adopt the updated Python SDK types before that PR lands without inventing IDs, dropping context, or silently changing message roles.

The check stays inside the Chat Completions converter and applies to both streaming and non-streaming requests, regardless of strict feature validation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-26T23:54:00.864958Z de1fa4a PR opened
🔒 Security Review Completed 2026-08-26T23:53:59.822199Z de1fa4a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@apcha-oai
apcha-oai enabled auto-merge (squash) August 27, 2026 00:03
@apcha-oai
apcha-oai merged commit 10cdae4 into main Aug 27, 2026
18 checks passed
@apcha-oai
apcha-oai deleted the apcha/agents-optional-call-id branch August 27, 2026 00:05
@seratch seratch added this to the 0.22.x milestone Aug 27, 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.

2 participants