NUX for gpt5.1 (#6561)

- Introducing a screen to inform users of model changes. 
- Config name is being passed to be able to reuse this component in the
future for future models
This commit is contained in:
Ahmed Ibrahim
2025-11-13 01:24:21 +00:00
committed by GitHub
parent 964220ac94
commit e63ab0dd65
12 changed files with 512 additions and 1 deletions
+9
View File
@@ -27,6 +27,8 @@ pub struct ModelPreset {
pub supported_reasoning_efforts: &'static [ReasoningEffortPreset],
/// Whether this is the default model for new users.
pub is_default: bool,
/// recommended upgrade model
pub recommended_upgrade_model: Option<&'static str>,
}
const PRESETS: &[ModelPreset] = &[
@@ -51,6 +53,7 @@ const PRESETS: &[ModelPreset] = &[
},
],
is_default: true,
recommended_upgrade_model: Some("gpt-5.1-codex"),
},
ModelPreset {
id: "gpt-5-codex-mini",
@@ -69,6 +72,7 @@ const PRESETS: &[ModelPreset] = &[
},
],
is_default: false,
recommended_upgrade_model: Some("gpt-5.1-codex-mini"),
},
ModelPreset {
id: "gpt-5",
@@ -95,6 +99,7 @@ const PRESETS: &[ModelPreset] = &[
},
],
is_default: false,
recommended_upgrade_model: Some("gpt-5.1"),
},
];
@@ -107,6 +112,10 @@ pub fn builtin_model_presets(auth_mode: Option<AuthMode>) -> Vec<ModelPreset> {
.collect()
}
pub fn all_model_presets() -> &'static [ModelPreset] {
PRESETS
}
#[cfg(test)]
mod tests {
use super::*;