feat(openai): default realtime voice to gpt-realtime-2.1

This commit is contained in:
Vincent Koc
2026-07-06 22:13:25 -07:00
committed by Vincent Koc
parent 3175d8e742
commit c43e020f47
3 changed files with 6 additions and 6 deletions

View File

@@ -289,7 +289,7 @@ describe("buildOpenAIRealtimeVoiceProvider", () => {
it("declares realtime Talk capabilities for catalog selection", () => {
const provider = buildOpenAIRealtimeVoiceProvider();
expect(provider.defaultModel).toBe("gpt-realtime-2");
expect(provider.defaultModel).toBe("gpt-realtime-2.1");
expect(provider.capabilities).toEqual({
transports: ["webrtc", "gateway-relay"],
inputAudioFormats: [
@@ -541,7 +541,7 @@ describe("buildOpenAIRealtimeVoiceProvider", () => {
});
const body = requireFetchJsonBody();
const bodySession = requireRecord(body.session, "fetch session");
expect(bodySession.model).toBe("gpt-realtime-2");
expect(bodySession.model).toBe("gpt-realtime-2.1");
expect(requireNestedRecord(bodySession, ["audio", "input"])).toEqual({
noise_reduction: { type: "near_field" },
turn_detection: {
@@ -558,7 +558,7 @@ describe("buildOpenAIRealtimeVoiceProvider", () => {
transport: "webrtc",
clientSecret: "client-secret-123",
offerUrl: "https://api.openai.com/v1/realtime/calls",
model: "gpt-realtime-2",
model: "gpt-realtime-2.1",
expiresAt: 1_765_000_000_000,
});
// originator, version, and User-Agent are server-side attribution headers; they
@@ -920,7 +920,7 @@ describe("buildOpenAIRealtimeVoiceProvider", () => {
const session = requireSession(socket);
expectRecordFields(session, "session", {
type: "realtime",
model: "gpt-realtime-2",
model: "gpt-realtime-2.1",
output_modalities: ["audio"],
});
const inputAudio = requireNestedRecord(session, ["audio", "input"]);

View File

@@ -86,7 +86,7 @@ type OpenAIRealtimeVoiceBridgeConfig = RealtimeVoiceBridgeCreateRequest & {
azureApiVersion?: string;
};
const OPENAI_REALTIME_DEFAULT_MODEL = "gpt-realtime-2";
const OPENAI_REALTIME_DEFAULT_MODEL = "gpt-realtime-2.1";
const OPENAI_REALTIME_INPUT_TRANSCRIPTION_MODEL = "gpt-4o-mini-transcribe";
const OPENAI_REALTIME_ACTIVE_RESPONSE_ERROR_PREFIX =
"Conversation already has an active response in progress:";

View File

@@ -11,7 +11,7 @@ import {
} from "../lib/dev-tooling-safety.ts";
const OPENAI_REALTIME_MODEL =
process.env.OPENCLAW_REALTIME_OPENAI_MODEL?.trim() || "gpt-realtime-2";
process.env.OPENCLAW_REALTIME_OPENAI_MODEL?.trim() || "gpt-realtime-2.1";
const OPENAI_REALTIME_VOICE = process.env.OPENCLAW_REALTIME_OPENAI_VOICE?.trim() || "alloy";
const DEFAULT_OPENAI_HTTP_TIMEOUT_MS = 30_000;
const OPENAI_HTTP_RESPONSE_MAX_BYTES = 256 * 1024;