Files
codex/codex-rs
Shuo c4fcff5e97 Preserve primary authentication for OAuth gateways (#65117)
## Why

When runtime authentication is enabled, a gateway endpoint outside the
supported OpenAI runtime endpoints can fail runtime URL validation before
Codex can use the configured gateway credentials.

## What changed

For valid HTTPS gateway destinations on port 443 with a usable gateway
OAuth configuration, preserve the primary API key or ChatGPT token
alongside the gateway token and skip runtime authentication. Evaluate
inference and model catalog URLs independently so supported OpenAI
endpoints still use runtime authentication and invalid endpoints still fail
validation.

## Testing

Add regression coverage for model discovery and Responses requests in
both runtime authentication modes. The tests check that gateway requests
carry both credentials, omit the runtime assertion, and skip runtime
registration. They also cover mixed inference and catalog destinations
and rejection of invalid URLs.

GitOrigin-RevId: d36d12412495c50c6643d615be8a7d72046c4d1c
2026-12-02 00:26:16 +00:00
..
…
…
…
…