Lightweight coding agent that runs in your terminal
Rust
Expand realtime v3 voice support (#52363)
Jackson Moody03b761dca9b0
diff --git a/codex-rs/app-server-protocol/schema/json/ClientRequest.json b/codex-rs/app-server-protocol/schema/json/ClientRequest.jsonindex f2aa2c989c..06a057533e 100644--- a/codex-rs/app-server-protocol/schema/json/ClientRequest.json+++ b/codex-rs/app-server-protocol/schema/json/ClientRequest.json@@ -2792,22 +2792,38 @@"alloy","arbor","ash",+ "aube","ballad","breeze",+ "bubbie","cedar","coral","cove","echo","ember",+ "haetsal",+ "hanul",+ "himari","juniper",+ "leher","maple","marin",+ "miko",+ "neer",+ "porto",+ "rindo",+ "rio",+ "rivage","sage",+ "selva","shimmer","sol",+ "sonna","spruce",+ "tinta","vale",- "verse"+ "verse",+ "viola"],"type": "string"},diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.jsonindex 01986e2001..8422227abe 100644--- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json+++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json@@ -18272,22 +18272,38 @@"alloy","arbor","ash",+ "aube","ballad","breeze",+ "bubbie","cedar","coral","cove","echo","ember",+ "haetsal",+ "hanul",+ "himari","juniper",+ "leher","maple","marin",+ "miko",+ "neer",+ "porto",+ "rindo",+ "rio",+ "rivage","sage",+ "selva","shimmer","sol",+ "sonna","spruce",+ "tinta","vale",- "verse"+ "verse",+ "viola"],"type": "string"},@@ -18310,6 +18326,13 @@"$ref": "#/definitions/v2/RealtimeVoice"},"type": "array"+ },+ "v3": {+ "default": [],+ "items": {+ "$ref": "#/definitions/v2/RealtimeVoice"+ },+ "type": "array"}},"required": [diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.jsonindex 95ffa2fe63..d6e977f5fc 100644--- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json+++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json@@ -14284,22 +14284,38 @@"alloy","arbor","ash",+ "aube","ballad","breeze",+ "bubbie","cedar","coral","cove","echo","ember",+ "haetsal",+ "hanul",+ "himari","juniper",+ "leher","maple","marin",+ "miko",+ "neer",+ "porto",+ "rindo",+ "rio",+ "rivage","sage",+ "selva","shimmer","sol",+ "sonna","spruce",+ "tinta","vale",- "verse"+ "verse",+ "viola"],"type": "string"},@@ -14322,6 +14338,13 @@"$ref": "#/definitions/RealtimeVoice"},"type": "array"+ },+ "v3": {+ "default": [],+ "items": {+ "$ref": "#/definitions/RealtimeVoice"+ },+ "type": "array"}},"required": [diff --git a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zstindex 2571775b78..51a9f56341 100644Binary files a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst and b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst differdiff --git a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zstindex 9e9b36b47c..5019d2ffad 100644Binary files a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst and b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst differdiff --git a/codex-rs/app-server-protocol/schema/typescript/RealtimeVoice.ts b/codex-rs/app-server-protocol/schema/typescript/RealtimeVoice.tsindex c3a434e944..d6328c3ef4 100644--- a/codex-rs/app-server-protocol/schema/typescript/RealtimeVoice.ts+++ b/codex-rs/app-server-protocol/schema/typescript/RealtimeVoice.ts@@ -2,4 +2,4 @@// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.-export type RealtimeVoice = "alloy" | "arbor" | "ash" | "ballad" | "breeze" | "cedar" | "coral" | "cove" | "echo" | "ember" | "juniper" | "maple" | "marin" | "sage" | "shimmer" | "sol" | "spruce" | "vale" | "verse";+export type RealtimeVoice = "alloy" | "arbor" | "ash" | "aube" | "ballad" | "breeze" | "bubbie" | "cedar" | "coral" | "cove" | "echo" | "ember" | "haetsal" | "hanul" | "himari" | "juniper" | "leher" | "maple" | "marin" | "miko" | "neer" | "porto" | "rindo" | "rio" | "rivage" | "sage" | "selva" | "shimmer" | "sol" | "sonna" | "spruce" | "tinta" | "vale" | "verse" | "viola";diff --git a/codex-rs/app-server-protocol/schema/typescript/RealtimeVoicesList.ts b/codex-rs/app-server-protocol/schema/typescript/RealtimeVoicesList.tsindex b81cbc0a0c..5b43b67bf1 100644--- a/codex-rs/app-server-protocol/schema/typescript/RealtimeVoicesList.ts+++ b/codex-rs/app-server-protocol/schema/typescript/RealtimeVoicesList.ts@@ -3,4 +3,4 @@// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.import type { RealtimeVoice } from "./RealtimeVoice";-export type RealtimeVoicesList = { v1: Array<RealtimeVoice>, v2: Array<RealtimeVoice>, defaultV1: RealtimeVoice, defaultV2: RealtimeVoice, };+export type RealtimeVoicesList = { v1: Array<RealtimeVoice>, v2: Array<RealtimeVoice>, v3?: Array<RealtimeVoice>, defaultV1: RealtimeVoice, defaultV2: RealtimeVoice, };diff --git a/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs b/codex-rs/app-server/tests/suite/v2/realtime_conversation.rsindex 2d61c96a6d..08c9545968 100644--- a/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs+++ b/codex-rs/app-server/tests/suite/v2/realtime_conversation.rs@@ -1711,6 +1711,7 @@ async fn realtime_list_voices_returns_supported_names() -> Result<()> {RealtimeVoice::Marin,RealtimeVoice::Cedar,],+ v3: RealtimeVoicesList::builtin().v3,default_v1: RealtimeVoice::Cove,default_v2: RealtimeVoice::Marin,},diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.jsonindex d9594bb0e7..2e900dec03 100644--- a/codex-rs/core/config.schema.json+++ b/codex-rs/core/config.schema.json@@ -3974,22 +3974,38 @@"alloy","arbor","ash",+ "aube","ballad","breeze",+ "bubbie","cedar","coral","cove","echo","ember",+ "haetsal",+ "hanul",+ "himari","juniper",+ "leher","maple","marin",+ "miko",+ "neer",+ "porto",+ "rindo",+ "rio",+ "rivage","sage",+ "selva","shimmer","sol",+ "sonna","spruce",+ "tinta","vale",- "verse"+ "verse",+ "viola"],"type": "string"},diff --git a/codex-rs/core/src/realtime_conversation.rs b/codex-rs/core/src/realtime_conversation.rsindex 095ba94dd7..dab0d42f6a 100644--- a/codex-rs/core/src/realtime_conversation.rs+++ b/codex-rs/core/src/realtime_conversation.rs@@ -1668,8 +1668,9 @@ fn realtime_backend_item(text: String, prefix: Option<&str>) -> String {fn validate_realtime_voice(version: RealtimeWsVersion, voice: RealtimeVoice) -> CodexResult<()> {let voices = RealtimeVoicesList::builtin();let allowed = match version {- RealtimeWsVersion::V1 | RealtimeWsVersion::V3 => &voices.v1,+ RealtimeWsVersion::V1 => &voices.v1,RealtimeWsVersion::V2 => &voices.v2,+ RealtimeWsVersion::V3 => &voices.v3,};if allowed.contains(&voice) {return Ok(());diff --git a/codex-rs/core/src/session/tests.rs b/codex-rs/core/src/session/tests.rsindex dc0bebebc6..b43aac549e 100644--- a/codex-rs/core/src/session/tests.rs+++ b/codex-rs/core/src/session/tests.rs@@ -11603,6 +11603,7 @@ async fn realtime_conversation_list_voices_emits_builtin_list() {RealtimeVoice::Marin,RealtimeVoice::Cedar,],+ v3: RealtimeVoicesList::builtin().v3,default_v1: RealtimeVoice::Cove,default_v2: RealtimeVoice::Marin,},diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rsindex ac8eaa9f46..a50269a5b7 100644--- a/codex-rs/protocol/src/protocol.rs+++ b/codex-rs/protocol/src/protocol.rs@@ -257,22 +257,38 @@ pub enum RealtimeVoice {Alloy,Arbor,Ash,+ Aube,Ballad,Breeze,+ Bubbie,Cedar,Coral,Cove,Echo,Ember,+ Haetsal,+ Hanul,+ Himari,Juniper,+ Leher,Maple,Marin,+ Miko,+ Neer,+ Porto,+ Rindo,+ Rio,+ Rivage,Sage,+ Selva,Shimmer,Sol,+ Sonna,Spruce,+ Tinta,Vale,Verse,+ Viola,}impl RealtimeVoice {@@ -281,22 +297,38 @@ impl RealtimeVoice {Self::Alloy => "alloy",Self::Arbor => "arbor",Self::Ash => "ash",+ Self::Aube => "aube",Self::Ballad => "ballad",Self::Breeze => "breeze",+ Self::Bubbie => "bubbie",Self::Cedar => "cedar",Self::Coral => "coral",Self::Cove => "cove",Self::Echo => "echo",Self::Ember => "ember",+ Self::Haetsal => "haetsal",+ Self::Hanul => "hanul",+ Self::Himari => "himari",Self::Juniper => "juniper",+ Self::Leher => "leher",Self::Maple => "maple",Self::Marin => "marin",+ Self::Miko => "miko",+ Self::Neer => "neer",+ Self::Porto => "porto",+ Self::Rindo => "rindo",+ Self::Rio => "rio",+ Self::Rivage => "rivage",Self::Sage => "sage",+ Self::Selva => "selva",Self::Shimmer => "shimmer",Self::Sol => "sol",+ Self::Sonna => "sonna",Self::Spruce => "spruce",+ Self::Tinta => "tinta",Self::Vale => "vale",Self::Verse => "verse",+ Self::Viola => "viola",}}}@@ -307,6 +339,9 @@ impl RealtimeVoice {pub struct RealtimeVoicesList {pub v1: Vec<RealtimeVoice>,pub v2: Vec<RealtimeVoice>,+ #[serde(default)]+ #[ts(as = "Option<_>", optional)]+ pub v3: Vec<RealtimeVoice>,pub default_v1: RealtimeVoice,pub default_v2: RealtimeVoice,}@@ -337,6 +372,33 @@ impl RealtimeVoicesList {RealtimeVoice::Marin,RealtimeVoice::Cedar,],+ v3: vec![+ RealtimeVoice::Juniper,+ RealtimeVoice::Maple,+ RealtimeVoice::Spruce,+ RealtimeVoice::Ember,+ RealtimeVoice::Vale,+ RealtimeVoice::Breeze,+ RealtimeVoice::Arbor,+ RealtimeVoice::Sol,+ RealtimeVoice::Cove,+ RealtimeVoice::Aube,+ RealtimeVoice::Bubbie,+ RealtimeVoice::Haetsal,+ RealtimeVoice::Hanul,+ RealtimeVoice::Himari,+ RealtimeVoice::Leher,+ RealtimeVoice::Miko,+ RealtimeVoice::Neer,+ RealtimeVoice::Porto,+ RealtimeVoice::Rindo,+ RealtimeVoice::Rio,+ RealtimeVoice::Rivage,+ RealtimeVoice::Selva,+ RealtimeVoice::Sonna,+ RealtimeVoice::Tinta,+ RealtimeVoice::Viola,+ ],default_v1: RealtimeVoice::Cove,default_v2: RealtimeVoice::Marin,}@@ -5985,6 +6047,7 @@ mod tests {RealtimeVoice::Marin,RealtimeVoice::Cedar,],+ v3: RealtimeVoicesList::builtin().v3,default_v1: RealtimeVoice::Cove,default_v2: RealtimeVoice::Marin,}diff --git a/sdk/python/src/openai_codex/generated/v2_all.py b/sdk/python/src/openai_codex/generated/v2_all.pyindex beba74ebd6..b864dd0f33 100644--- a/sdk/python/src/openai_codex/generated/v2_all.py+++ b/sdk/python/src/openai_codex/generated/v2_all.py@@ -3680,22 +3680,38 @@ class RealtimeVoice(Enum):alloy = "alloy"arbor = "arbor"ash = "ash"+ aube = "aube"ballad = "ballad"breeze = "breeze"+ bubbie = "bubbie"cedar = "cedar"coral = "coral"cove = "cove"echo = "echo"ember = "ember"+ haetsal = "haetsal"+ hanul = "hanul"+ himari = "himari"juniper = "juniper"+ leher = "leher"maple = "maple"marin = "marin"+ miko = "miko"+ neer = "neer"+ porto = "porto"+ rindo = "rindo"+ rio = "rio"+ rivage = "rivage"sage = "sage"+ selva = "selva"shimmer = "shimmer"sol = "sol"+ sonna = "sonna"spruce = "spruce"+ tinta = "tinta"vale = "vale"verse = "verse"+ viola = "viola"class RealtimeVoicesList(BaseModel):@@ -3706,6 +3722,7 @@ class RealtimeVoicesList(BaseModel):default_v2: Annotated[RealtimeVoice, Field(alias="defaultV2")]v1: list[RealtimeVoice]v2: list[RealtimeVoice]+ v3: list[RealtimeVoice] | None = []class ReasoningEffort(str, Enum):