Feat: add upgrade to app server modelList (#10556)

### Summary
* Add model upgrade to listModel app server endpoint to support
dynamically show model upgrade banner.
This commit is contained in:
Shijie Rao
2026-02-03 14:53:36 -08:00
committed by GitHub
parent e3d39013d3
commit 750ebe154d
8 changed files with 21 additions and 2 deletions

View File

@@ -51,6 +51,7 @@ async fn list_models_returns_all_models_with_large_limit() -> Result<()> {
Model {
id: "gpt-5.2-codex".to_string(),
model: "gpt-5.2-codex".to_string(),
upgrade: None,
display_name: "gpt-5.2-codex".to_string(),
description: "Latest frontier agentic coding model.".to_string(),
supported_reasoning_efforts: vec![
@@ -80,6 +81,7 @@ async fn list_models_returns_all_models_with_large_limit() -> Result<()> {
Model {
id: "gpt-5.1-codex-max".to_string(),
model: "gpt-5.1-codex-max".to_string(),
upgrade: Some("gpt-5.2-codex".to_string()),
display_name: "gpt-5.1-codex-max".to_string(),
description: "Codex-optimized flagship for deep and fast reasoning.".to_string(),
supported_reasoning_efforts: vec![
@@ -109,6 +111,7 @@ async fn list_models_returns_all_models_with_large_limit() -> Result<()> {
Model {
id: "gpt-5.1-codex-mini".to_string(),
model: "gpt-5.1-codex-mini".to_string(),
upgrade: Some("gpt-5.2-codex".to_string()),
display_name: "gpt-5.1-codex-mini".to_string(),
description: "Optimized for codex. Cheaper, faster, but less capable.".to_string(),
supported_reasoning_efforts: vec![
@@ -130,6 +133,7 @@ async fn list_models_returns_all_models_with_large_limit() -> Result<()> {
Model {
id: "gpt-5.2".to_string(),
model: "gpt-5.2".to_string(),
upgrade: Some("gpt-5.2-codex".to_string()),
display_name: "gpt-5.2".to_string(),
description:
"Latest frontier model with improvements across knowledge, reasoning and coding"