Add gateway enrollment to local managed requirements (#63476)

## Why

Administrators who use one gateway for managed configuration and model
requests need to configure the gateway URL and OAuth settings in two
places. A single enrollment keeps those settings together.

## What changed

Accept `[gateway]` with a base URL and `[gateway.auth]` in system
`requirements.toml` or MDM. Use the same OAuth settings for the config
server at the gateway root and the required Responses API provider at
`/v1`, with model discovery at `/v1/models`.

MDM enrollment replaces system enrollment as a unit. Requirements
composition rejects remote enrollment, conflicting config server or
provider settings, and empty or reserved provider names.

## Testing

Add composition tests for MDM precedence, remote enrollment and
rerouting attempts, and invalid or conflicting enrollment settings.

GitOrigin-RevId: 35f04481dc2b592e25afa4ac9235481cd90cf915
This commit is contained in:
arnavpatidar-OAI
2026-11-24 00:14:14 +00:00
committed by copyberry
parent f103339a79
commit 8bb8ed6bab
16 changed files with 303 additions and 24 deletions
+1
View File
@@ -5,6 +5,7 @@ mod telemetry;
pub use crate::provider::Provider;
pub use crate::provider::RetryConfig;
pub use crate::provider::is_azure_provider_name;
pub use crate::retry::RetryOn;
pub use crate::retry::RetryOperation;
pub use crate::retry::RetryPolicy;
+5
View File
@@ -10,6 +10,11 @@ use std::collections::HashMap;
use std::time::Duration;
use url::Url;
/// Whether the provider name alone identifies Azure, regardless of the endpoint URL.
pub fn is_azure_provider_name(name: &str) -> bool {
name.eq_ignore_ascii_case("azure")
}
/// High-level retry configuration for a provider.
///
/// This is converted into a `RetryPolicy` used by `codex-client` to drive