Skip to content

Serialize Responses routing fields before large inputs - #49675

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/dbc174e1fe7ca30d0c00f075bc37dd5f97b27b37
Sep 30, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/dbc174e1fe7ca30d0c00f075bc37dd5f97b27b37

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Serialize Responses routing fields before large inputs

Why

Gateways that inspect request bodies incrementally need routing fields before potentially multi-megabyte prompts so they can route requests without buffering the input first.

What changed

Serialize model, stream, and optional service_tier before input in both HTTP Responses requests and WebSocket response.create messages. Preserve field values and omission of unset service_tier.

Testing

Add an HTTP regression test with a 2 MiB input that checks routing field order and unchanged JSON contents. Extend WebSocket serialization coverage to assert the routing fields appear first, and check that HTTP requests omit unset service_tier.

## Why

Gateways that inspect request bodies incrementally need routing fields before potentially multi-megabyte prompts so they can route requests without buffering the input first.

## What changed

Serialize `model`, `stream`, and optional `service_tier` before `input` in both HTTP Responses requests and WebSocket `response.create` messages. Preserve field values and omission of unset `service_tier`.

## Testing

Add an HTTP regression test with a 2 MiB input that checks routing field order and unchanged JSON contents. Extend WebSocket serialization coverage to assert the routing fields appear first, and check that HTTP requests omit unset `service_tier`.

GitOrigin-RevId: dbc174e1fe7ca30d0c00f075bc37dd5f97b27b37
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/dbc174e1fe7ca30d0c00f075bc37dd5f97b27b37 branch from 6647cd9 to ed0cc1a Compare September 30, 2026 16:57
@copyberry
copyberry Bot merged commit ed0cc1a into main Sep 30, 2026
1 check failed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/dbc174e1fe7ca30d0c00f075bc37dd5f97b27b37 branch September 30, 2026 16:57
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 30, 2026

This branch was successfully deployed

1 active deployment
issue-triage — ed0cc1a4 Deployed Sep 30, 2026 by Steven2007yhq via Translate non-English issue #16421
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants