Files
codex/codex-rs/config
arnavpatidar-OAI ed3678a2a9 Reuse discovered OAuth for managed gateway inference (#65157)
## Why

Gateway enrollment required an explicit `[gateway.auth]` block even when
Codex could discover the OAuth settings while loading managed policy.
Frozen policy snapshots also dropped the discovered settings before
Codex configured the inference provider.

## What changed

Make `[gateway.auth]` optional. When it is omitted, use the OAuth
settings retained in the policy snapshot to configure the inference
provider, provided the snapshot matches the configured gateway enrollment.

## Testing

Add a regression test that compares the provider built from a frozen
snapshot with the provider built from explicit OAuth settings. The test
also verifies that changing the gateway root leaves the new provider
without the previous gateway's OAuth settings and fails the managed
policy check.

GitOrigin-RevId: a8734b3c98f50c9c9ef1917eb8c1d12548cbc271
2026-12-02 03:47:01 +00:00
..