mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
Add opt-in model discovery for OpenAI API keys (#44392)
## What changed Add the default-off `api_key_model_discovery` feature and expose it through app-server experimental feature enablement, respecting user configuration overrides. When enabled, fetch OpenAI API-key model metadata from the Codex backend, honoring explicit provider base URLs. Treat remote catalogs containing visible models as authoritative. When disabled at startup, skip discovery requests and cached catalogs and retain bundled models. ## Testing Add coverage for feature enablement and user overrides, cached catalogs across sessions, provider routing, and API-key `model/list` results. Extend coverage for remote instructions and auth-specific cache isolation. GitOrigin-RevId: 4b189c37c615a7f808cb6ff5f0858a9a55f36ebc
This commit is contained in:
@@ -91,6 +91,8 @@ impl Stage {
|
||||
/// Unique features toggled via configuration.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub enum Feature {
|
||||
/// Discover model catalogs for OpenAI API-key authentication.
|
||||
ApiKeyModelDiscovery,
|
||||
/// Enable the interactive transcript composer and turn-selection UI.
|
||||
TranscriptV2,
|
||||
// Stable.
|
||||
@@ -1219,6 +1221,12 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
stage: Stage::Removed,
|
||||
default_enabled: false,
|
||||
},
|
||||
FeatureSpec {
|
||||
id: Feature::ApiKeyModelDiscovery,
|
||||
key: "api_key_model_discovery",
|
||||
stage: Stage::UnderDevelopment,
|
||||
default_enabled: false,
|
||||
},
|
||||
FeatureSpec {
|
||||
id: Feature::EnableRequestCompression,
|
||||
key: "enable_request_compression",
|
||||
|
||||
Reference in New Issue
Block a user