Skip to content

Add trusted request-country metadata to Responses requests - #61535

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/787cd1fa7ba5d465a4eb64a92f13c79e93d9bca7
Nov 14, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Add trusted request-country metadata to Responses requests

What changed

  • Add RequestCountry for host-supplied country codes. Normalize two-letter ASCII codes to uppercase, omit the field by default, and serialize explicit unknown (XX) as null to prevent fallback to request provenance.
  • Carry request_country through thread defaults and captured step settings into Codex backend HTTP and WebSocket requests. Allow live country updates without enabling step_model_switching, and preserve WebSocket continuation reuse when the country changes.
  • Propagate the captured country to subagents, reviews, and compaction requests.

Testing

Add coverage for country validation and serialization, thread and live-turn update lifetimes, prewarm settings capture, agent inheritance and reloads, compaction and reviews, WebSocket country changes, and HTTP fallback.

## What changed

- Add `RequestCountry` for host-supplied country codes. Normalize two-letter ASCII codes to uppercase, omit the field by default, and serialize explicit unknown (`XX`) as `null` to prevent fallback to request provenance.
- Carry `request_country` through thread defaults and captured step settings into Codex backend HTTP and WebSocket requests. Allow live country updates without enabling `step_model_switching`, and preserve WebSocket continuation reuse when the country changes.
- Propagate the captured country to subagents, reviews, and compaction requests.

## Testing

Add coverage for country validation and serialization, thread and live-turn update lifetimes, prewarm settings capture, agent inheritance and reloads, compaction and reviews, WebSocket country changes, and HTTP fallback.

GitOrigin-RevId: 787cd1fa7ba5d465a4eb64a92f13c79e93d9bca7
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/787cd1fa7ba5d465a4eb64a92f13c79e93d9bca7 branch from 61c906a to 65a5410 Compare November 14, 2026 15:45
@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.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-14T15:45:06.182887Z 61c906a 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.

@copyberry
copyberry Bot merged commit 65a5410 into main Nov 14, 2026
11 of 25 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/787cd1fa7ba5d465a4eb64a92f13c79e93d9bca7 branch November 14, 2026 15:45
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026

This branch was previously deployed

1 inactive deployment
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.