mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
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:
committed by
copyberry
parent
f103339a79
commit
8bb8ed6bab
@@ -1,14 +1,9 @@
|
||||
pub use codex_client::Provider;
|
||||
pub use codex_client::RetryConfig;
|
||||
use codex_client::is_azure_provider_name;
|
||||
|
||||
pub fn is_azure_responses_provider(name: &str, base_url: Option<&str>) -> bool {
|
||||
if name.eq_ignore_ascii_case("azure") {
|
||||
true
|
||||
} else if let Some(base_url) = base_url {
|
||||
matches_azure_responses_base_url(base_url)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
is_azure_provider_name(name) || base_url.is_some_and(matches_azure_responses_base_url)
|
||||
}
|
||||
|
||||
fn matches_azure_responses_base_url(base_url: &str) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user