From 93d2d1d822292a84799772eb4d2f78d630ab2831 Mon Sep 17 00:00:00 2001 From: drewdrew Date: Thu, 4 Jun 2026 17:47:01 +0200 Subject: [PATCH 1/2] =?UTF-8?q?fix(examples/voice):=20swap=20deleted=20gpt?= =?UTF-8?q?-4o-audio-preview=20=E2=86=92=20gpt-audio-mini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The voice-to-voice example helper and the audio-to-text example pinned `gpt-4o-audio-preview`, which OpenAI has removed (404 model_not_found since 2026-05-19). Any user running the canonical voice example hit an immediate 404. Switch to `gpt-audio-mini` — OpenAI's current cost-efficient GA audio-chat model — matching the Python twin, which already migrated (python/scenario/config/voice_models.py:44 OPENAI_AUDIO_CHAT_MODEL, python/examples/test_audio_to_text.py:157). Verified live: gpt-audio-mini accepts the identical chat.completions shape (modalities:["text","audio"], audio:{voice,format}) and returns audio. Re-ran the voice-to-voice e2e against prod LangWatch — success: true, real 2-turn conversation, traces landed (project_bZspxwkhCD4POvqmIgOr2). SDK core was unaffected (OpenAIRealtimeAgentAdapter uses gpt-realtime-mini). This closes a py↔ts example-parity gap left by #561. Co-Authored-By: Claude Opus 4.8 --- .../examples/vitest/tests/helpers/openai-voice-agent.ts | 6 +++--- .../examples/vitest/tests/multimodal-audio-to-text.test.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/examples/vitest/tests/helpers/openai-voice-agent.ts b/javascript/examples/vitest/tests/helpers/openai-voice-agent.ts index 47706db85..88047621a 100644 --- a/javascript/examples/vitest/tests/helpers/openai-voice-agent.ts +++ b/javascript/examples/vitest/tests/helpers/openai-voice-agent.ts @@ -6,7 +6,7 @@ * - Generate audio output (voice responses) * - Handle multi-turn voice conversations * - * Uses OpenAI's gpt-4o-audio-preview model which supports voice-to-voice interaction. + * Uses OpenAI's gpt-audio-mini model which supports voice-to-voice interaction. * * Example usage: * ```typescript @@ -128,7 +128,7 @@ ${this.constructor.name} TEXT FALLBACK /** * Calls OpenAI's audio-enabled model to generate voice response * - * Uses gpt-4o-audio-preview with: + * Uses gpt-audio-mini with: * - Text and audio modalities * - WAV format output * - Configured voice (alloy, nova, echo, etc.) @@ -138,7 +138,7 @@ ${this.constructor.name} TEXT FALLBACK messages: ChatCompletionMessageParam[] ): Promise { return this.openai.chat.completions.create({ - model: "gpt-4o-audio-preview", + model: "gpt-audio-mini", modalities: ["text", "audio"], audio: { voice: this.config.voice, format: "wav" }, messages: this.systemMessage diff --git a/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts b/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts index 4a81a84a0..60b3703b9 100644 --- a/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts +++ b/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts @@ -45,7 +45,7 @@ class AudioAgent extends AgentAdapter { private async respond(messages: ChatCompletionMessageParam[]) { return await this.openai.chat.completions.create({ - model: "gpt-4o-audio-preview", + model: "gpt-audio-mini", modalities: ["text", "audio"], audio: { voice: "alloy", format: "wav" }, // We need to strip the id, or the openai client will throw an error From 37c03437b08a56c62d4dabf637556c8db7423706 Mon Sep 17 00:00:00 2001 From: drewdrew Date: Thu, 4 Jun 2026 20:03:24 +0200 Subject: [PATCH 2/2] docs(examples/voice/#607): refresh stale gpt-4o-audio-preview comment refs after model swap Co-Authored-By: Claude Opus 4.8 --- .../vitest/tests/helpers/openai-voice-agent.test.ts | 9 ++++++--- .../vitest/tests/multimodal-audio-to-audio.test.ts | 9 ++++++--- .../vitest/tests/multimodal-audio-to-text.test.ts | 9 ++++++--- .../tests/multimodal-voice-to-voice-conversation.test.ts | 9 ++++++--- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/javascript/examples/vitest/tests/helpers/openai-voice-agent.test.ts b/javascript/examples/vitest/tests/helpers/openai-voice-agent.test.ts index 3c88036a9..ff8345ecc 100644 --- a/javascript/examples/vitest/tests/helpers/openai-voice-agent.test.ts +++ b/javascript/examples/vitest/tests/helpers/openai-voice-agent.test.ts @@ -18,9 +18,12 @@ import { encodeAudioToBase64 } from "./audio-encoding"; import { getFixturePath } from "./fixture-utils"; import { OpenAiVoiceAgent } from "./openai-voice-agent"; -// Skipped in CI: depends on the OpenAI `gpt-4o-audio-preview` model, which -// returns 404 model_not_found as of 2026-05-19. Tracked separately — the -// voice work PR will unskip these tests once model access is restored. +// Skipped in CI: live end-to-end test — calls OpenAI's `gpt-audio-mini` audio +// model and the real LangWatch backend (cost, API keys, non-deterministic +// audio), so it runs live/locally rather than in CI. The skip historically +// also guarded the now-deleted `gpt-4o-audio-preview` (404 model_not_found +// since 2026-05-19); #607 swapped that dead model for `gpt-audio-mini`, so the +// model is no longer the blocker — the skip is CI-cost/live-only now. const skipInCi = process.env.CI === "true"; /** diff --git a/javascript/examples/vitest/tests/multimodal-audio-to-audio.test.ts b/javascript/examples/vitest/tests/multimodal-audio-to-audio.test.ts index b62cda88a..fba09273e 100644 --- a/javascript/examples/vitest/tests/multimodal-audio-to-audio.test.ts +++ b/javascript/examples/vitest/tests/multimodal-audio-to-audio.test.ts @@ -9,9 +9,12 @@ import { } from "./helpers"; import { OpenAiVoiceAgent } from "./helpers/openai-voice-agent"; -// Skipped in CI: depends on the OpenAI `gpt-4o-audio-preview` model, which -// returns 404 model_not_found as of 2026-05-19. Tracked separately — the -// voice work PR will unskip these tests once model access is restored. +// Skipped in CI: live end-to-end test — calls OpenAI's `gpt-audio-mini` audio +// model and the real LangWatch backend (cost, API keys, non-deterministic +// audio), so it runs live/locally rather than in CI. The skip historically +// also guarded the now-deleted `gpt-4o-audio-preview` (404 model_not_found +// since 2026-05-19); #607 swapped that dead model for `gpt-audio-mini`, so the +// model is no longer the blocker — the skip is CI-cost/live-only now. const skipInCi = process.env.CI === "true"; class AudioAgent extends OpenAiVoiceAgent { diff --git a/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts b/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts index 60b3703b9..ae4927d41 100644 --- a/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts +++ b/javascript/examples/vitest/tests/multimodal-audio-to-text.test.ts @@ -15,9 +15,12 @@ import { } from "./helpers"; import { convertModelMessagesToOpenAIMessages } from "./helpers/convert-core-messages-to-openai"; -// CI-skipped: this test still pins `gpt-4o-audio-preview` (deleted, 404 since 2026-05-19) on line 48. -// The model swap → gpt-audio-mini and the skip-marker removal are tracked in PR #607 (not yet merged). -// This commit (#606) relaxes the judge criteria below so they're robust once that model swap lands. +// Skipped in CI: live end-to-end test — calls OpenAI's `gpt-audio-mini` audio +// model and the real LangWatch backend (cost, API keys, non-deterministic +// audio), so it runs live/locally rather than in CI. The skip historically +// also guarded the now-deleted `gpt-4o-audio-preview` (404 model_not_found +// since 2026-05-19); #607 swapped that dead model for `gpt-audio-mini`, so the +// model is no longer the blocker — the skip is CI-cost/live-only now. const skipInCi = process.env.CI === "true"; class AudioAgent extends AgentAdapter { diff --git a/javascript/examples/vitest/tests/multimodal-voice-to-voice-conversation.test.ts b/javascript/examples/vitest/tests/multimodal-voice-to-voice-conversation.test.ts index fad67593b..514baca2f 100644 --- a/javascript/examples/vitest/tests/multimodal-voice-to-voice-conversation.test.ts +++ b/javascript/examples/vitest/tests/multimodal-voice-to-voice-conversation.test.ts @@ -27,9 +27,12 @@ import { } from "./helpers"; import { messageRoleReversal } from "../../../src/agents/utils"; -// Skipped in CI: depends on the OpenAI `gpt-4o-audio-preview` model, which -// returns 404 model_not_found as of 2026-05-19. Tracked separately — the -// voice work PR will unskip these tests once model access is restored. +// Skipped in CI: live end-to-end test — calls OpenAI's `gpt-audio-mini` audio +// model and the real LangWatch backend (cost, API keys, non-deterministic +// audio), so it runs live/locally rather than in CI. The skip historically +// also guarded the now-deleted `gpt-4o-audio-preview` (404 model_not_found +// since 2026-05-19); #607 swapped that dead model for `gpt-audio-mini`, so the +// model is no longer the blocker — the skip is CI-cost/live-only now. const skipInCi = process.env.CI === "true"; /**