mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why Setting custom OAuth scopes or a client ID for a managed gateway required hard-coding the authorization and token URLs, even when the server published them through discovery. ## What changed Omit both `authorization_url` and `token_url` in `[gateway.auth]` or `[config_server.oauth]` to discover the endpoints while configuring `client_id`, `scopes`, `resource`, `redirect_port`, or `device_authorization_url`. An OAuth block that relies on discovery produces an error if metadata is unavailable. Managed gateways can also set `gateway.requires_openai_auth` and `gateway.auth.delivery` for inference. For example, a gateway can use `Authorization` for the OpenAI credential and receive its OAuth token in `X-Gateway-Authorization`. Enrollment rejects configurations that would send both credentials in `Authorization`. ## Testing Add coverage for discovery overrides, missing discovery metadata, invalid OAuth settings, and gateway token delivery. GitOrigin-RevId: 84e0c219c9eb78d4be538e9131e15ab39fd597b9