Skip to content

fix: #1121 expose model request IDs on raw responses#2552

Merged
seratch merged 4 commits intomainfrom
fix/model-response-request-id
Feb 26, 2026
Merged

fix: #1121 expose model request IDs on raw responses#2552
seratch merged 4 commits intomainfrom
fix/model-response-request-id

Conversation

@seratch
Copy link
Member

@seratch seratch commented Feb 26, 2026

This pull request fixes #1121 missing request ID propagation for model responses so callers can inspect result.raw_responses[*].request_id after OpenAI Responses runs, including HTTP streaming runs.

It updates ModelResponse to carry an optional request_id, propagates the OpenAI SDK _request_id field through the non-streaming and HTTP streaming Responses paths, and persists that data through RunState serialization. The streaming implementation keeps compatibility with custom clients and test doubles that only implement responses.create() by falling back to the previous path when with_streaming_response is unavailable.

This change intentionally does not add a run-level last_request_id convenience API, since a single agent run may include multiple model calls and raw_responses already exposes each call individually. It also does not synthesize success request IDs for the websocket transport path because that metadata is not exposed the same way there.

@seratch seratch added this to the 0.10.x milestone Feb 26, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b550bc4c2

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba70901545

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7911216d75

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch seratch merged commit 159beb5 into main Feb 26, 2026
9 checks passed
@seratch seratch deleted the fix/model-response-request-id branch February 26, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requesting x-request-id from the API Response

1 participant