mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +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:
+20
@@ -13590,6 +13590,17 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"multiAgentVersion": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/v2/MultiAgentVersion"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Multi-agent runtime declared by this model, when available."
|
||||
},
|
||||
"serviceTiers": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -13924,6 +13935,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"MultiAgentVersion": {
|
||||
"description": "Multi-agent runtime supported by a model.",
|
||||
"enum": [
|
||||
"disabled",
|
||||
"v1",
|
||||
"v2"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"NetworkAccess": {
|
||||
"enum": [
|
||||
"restricted",
|
||||
|
||||
+20
@@ -9927,6 +9927,17 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"multiAgentVersion": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MultiAgentVersion"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Multi-agent runtime declared by this model, when available."
|
||||
},
|
||||
"serviceTiers": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -10261,6 +10272,15 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"MultiAgentVersion": {
|
||||
"description": "Multi-agent runtime supported by a model.",
|
||||
"enum": [
|
||||
"disabled",
|
||||
"v1",
|
||||
"v2"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"NetworkAccess": {
|
||||
"enum": [
|
||||
"restricted",
|
||||
|
||||
@@ -93,6 +93,17 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"multiAgentVersion": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/MultiAgentVersion"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Multi-agent runtime declared by this model, when available."
|
||||
},
|
||||
"serviceTiers": {
|
||||
"default": [],
|
||||
"items": {
|
||||
@@ -198,6 +209,15 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MultiAgentVersion": {
|
||||
"description": "Multi-agent runtime supported by a model.",
|
||||
"enum": [
|
||||
"disabled",
|
||||
"v1",
|
||||
"v2"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"ReasoningEffort": {
|
||||
"description": "A non-empty reasoning effort value advertised by the model.",
|
||||
"minLength": 1,
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -6,9 +6,14 @@ import type { ReasoningEffort } from "../ReasoningEffort";
|
||||
import type { ModelAvailabilityNux } from "./ModelAvailabilityNux";
|
||||
import type { ModelServiceTier } from "./ModelServiceTier";
|
||||
import type { ModelUpgradeInfo } from "./ModelUpgradeInfo";
|
||||
import type { MultiAgentVersion } from "./MultiAgentVersion";
|
||||
import type { ReasoningEffortOption } from "./ReasoningEffortOption";
|
||||
|
||||
export type Model = { id: string, model: string, upgrade: string | null, upgradeInfo: ModelUpgradeInfo | null, availabilityNux: ModelAvailabilityNux | null, displayName: string, description: string, modelSpecialty: string | null, hidden: boolean, supportedReasoningEfforts: Array<ReasoningEffortOption>, defaultReasoningEffort: ReasoningEffort, inputModalities: Array<InputModality>, supportsPersonality: boolean,
|
||||
/**
|
||||
* Multi-agent runtime declared by this model, when available.
|
||||
*/
|
||||
multiAgentVersion: MultiAgentVersion | null,
|
||||
/**
|
||||
* Deprecated: use `serviceTiers` instead.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Multi-agent runtime supported by a model.
|
||||
*/
|
||||
export type MultiAgentVersion = "disabled" | "v1" | "v2";
|
||||
@@ -288,6 +288,7 @@ export type { ModelUpgradeInfo } from "./ModelUpgradeInfo";
|
||||
export type { ModelVerification } from "./ModelVerification";
|
||||
export type { ModelVerificationNotification } from "./ModelVerificationNotification";
|
||||
export type { ModelsRequirements } from "./ModelsRequirements";
|
||||
export type { MultiAgentVersion } from "./MultiAgentVersion";
|
||||
export type { NetworkAccess } from "./NetworkAccess";
|
||||
export type { NetworkApprovalContext } from "./NetworkApprovalContext";
|
||||
export type { NetworkApprovalProtocol } from "./NetworkApprovalProtocol";
|
||||
|
||||
@@ -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