mirror of
https://github.com/openai/codex.git
synced 2026-11-01 19:33:35 +00:00
Expose multi-agent versions in model/list (#37433)
## What changed - Add nullable `multiAgentVersion` metadata to v2 `model/list` responses. - Represent supported values as `disabled`, `v1`, or `v2` in the Rust API and generated JSON Schema and TypeScript exports. - Forward the value from model catalog presets through app-server responses. ## Testing - Extend the remote model catalog test fixture with a `v2` multi-agent version. GitOrigin-RevId: bd3b2bbe0a3b562b4d1f03df7da2a73a35713978
This commit is contained in:
@@ -7,6 +7,7 @@ use codex_protocol::openai_models::ReasoningEffort;
|
||||
use codex_protocol::openai_models::default_input_modalities;
|
||||
use codex_protocol::protocol::ModelRerouteReason as CoreModelRerouteReason;
|
||||
use codex_protocol::protocol::ModelVerification as CoreModelVerification;
|
||||
use codex_protocol::protocol::MultiAgentVersion as CoreMultiAgentVersion;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use serde_json::Value as JsonValue;
|
||||
@@ -23,6 +24,15 @@ v2_enum_from_core!(
|
||||
}
|
||||
);
|
||||
|
||||
v2_enum_from_core!(
|
||||
/// Multi-agent runtime supported by a model.
|
||||
pub enum MultiAgentVersion from CoreMultiAgentVersion {
|
||||
Disabled,
|
||||
V1,
|
||||
V2
|
||||
}
|
||||
);
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, Default, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
@@ -96,6 +106,8 @@ pub struct Model {
|
||||
pub input_modalities: Vec<InputModality>,
|
||||
#[serde(default)]
|
||||
pub supports_personality: bool,
|
||||
/// Multi-agent runtime declared by this model, when available.
|
||||
pub multi_agent_version: Option<MultiAgentVersion>,
|
||||
/// Deprecated: use `serviceTiers` instead.
|
||||
#[serde(default)]
|
||||
pub additional_speed_tiers: Vec<String>,
|
||||
|
||||
Reference in New Issue
Block a user