Skip to content

Preserve tool metadata for OpenAI provider endpoint overrides - #48344

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/53aad6fb4d52cdfa9c79c6d92fe87383e1d0d1ef
Sep 26, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Preserve tool metadata for OpenAI provider endpoint overrides

Why

Destination-only filtering stripped raw tool result metadata and MCP attribution when the built-in OpenAI provider used a custom endpoint.

What changed

Add a runtime-only include_internal_metadata grant to ModelProviderInfo and enable it for the built-in OpenAI provider. Apply the provider grant or the existing first-party HTTPS destination check to both HTTP and WebSocket Responses requests.

Keep the grant out of serialized configuration and schemas, and default it to false for providers received through remote configuration. Providers without the grant retain the existing destination filtering.

Testing

Update HTTP and WebSocket tests to expect metadata at overridden OpenAI endpoints. Cover provider grants, destination filtering, MCP attribution on requests, and the grant's exclusion from TOML serialization and configuration.

## Why

Destination-only filtering stripped raw tool result metadata and MCP attribution when the built-in OpenAI provider used a custom endpoint.

## What changed

Add a runtime-only `include_internal_metadata` grant to `ModelProviderInfo` and enable it for the built-in OpenAI provider. Apply the provider grant or the existing first-party HTTPS destination check to both HTTP and WebSocket Responses requests.

Keep the grant out of serialized configuration and schemas, and default it to false for providers received through remote configuration. Providers without the grant retain the existing destination filtering.

## Testing

Update HTTP and WebSocket tests to expect metadata at overridden OpenAI endpoints. Cover provider grants, destination filtering, MCP attribution on requests, and the grant's exclusion from TOML serialization and configuration.

GitOrigin-RevId: 53aad6fb4d52cdfa9c79c6d92fe87383e1d0d1ef
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/53aad6fb4d52cdfa9c79c6d92fe87383e1d0d1ef branch from 9464c7b to c9e2520 Compare September 26, 2026 03:49
@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 merged commit c9e2520 into main Sep 26, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/53aad6fb4d52cdfa9c79c6d92fe87383e1d0d1ef branch September 26, 2026 03:49
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2026
@mairp
mairp deployed to issue-triage September 26, 2026 03:57 — with GitHub Actions Active
@mairp
mairp deployed to issue-triage September 26, 2026 03:57 — with GitHub Actions Active
@mairp
mairp deployed to issue-triage September 26, 2026 03:57 — with GitHub Actions Active
@mairp
mairp deployed to issue-triage September 26, 2026 03:58 — with GitHub Actions Active
@creep1ng
creep1ng deployed to issue-triage September 26, 2026 04:06 — with GitHub Actions Active
@creep1ng
creep1ng deployed to issue-triage September 26, 2026 04:06 — with GitHub Actions Active
@creep1ng
creep1ng deployed to issue-triage September 26, 2026 04:06 — with GitHub Actions Active
@creep1ng
creep1ng deployed to issue-triage September 26, 2026 04:07 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — c9e25207 Deployed Sep 26, 2026 by creep1ng via Identify potential duplicates (open issues fallback) #48583
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.

6 participants