agora-agents 2.9.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/Agent.js +4 -3
  3. package/dist/cjs/agentkit/index.d.ts +10 -10
  4. package/dist/cjs/agentkit/index.js +13 -8
  5. package/dist/cjs/agentkit/preview/client.d.ts +5 -17
  6. package/dist/cjs/agentkit/preview/client.js +18 -84
  7. package/dist/cjs/agentkit/preview/gemini-tts.d.ts +31 -0
  8. package/dist/cjs/agentkit/preview/gemini-tts.js +32 -0
  9. package/dist/cjs/agentkit/preview/index.d.ts +6 -2
  10. package/dist/cjs/agentkit/preview/index.js +7 -2
  11. package/dist/cjs/agentkit/preview/vendors.d.ts +8 -104
  12. package/dist/cjs/agentkit/preview/vendors.js +14 -115
  13. package/dist/cjs/agentkit/types.d.ts +12 -5
  14. package/dist/cjs/agentkit/vendors/base.d.ts +15 -4
  15. package/dist/cjs/agentkit/vendors/base.js +16 -5
  16. package/dist/cjs/agentkit/vendors/cn.js +2 -2
  17. package/dist/cjs/agentkit/vendors/llm.js +2 -2
  18. package/dist/cjs/agentkit/vendors/mllm.d.ts +92 -10
  19. package/dist/cjs/agentkit/vendors/mllm.js +115 -18
  20. package/dist/cjs/agentkit/vendors/stt.d.ts +41 -0
  21. package/dist/cjs/agentkit/vendors/stt.js +18 -1
  22. package/dist/cjs/agentkit/vendors/tts.d.ts +27 -0
  23. package/dist/cjs/agentkit/vendors/tts.js +16 -1
  24. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +11 -5
  25. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +3 -1
  26. package/dist/cjs/api/types/AnamAvatarParams.d.ts +42 -0
  27. package/dist/cjs/api/types/AnamAvatarParams.js +18 -0
  28. package/dist/cjs/api/types/Asr.d.ts +4 -1
  29. package/dist/cjs/api/types/LlmTool.d.ts +7 -0
  30. package/dist/cjs/api/types/McpServer.d.ts +24 -0
  31. package/dist/cjs/api/types/McpServer.js +3 -0
  32. package/dist/cjs/api/types/Mllm.d.ts +14 -0
  33. package/dist/cjs/api/types/SmallestAiAsr.d.ts +11 -0
  34. package/dist/cjs/api/types/SmallestAiAsr.js +3 -0
  35. package/dist/cjs/api/types/SmallestAiAsrParams.d.ts +49 -0
  36. package/dist/cjs/api/types/SmallestAiAsrParams.js +3 -0
  37. package/dist/cjs/api/types/SmallestAiTts.d.ts +9 -0
  38. package/dist/cjs/api/types/SmallestAiTts.js +3 -0
  39. package/dist/cjs/api/types/SmallestAiTtsParams.d.ts +31 -0
  40. package/dist/cjs/api/types/SmallestAiTtsParams.js +3 -0
  41. package/dist/cjs/api/types/Tts.d.ts +4 -1
  42. package/dist/cjs/api/types/index.d.ts +6 -0
  43. package/dist/cjs/api/types/index.js +6 -0
  44. package/dist/cjs/index.d.ts +4 -2
  45. package/dist/cjs/index.js +10 -3
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/BaseClient.mjs +2 -2
  49. package/dist/esm/agentkit/Agent.mjs +3 -2
  50. package/dist/esm/agentkit/index.d.mts +10 -10
  51. package/dist/esm/agentkit/index.mjs +4 -4
  52. package/dist/esm/agentkit/preview/client.d.mts +5 -17
  53. package/dist/esm/agentkit/preview/client.mjs +18 -84
  54. package/dist/esm/agentkit/preview/gemini-tts.d.mts +31 -0
  55. package/dist/esm/agentkit/preview/gemini-tts.mjs +28 -0
  56. package/dist/esm/agentkit/preview/index.d.mts +6 -2
  57. package/dist/esm/agentkit/preview/index.mjs +3 -1
  58. package/dist/esm/agentkit/preview/vendors.d.mts +8 -104
  59. package/dist/esm/agentkit/preview/vendors.mjs +5 -112
  60. package/dist/esm/agentkit/types.d.mts +12 -5
  61. package/dist/esm/agentkit/vendors/base.d.mts +15 -4
  62. package/dist/esm/agentkit/vendors/base.mjs +16 -5
  63. package/dist/esm/agentkit/vendors/cn.mjs +2 -2
  64. package/dist/esm/agentkit/vendors/llm.mjs +2 -2
  65. package/dist/esm/agentkit/vendors/mllm.d.mts +92 -10
  66. package/dist/esm/agentkit/vendors/mllm.mjs +111 -16
  67. package/dist/esm/agentkit/vendors/stt.d.mts +41 -0
  68. package/dist/esm/agentkit/vendors/stt.mjs +16 -0
  69. package/dist/esm/agentkit/vendors/tts.d.mts +27 -0
  70. package/dist/esm/agentkit/vendors/tts.mjs +14 -0
  71. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +11 -5
  72. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +3 -1
  73. package/dist/esm/api/types/AnamAvatarParams.d.mts +42 -0
  74. package/dist/esm/api/types/AnamAvatarParams.mjs +15 -0
  75. package/dist/esm/api/types/Asr.d.mts +4 -1
  76. package/dist/esm/api/types/LlmTool.d.mts +7 -0
  77. package/dist/esm/api/types/McpServer.d.mts +24 -0
  78. package/dist/esm/api/types/McpServer.mjs +2 -0
  79. package/dist/esm/api/types/Mllm.d.mts +14 -0
  80. package/dist/esm/api/types/SmallestAiAsr.d.mts +11 -0
  81. package/dist/esm/api/types/SmallestAiAsr.mjs +2 -0
  82. package/dist/esm/api/types/SmallestAiAsrParams.d.mts +49 -0
  83. package/dist/esm/api/types/SmallestAiAsrParams.mjs +2 -0
  84. package/dist/esm/api/types/SmallestAiTts.d.mts +9 -0
  85. package/dist/esm/api/types/SmallestAiTts.mjs +2 -0
  86. package/dist/esm/api/types/SmallestAiTtsParams.d.mts +31 -0
  87. package/dist/esm/api/types/SmallestAiTtsParams.mjs +2 -0
  88. package/dist/esm/api/types/Tts.d.mts +4 -1
  89. package/dist/esm/api/types/index.d.mts +6 -0
  90. package/dist/esm/api/types/index.mjs +6 -0
  91. package/dist/esm/index.d.mts +4 -2
  92. package/dist/esm/index.mjs +3 -2
  93. package/dist/esm/version.d.mts +1 -1
  94. package/dist/esm/version.mjs +1 -1
  95. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import { BaseTTS } from "../vendors/base.mjs";
2
+ /** Gemini 3.8 Flash TTS preview model. */
3
+ export const GeminiTTSModels = {
4
+ Flash38: "gemini-3.8-flash-tts",
5
+ };
6
+ /** Preview-only TTS. AgentSession selects the gemini-live gate automatically. */
7
+ export class GeminiTTS extends BaseTTS {
8
+ constructor(options) {
9
+ super();
10
+ for (const field of ["apiKey", "model", "voice"]) {
11
+ const value = options[field];
12
+ if ((field === "apiKey" || value !== undefined) && (typeof value !== "string" || !value.trim())) {
13
+ throw new Error(`GeminiTTS requires ${field}`);
14
+ }
15
+ }
16
+ if (options.style !== undefined && typeof options.style !== "string") {
17
+ throw new Error("GeminiTTS style must be a string");
18
+ }
19
+ this.options = Object.assign({}, options);
20
+ }
21
+ toConfig() {
22
+ const { apiKey, model = GeminiTTSModels.Flash38, voice = "Puck", style } = this.options;
23
+ return {
24
+ vendor: "gemini",
25
+ params: Object.assign({ api_key: apiKey, model, voice }, (style !== undefined && { style })),
26
+ };
27
+ }
28
+ }
@@ -4,9 +4,13 @@
4
4
  * Preview routing stays here while provider implementations can graduate to
5
5
  * the production vendor modules independently.
6
6
  */
7
+ export type { OpenAIGPTLiveOptions } from "../vendors/mllm.mjs";
8
+ export { OpenAIGPTLive } from "../vendors/mllm.mjs";
7
9
  export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.mjs";
8
10
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
9
11
  export type { PreviewFeature, PreviewRoute } from "./client.mjs";
10
12
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
11
- export type { GeminiLiveModel, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "./vendors.mjs";
12
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./vendors.mjs";
13
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./gemini-tts.mjs";
14
+ export { GeminiTTS, GeminiTTSModels } from "./gemini-tts.mjs";
15
+ export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.mjs";
16
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
@@ -4,6 +4,8 @@
4
4
  * Preview routing stays here while provider implementations can graduate to
5
5
  * the production vendor modules independently.
6
6
  */
7
+ export { OpenAIGPTLive } from "../vendors/mllm.mjs";
7
8
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
8
9
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
9
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./vendors.mjs";
10
+ export { GeminiTTS, GeminiTTSModels } from "./gemini-tts.mjs";
11
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
@@ -1,105 +1,9 @@
1
- /**
2
- * Preview provider vendor classes.
3
- *
4
- * These follow the same shape as the GA vendor classes in `vendors/` —
5
- * camelCase constructor options in, snake_case wire config out — so they work
6
- * with the corresponding Agent builder method. AgentSession routes them to the
7
- * preview endpoint automatically.
8
- */
9
- import type { McpServersItem, MllmConfig, MllmTurnDetectionConfig } from "../types.mjs";
10
- import { BaseMLLM } from "../vendors/base.mjs";
11
- import type { GeminiLiveOptions } from "../vendors/mllm.mjs";
12
- export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
13
- export declare function isOpenAIGPTLiveConfig(config: unknown): boolean;
14
- /** GPT Live v3 alpha options. Not for production traffic. */
15
- export interface OpenAIGPTLiveOptions {
16
- apiKey: string;
17
- /** Full WebSocket URL, used verbatim except OpenAI's legacy /v1/live route. */
18
- url?: string;
19
- /** @deprecated Use prompt. Serialized as prompt; an explicit prompt wins. */
20
- instructions?: string;
21
- greeting?: string;
22
- failureMessage?: string;
23
- inputModalities?: string[];
24
- outputModalities?: string[];
25
- messages?: Record<string, unknown>[];
26
- /** MCP servers exposed to GPT Live. Requires Agent.withTools(). */
27
- mcpServers?: McpServersItem[];
28
- /** Additional provider fields; explicit options take precedence. */
29
- params?: Record<string, unknown>;
30
- /** @deprecated Unsupported in v3; setting this raises an error. */
31
- inputAudioTranscription?: Record<string, unknown>;
32
- /** @deprecated Ignored with a warning; v3 performs endpointing internally. */
33
- turnDetection?: MllmTurnDetectionConfig;
34
- /** Defaults to gpt-live-1. */
35
- model?: string;
36
- /** Output voice; provider default marin. Custom voice objects require PR #1522; use params after rollout. */
37
- voice?: string;
38
- /** Session instructions. */
39
- prompt?: string;
40
- /** Host when url is omitted; default wss://api.openai.com. */
41
- baseUrl?: string;
42
- /** WebSocket path; default /v1/live/sessions. */
43
- path?: string;
44
- /** Optional OpenAI-Alpha selector for preview contracts. Omitted by default. */
45
- alphaSelector?: string;
46
- /** Extra provider request headers as a JSON string; protocol headers win. */
47
- headers?: string;
48
- /** Assistant silence boundary in ms; provider default 600. Zero disables inference. */
49
- outputIdleEndMs?: number;
50
- /** Caller silence boundary in ms; provider default 1500. */
51
- inputIdleEndMs?: number;
52
- /** Speech amplitude threshold on the 16-bit scale; provider default 50. */
53
- outputSilencePeak?: number;
54
- /** Graph PCM sample rate; provider default 24000. */
55
- outputSampleRate?: number;
56
- /** Initial audio cushion; provider default 0. Negative disables pacing. */
57
- outputBufferMs?: number;
58
- /** Mic append batching in ms. Join default 0; extension class default 100. */
59
- inputBatchMs?: number;
60
- /** Advertise graph tools; provider default false. Does not control delegate built-ins. */
61
- toolEnabled?: boolean;
62
- /** Tool delegation mode; provider default responses. Fixed for the session. */
63
- delegation?: "client" | "responses";
64
- /** Tool delegate model; provider default gpt-5.6-sol. */
65
- responsesModel?: string;
66
- /** Interrupt playback on caller speech; provider default false. */
67
- interruptOnUserTurn?: boolean;
68
- /** Unmodelled v3 session fields. Cannot override model, delegation, audio, instructions or input. */
69
- sessionParams?: Record<string, unknown>;
70
- }
71
- export declare class OpenAIGPTLive extends BaseMLLM {
72
- private readonly options;
73
- constructor(options: OpenAIGPTLiveOptions);
74
- toConfig(): MllmConfig;
75
- }
76
- export declare const GeminiLiveModels: {
77
- /** Public ID for the low-latency voice model. */
78
- readonly Live38: "models/gemini-3.8-live";
79
- /** Public ID for the reasoning voice model. */
80
- readonly Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking";
81
- };
82
- /**
83
- * The model name the Gemini MLLM sends by default.
84
- *
85
- * Low-latency Gemini voice is the default.
86
- */
87
- export declare const GEMINI_MLLM_DEFAULT_MODEL: string;
88
- /**
89
- * A preview Gemini MLLM model. Any string is accepted for launch flexibility;
90
- * the `models/` prefix on the 3.8 IDs is preserved on the wire.
91
- */
92
- export type GeminiLiveModel = (typeof GeminiLiveModels)[keyof typeof GeminiLiveModels] | (string & {});
93
- /** Reasoning budget for Gemini extended thinking. */
94
- export declare const GeminiThinkingLevels: readonly ["low", "medium", "high"];
95
- /** Reasoning budget: `"low"` | `"medium"` | `"high"`. */
96
- export type GeminiThinkingLevel = (typeof GeminiThinkingLevels)[number];
97
- /**
98
- * A Gemini output voice. Known voices autocomplete; any string is accepted so a
99
- * newly published voice can be used before this SDK is updated.
100
- */
101
- export type GeminiPreviewVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | (string & {});
102
- /** Default endpoint for the preview Gemini MLLMs. */
103
- export declare const GEMINI_PREVIEW_MLLM_URL = "https://generativelanguage.googleapis.com";
104
- /** Builds the 3.8 preview wire config from the existing GeminiLive options. */
1
+ /** Legacy preview import aliases for production MLLM implementations. */
2
+ import type { MllmConfig } from "../types.mjs";
3
+ import { type GeminiLiveOptions } from "../vendors/mllm.mjs";
4
+ /** Legacy preview import aliases for the production GPT Live implementation. */
5
+ /** Gemini 3.8 names remain available from the historical preview path. */
6
+ export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "../vendors/mllm.mjs";
7
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.mjs";
8
+ /** @deprecated Use `new GeminiLive(options).toConfig()`. */
105
9
  export declare function buildGeminiPreviewConfig(options: GeminiLiveOptions): MllmConfig;
@@ -1,114 +1,7 @@
1
- /**
2
- * Preview provider vendor classes.
3
- *
4
- * These follow the same shape as the GA vendor classes in `vendors/` —
5
- * camelCase constructor options in, snake_case wire config out — so they work
6
- * with the corresponding Agent builder method. AgentSession routes them to the
7
- * preview endpoint automatically.
8
- */
9
- import { BaseMLLM } from "../vendors/base.mjs";
10
- // =============================================================================
11
- // OpenAI GPT Live (MLLM)
12
- // =============================================================================
13
- export const OPENAI_GPT_LIVE_VENDOR = "openai_gpt_live";
14
- export function isOpenAIGPTLiveConfig(config) {
15
- return (config === null || config === void 0 ? void 0 : config.vendor) === OPENAI_GPT_LIVE_VENDOR;
16
- }
17
- function normalizeMcpServers(servers) {
18
- return servers.map((server) => (Object.assign({ transport: "streamable_http" }, server)));
19
- }
20
- export class OpenAIGPTLive extends BaseMLLM {
21
- constructor(options) {
22
- super();
23
- this.options = options;
24
- if (!options.apiKey)
25
- throw new Error("OpenAIGPTLive requires apiKey");
26
- }
27
- toConfig() {
28
- var _a, _b;
29
- const o = this.options;
30
- const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ model: "gpt-live-1" }, o.params), (o.instructions !== undefined && { prompt: o.instructions })), (o.model !== undefined && { model: o.model })), (o.voice !== undefined && { voice: o.voice })), (o.prompt !== undefined && { prompt: o.prompt })), (o.baseUrl !== undefined && { base_url: o.baseUrl })), (o.path !== undefined && { path: o.path })), (o.alphaSelector !== undefined && { alpha_selector: o.alphaSelector })), (o.headers !== undefined && { headers: o.headers })), (o.outputIdleEndMs !== undefined && { output_idle_end_ms: o.outputIdleEndMs })), (o.inputIdleEndMs !== undefined && { input_idle_end_ms: o.inputIdleEndMs })), (o.outputSilencePeak !== undefined && { output_silence_peak: o.outputSilencePeak })), (o.outputSampleRate !== undefined && { output_sample_rate: o.outputSampleRate })), (o.outputBufferMs !== undefined && { output_buffer_ms: o.outputBufferMs })), (o.inputBatchMs !== undefined && { input_batch_ms: o.inputBatchMs })), (o.toolEnabled !== undefined && { tool_enabled: o.toolEnabled })), (o.delegation !== undefined && { delegation: o.delegation })), (o.responsesModel !== undefined && { responses_model: o.responsesModel })), (o.interruptOnUserTurn !== undefined && { interrupt_on_user_turn: o.interruptOnUserTurn })), (o.sessionParams !== undefined && { session_params: o.sessionParams }));
31
- if (o.inputAudioTranscription !== undefined || "input_audio_transcription" in params) {
32
- throw new Error("GPT Live v3 does not support input_audio_transcription");
33
- }
34
- if (o.turnDetection !== undefined || "turn_detection" in params) {
35
- console.warn("GPT Live v3 ignores turn_detection; endpointing is internal");
36
- delete params.turn_detection;
37
- }
38
- if (params.delegation !== undefined && params.delegation !== "client" && params.delegation !== "responses") {
39
- throw new Error("GPT Live delegation must be client or responses");
40
- }
41
- if (params.headers !== undefined) {
42
- let headers;
43
- try {
44
- headers = JSON.parse(String(params.headers));
45
- }
46
- catch (_c) {
47
- throw new Error("GPT Live headers must be a JSON object string");
48
- }
49
- if (headers === null || typeof headers !== "object" || Array.isArray(headers)) {
50
- throw new Error("GPT Live headers must be a JSON object string");
51
- }
52
- }
53
- const session = params.session_params === undefined ? {} : params.session_params;
54
- if (session === null || typeof session !== "object" || Array.isArray(session)) {
55
- throw new Error("GPT Live session_params must be an object");
56
- }
57
- for (const key of ["model", "delegation", "audio", "instructions", "input"]) {
58
- if (key in session)
59
- throw new Error(`GPT Live session_params cannot override ${key}`);
60
- }
61
- let url = o.url ||
62
- `${String((_a = params.base_url) !== null && _a !== void 0 ? _a : "wss://api.openai.com").replace(/\/+$/, "")}/${String((_b = params.path) !== null && _b !== void 0 ? _b : "/v1/live/sessions").replace(/^\/+/, "")}`;
63
- if (!/^wss?:\/\/[^/]/i.test(url)) {
64
- throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
65
- }
66
- let parsed;
67
- try {
68
- parsed = new URL(url);
69
- }
70
- catch (_d) {
71
- throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
72
- }
73
- if ((parsed.protocol !== "ws:" && parsed.protocol !== "wss:") || !parsed.hostname) {
74
- throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
75
- }
76
- if (parsed.hostname === "api.openai.com" && parsed.pathname === "/v1/live") {
77
- parsed.pathname = "/v1/live/sessions";
78
- url = parsed.toString();
79
- }
80
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: OPENAI_GPT_LIVE_VENDOR, api_key: o.apiKey, url,
81
- params }, (o.greeting !== undefined && { greeting_message: o.greeting })), (o.failureMessage !== undefined && { failure_message: o.failureMessage })), (o.inputModalities !== undefined && { input_modalities: o.inputModalities })), (o.outputModalities !== undefined && { output_modalities: o.outputModalities })), (o.messages !== undefined && { messages: o.messages })), (o.mcpServers !== undefined && { mcp_servers: normalizeMcpServers(o.mcpServers) }));
82
- }
83
- }
84
- // Google preview MLLMs use a separate feature gate from GPT Live.
85
- export const GeminiLiveModels = {
86
- /** Public ID for the low-latency voice model. */
87
- Live38: "models/gemini-3.8-live",
88
- /** Public ID for the reasoning voice model. */
89
- Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking",
90
- };
91
- /**
92
- * The model name the Gemini MLLM sends by default.
93
- *
94
- * Low-latency Gemini voice is the default.
95
- */
96
- export const GEMINI_MLLM_DEFAULT_MODEL = GeminiLiveModels.Live38;
97
- /** Reasoning budget for Gemini extended thinking. */
98
- export const GeminiThinkingLevels = ["low", "medium", "high"];
99
- /** Default endpoint for the preview Gemini MLLMs. */
100
- export const GEMINI_PREVIEW_MLLM_URL = "https://generativelanguage.googleapis.com";
101
- /** Builds the 3.8 preview wire config from the existing GeminiLive options. */
1
+ /** Legacy preview import aliases for production MLLM implementations. */
2
+ import { GeminiLive } from "../vendors/mllm.mjs";
3
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.mjs";
4
+ /** @deprecated Use `new GeminiLive(options).toConfig()`. */
102
5
  export function buildGeminiPreviewConfig(options) {
103
- const { model: requestedModel, apiKey, thinkingLevel, voice = "Puck", languageCodes, url = GEMINI_PREVIEW_MLLM_URL, instructions, transcribeAgent, transcribeUser, affectiveDialog, proactiveAudio, httpOptions, greetingMessage, failureMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = options;
104
- const model = (requestedModel === null || requestedModel === void 0 ? void 0 : requestedModel.trim()) || GEMINI_MLLM_DEFAULT_MODEL;
105
- const reasoningModel = model === GeminiLiveModels.Live38ExtendedThinking;
106
- const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model,
107
- voice }), (reasoningModel && thinkingLevel !== undefined && { thinking_level: thinkingLevel })), (languageCodes && { language_codes: [...languageCodes] })), (instructions && { instructions })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (httpOptions && { http_options: httpOptions }));
108
- if (!reasoningModel) {
109
- delete params.thinking_level;
110
- }
111
- delete params.api_key;
112
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url,
113
- params }, (messages && { messages })), (greetingMessage && { greeting: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (turnDetection && { turn_detection: turnDetection }));
6
+ return new GeminiLive(options).toConfig();
114
7
  }
@@ -2,9 +2,10 @@
2
2
  * Clean type aliases for the Agora Conversational AI SDK.
3
3
  * These provide shorter, more intuitive names for the verbose Fern-generated types.
4
4
  */
5
- import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GeminiAsrParams as GeminiAsrParamsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType, HumeAiTtsParams as HumeAiTtsParamsType, HumeAiTts as HumeAiTtsType, ListAgentsResponse, Llm, LlmToolExecution as LlmToolExecutionType, LlmToolFunction as LlmToolFunctionType, LlmToolServer as LlmToolServerType, LlmTool as LlmToolType, MicrosoftTtsParams as MicrosoftTtsParamsType, MicrosoftTts as MicrosoftTtsType, MinimaxTtsParams as MinimaxTtsParamsType, MinimaxTts as MinimaxTtsType, MistralTtsParams as MistralTtsParamsType, MistralTts as MistralTtsType, Mllm, MllmTurnDetection, MllmTurnDetection as MllmTurnDetectionNS, MurfTtsParams as MurfTtsParamsType, MurfTts as MurfTtsType, OpenAiTtsParams as OpenAiTtsParamsType, OpenAiTts as OpenAiTtsType, RimeTtsParams as RimeTtsParamsType, RimeTts as RimeTtsType, SarvamTtsParams as SarvamTtsParamsType, SarvamTts as SarvamTtsType, SpatiusAvatarParams as SpatiusAvatarParamsType, SpeakAgentsRequest, StartAgentsRequest, Tts, TypecastTtsParams as TypecastTtsParamsType, TypecastTts as TypecastTtsType, UpdateAgentsRequest, XAiAsrParams as XAiAsrParamsType, XAiAsr as XAiAsrType, XAiTtsParams as XAiTtsParamsType, XAiTts as XAiTtsType } from "../api/index.mjs";
5
+ import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GeminiAsrParams as GeminiAsrParamsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType, HumeAiTtsParams as HumeAiTtsParamsType, HumeAiTts as HumeAiTtsType, ListAgentsResponse, Llm, LlmToolExecution as LlmToolExecutionType, LlmToolFunction as LlmToolFunctionType, LlmToolServer as LlmToolServerType, LlmTool as LlmToolType, McpServer as McpServerType, MicrosoftTtsParams as MicrosoftTtsParamsType, MicrosoftTts as MicrosoftTtsType, MinimaxTtsParams as MinimaxTtsParamsType, MinimaxTts as MinimaxTtsType, MistralTtsParams as MistralTtsParamsType, MistralTts as MistralTtsType, Mllm, MllmTurnDetection, MllmTurnDetection as MllmTurnDetectionNS, MurfTtsParams as MurfTtsParamsType, MurfTts as MurfTtsType, OpenAiTtsParams as OpenAiTtsParamsType, OpenAiTts as OpenAiTtsType, RimeTtsParams as RimeTtsParamsType, RimeTts as RimeTtsType, SarvamTtsParams as SarvamTtsParamsType, SarvamTts as SarvamTtsType, SmallestAiAsrParams as SmallestAiAsrParamsType, SmallestAiAsr as SmallestAiAsrType, SmallestAiTtsParams as SmallestAiTtsParamsType, SmallestAiTts as SmallestAiTtsType, SpatiusAvatarParams as SpatiusAvatarParamsType, SpeakAgentsRequest, StartAgentsRequest, Tts, TypecastTtsParams as TypecastTtsParamsType, TypecastTts as TypecastTtsType, UpdateAgentsRequest, XAiAsrParams as XAiAsrParamsType, XAiAsr as XAiAsrType, XAiTtsParams as XAiTtsParamsType, XAiTts as XAiTtsType } from "../api/index.mjs";
6
6
  import type { AgentThinkAgentManagementRequest } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs";
7
7
  import type { PresetInput } from "./presets.mjs";
8
+ import type { GeminiTTSConfig } from "./preview/gemini-tts.mjs";
8
9
  /** LLM request style (openai, gemini, anthropic, dify) */
9
10
  export type LlmStyle = Llm.Style;
10
11
  /**
@@ -84,17 +85,17 @@ export type AsrConfig = SttConfig;
84
85
  /** Wire ASR vendor identifier (e.g. `"deepgram"`, `"fengming"`). */
85
86
  export type AsrVendorName = string;
86
87
  /** TTS (Text-to-Speech) configuration - discriminated union */
87
- export type TtsConfig = Tts;
88
+ export type TtsConfig = Tts | GeminiTTSConfig;
88
89
  /** Inline synchronous REST tool exposed to a standard text LLM. */
89
90
  export type LlmTool = LlmToolType;
90
91
  export type LlmToolExecution = LlmToolExecutionType;
91
92
  export type LlmToolFunction = LlmToolFunctionType;
92
93
  export type LlmToolServer = LlmToolServerType;
93
- /** MLLM configuration, including preview vendors not present in the generated schema yet. */
94
+ /** MLLM configuration, including production vendors not present in the generated schema yet. */
94
95
  export type MllmConfig = Omit<Mllm, "vendor"> & {
95
96
  vendor?: Mllm.Vendor | "openai_gpt_live";
96
97
  };
97
- /** MLLM wire vendor name, including preview vendors. */
98
+ /** MLLM wire vendor name, including schema compatibility extensions. */
98
99
  export type MllmVendor = Exclude<MllmConfig["vendor"], undefined>;
99
100
  /** Avatar configuration */
100
101
  export type AvatarConfig = StartAgentsRequest.Properties.Avatar;
@@ -228,7 +229,9 @@ export type LlmGreetingConfigs = Llm.GreetingConfigs;
228
229
  /** Greeting broadcast ASR policy: `"merge_reply"` | `"context"` */
229
230
  export type LlmGreetingConfigsMode = Llm.GreetingConfigs.UninterruptibleAsrPolicy;
230
231
  /** MCP server config item (`llm.mcp_servers[]` or `mllm.mcp_servers[]`) */
231
- export type McpServersItem = Record<string, unknown>;
232
+ export type McpServer = McpServerType;
233
+ /** @deprecated Use {@link McpServer}. */
234
+ export type McpServersItem = McpServer & Record<string, unknown>;
232
235
  /** Full agent configuration (alias for StartAgentsRequest.Properties) */
233
236
  export type AgentConfig = StartAgentsRequest.Properties;
234
237
  /** Agent configuration update (for runtime updates) */
@@ -561,6 +564,8 @@ export interface SarvamAsrParams {
561
564
  */
562
565
  export type XAiAsr = XAiAsrType;
563
566
  export type XAiAsrParams = XAiAsrParamsType;
567
+ export type SmallestAiAsr = SmallestAiAsrType;
568
+ export type SmallestAiAsrParams = SmallestAiAsrParamsType;
564
569
  /** Google Gemini STT parameters generated from the API schema. */
565
570
  export type GeminiAsrParams = GeminiAsrParamsType;
566
571
  export type MicrosoftTts = MicrosoftTtsType;
@@ -595,6 +600,8 @@ export type SarvamTts = SarvamTtsType;
595
600
  export type SarvamTtsParams = SarvamTtsParamsType;
596
601
  export type XAiTts = XAiTtsType;
597
602
  export type XAiTtsParams = XAiTtsParamsType;
603
+ export type SmallestAiTts = SmallestAiTtsType;
604
+ export type SmallestAiTtsParams = SmallestAiTtsParamsType;
598
605
  export type TypecastTts = TypecastTtsType;
599
606
  export type TypecastTtsParams = TypecastTtsParamsType;
600
607
  export type SpatiusAvatarParams = SpatiusAvatarParamsType;
@@ -5,7 +5,7 @@
5
5
  * that converts TypeScript-friendly constructor params (camelCase) into the
6
6
  * Agora API format (snake_case).
7
7
  */
8
- import type { AvatarConfig, LlmConfig, LlmGreetingConfigs, LlmTool, McpServersItem, MllmConfig, SttConfig, TtsConfig } from "../types.mjs";
8
+ import type { AvatarConfig, LlmConfig, LlmGreetingConfigs, LlmTool, McpServer, McpServersItem, MllmConfig, SttConfig, TtsConfig } from "../types.mjs";
9
9
  /**
10
10
  * Common options shared by all LLM vendor classes.
11
11
  * These map directly to top-level fields on `LlmConfig` that are not
@@ -47,6 +47,13 @@ export interface BaseLlmOptions {
47
47
  /** Inline synchronous REST tools exposed to the LLM for function calling. Requires `withTools(true)`. */
48
48
  tools?: LlmTool[];
49
49
  }
50
+ /** Tool configuration shared by all MLLM vendor helpers. */
51
+ export interface BaseMllmOptions {
52
+ /** MCP servers exposed to the MLLM. Requires `Agent.withTools()`. */
53
+ mcpServers?: McpServer[];
54
+ /** Inline synchronous REST tools exposed to the MLLM. Requires `Agent.withTools()`. */
55
+ tools?: LlmTool[];
56
+ }
50
57
  type VendorScope = "global" | "cn";
51
58
  /**
52
59
  * Standard audio sample rates supported by Agora platform.
@@ -169,7 +176,11 @@ export declare abstract class BaseCNSTT extends ScopedBaseSTT<"cn"> {
169
176
  */
170
177
  declare abstract class ScopedBaseMLLM<TScope extends VendorScope> {
171
178
  readonly areaScope: TScope;
172
- constructor(areaScope: TScope);
179
+ private readonly _mcpServers?;
180
+ private readonly _tools?;
181
+ constructor(areaScope: TScope, options?: BaseMllmOptions);
182
+ protected get mcpServers(): McpServer[] | undefined;
183
+ protected get tools(): LlmTool[] | undefined;
173
184
  /**
174
185
  * Converts the vendor configuration to the Agora API format.
175
186
  */
@@ -177,11 +188,11 @@ declare abstract class ScopedBaseMLLM<TScope extends VendorScope> {
177
188
  }
178
189
  /** Base class for global MLLM vendors. */
179
190
  export declare abstract class BaseMLLM extends ScopedBaseMLLM<"global"> {
180
- constructor();
191
+ constructor(options?: BaseMllmOptions);
181
192
  }
182
193
  /** Base class for Chinese mainland MLLM vendors. */
183
194
  export declare abstract class BaseCNMLLM extends ScopedBaseMLLM<"cn"> {
184
- constructor();
195
+ constructor(options?: BaseMllmOptions);
185
196
  }
186
197
  /**
187
198
  * Base class for Avatar vendors with required sample rate.
@@ -109,20 +109,31 @@ export class BaseCNSTT extends ScopedBaseSTT {
109
109
  * Base class for MLLM (Multimodal Large Language Model) vendors.
110
110
  */
111
111
  class ScopedBaseMLLM {
112
- constructor(areaScope) {
112
+ constructor(areaScope, options) {
113
113
  this.areaScope = areaScope;
114
+ this._mcpServers = options === null || options === void 0 ? void 0 : options.mcpServers;
115
+ this._tools = options === null || options === void 0 ? void 0 : options.tools;
116
+ }
117
+ get mcpServers() {
118
+ var _a;
119
+ if (!((_a = this._mcpServers) === null || _a === void 0 ? void 0 : _a.length))
120
+ return this._mcpServers;
121
+ return this._mcpServers.map((server) => server.transport ? server : Object.assign(Object.assign({}, server), { transport: "streamable_http" }));
122
+ }
123
+ get tools() {
124
+ return this._tools;
114
125
  }
115
126
  }
116
127
  /** Base class for global MLLM vendors. */
117
128
  export class BaseMLLM extends ScopedBaseMLLM {
118
- constructor() {
119
- super("global");
129
+ constructor(options) {
130
+ super("global", options);
120
131
  }
121
132
  }
122
133
  /** Base class for Chinese mainland MLLM vendors. */
123
134
  export class BaseCNMLLM extends ScopedBaseMLLM {
124
- constructor() {
125
- super("cn");
135
+ constructor(options) {
136
+ super("cn", options);
126
137
  }
127
138
  }
128
139
  /**
@@ -213,8 +213,8 @@ export class StepFunTTS extends BaseCNTTS {
213
213
  }
214
214
  }
215
215
  function cnLlmConfig(options, vendor) {
216
- var _a;
217
- return Object.assign(Object.assign({ url: options.url }, (options.apiKey && { api_key: options.apiKey })), { params: Object.assign({ model: options.model }, options.params), headers: options.headers, max_history: options.maxHistory, system_messages: options.systemMessages, greeting_message: options.greetingMessage, greeting_audio_url: options.greetingAudioUrl, failure_message: options.failureMessage, input_modalities: (_a = options.inputModalities) !== null && _a !== void 0 ? _a : ["text"], output_modalities: options.outputModalities, style: "openai", vendor, greeting_configs: options.greetingConfigs, template_variables: options.templateVariables, mcp_servers: options.mcpServers, tools: options.tools });
216
+ var _a, _b;
217
+ return Object.assign(Object.assign({ url: options.url }, (options.apiKey && { api_key: options.apiKey })), { params: Object.assign({ model: options.model }, options.params), headers: options.headers, max_history: options.maxHistory, system_messages: options.systemMessages, greeting_message: options.greetingMessage, greeting_audio_url: options.greetingAudioUrl, failure_message: options.failureMessage, input_modalities: (_a = options.inputModalities) !== null && _a !== void 0 ? _a : ["text"], output_modalities: options.outputModalities, style: "openai", vendor, greeting_configs: options.greetingConfigs, template_variables: options.templateVariables, mcp_servers: (_b = options.mcpServers) === null || _b === void 0 ? void 0 : _b.map((server) => server.transport ? server : Object.assign(Object.assign({}, server), { transport: "streamable_http" })), tools: options.tools });
218
218
  }
219
219
  export class AliyunLLM extends BaseCNLLM {
220
220
  constructor(options) {
@@ -206,7 +206,7 @@ export class Gemini extends BaseLLM {
206
206
  }
207
207
  }
208
208
  function openAIStyleConfig(options, vendor) {
209
- var _a, _b;
209
+ var _a, _b, _c;
210
210
  return {
211
211
  url: options.url,
212
212
  api_key: options.apiKey,
@@ -223,7 +223,7 @@ function openAIStyleConfig(options, vendor) {
223
223
  vendor: (_b = options.vendor) !== null && _b !== void 0 ? _b : vendor,
224
224
  greeting_configs: options.greetingConfigs,
225
225
  template_variables: options.templateVariables,
226
- mcp_servers: options.mcpServers,
226
+ mcp_servers: (_c = options.mcpServers) === null || _c === void 0 ? void 0 : _c.map((server) => server.transport ? server : Object.assign(Object.assign({}, server), { transport: "streamable_http" })),
227
227
  tools: options.tools,
228
228
  };
229
229
  }
@@ -5,13 +5,95 @@
5
5
  * ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` automatically
6
6
  * sets `mllm.enable: true`.
7
7
  */
8
- import type { GeminiThinkingLevel } from "../preview/vendors.mjs";
9
8
  import type { MllmConfig, MllmTurnDetectionConfig } from "../types.mjs";
10
- import { BaseCNMLLM, BaseMLLM } from "./base.mjs";
9
+ import { BaseCNMLLM, BaseMLLM, type BaseMllmOptions } from "./base.mjs";
10
+ export declare const GeminiLiveModels: {
11
+ /** Public ID for the low-latency voice model. */
12
+ readonly Live38: "models/gemini-3.8-live";
13
+ /** Public ID for the reasoning voice model. */
14
+ readonly Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking";
15
+ };
16
+ /** The model Gemini Live sends by default. */
17
+ export declare const GEMINI_MLLM_DEFAULT_MODEL: string;
18
+ /** Default Gemini Developer API endpoint for Gemini 3.8 models. */
19
+ export declare const GEMINI_MLLM_URL = "https://generativelanguage.googleapis.com";
20
+ /** @deprecated Use {@link GEMINI_MLLM_URL}. */
21
+ export declare const GEMINI_PREVIEW_MLLM_URL: string;
22
+ /** A Gemini Live model. Known models autocomplete while future model IDs remain accepted. */
23
+ export type GeminiLiveModel = (typeof GeminiLiveModels)[keyof typeof GeminiLiveModels] | (string & {});
24
+ /** Reasoning budgets accepted by Gemini Extended Thinking. */
25
+ export declare const GeminiThinkingLevels: readonly ["low", "medium", "high"];
26
+ export type GeminiThinkingLevel = (typeof GeminiThinkingLevels)[number];
27
+ /** Known Gemini output voices; future voice names remain accepted. */
28
+ export type GeminiLiveVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | (string & {});
29
+ /** @deprecated Use {@link GeminiLiveVoice}. */
30
+ export type GeminiPreviewVoice = GeminiLiveVoice;
31
+ export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
32
+ export declare function isOpenAIGPTLiveConfig(config: unknown): boolean;
33
+ /** GPT Live v3 options. */
34
+ export interface OpenAIGPTLiveOptions extends BaseMllmOptions {
35
+ apiKey: string;
36
+ /** Full WebSocket URL, used verbatim except OpenAI's legacy /v1/live route. */
37
+ url?: string;
38
+ /** @deprecated Use prompt. Serialized as prompt; an explicit prompt wins. */
39
+ instructions?: string;
40
+ greeting?: string;
41
+ failureMessage?: string;
42
+ inputModalities?: string[];
43
+ outputModalities?: string[];
44
+ messages?: Record<string, unknown>[];
45
+ /** Additional provider fields; explicit options take precedence. */
46
+ params?: Record<string, unknown>;
47
+ /** @deprecated Unsupported in v3; setting this raises an error. */
48
+ inputAudioTranscription?: Record<string, unknown>;
49
+ /** @deprecated Ignored with a warning; v3 performs endpointing internally. */
50
+ turnDetection?: MllmTurnDetectionConfig;
51
+ /** Defaults to gpt-live-1. */
52
+ model?: string;
53
+ /** Output voice; provider default marin. Custom voice objects require PR #1522; use params after rollout. */
54
+ voice?: string;
55
+ /** Session instructions. */
56
+ prompt?: string;
57
+ /** Host when url is omitted; default wss://api.openai.com. */
58
+ baseUrl?: string;
59
+ /** WebSocket path; default /v1/live/sessions. */
60
+ path?: string;
61
+ /** Optional OpenAI-Alpha selector for preview contracts. Omitted by default. */
62
+ alphaSelector?: string;
63
+ /** Extra provider request headers as a JSON string; protocol headers win. */
64
+ headers?: string;
65
+ /** Assistant silence boundary in ms; provider default 600. Zero disables inference. */
66
+ outputIdleEndMs?: number;
67
+ /** Caller silence boundary in ms; provider default 1500. */
68
+ inputIdleEndMs?: number;
69
+ /** Speech amplitude threshold on the 16-bit scale; provider default 50. */
70
+ outputSilencePeak?: number;
71
+ /** Graph PCM sample rate; provider default 24000. */
72
+ outputSampleRate?: number;
73
+ /** Initial audio cushion; provider default 0. Negative disables pacing. */
74
+ outputBufferMs?: number;
75
+ /** Mic append batching in ms. Join default 0; extension class default 100. */
76
+ inputBatchMs?: number;
77
+ /** Advertise graph tools; provider default false. Does not control delegate built-ins. */
78
+ toolEnabled?: boolean;
79
+ /** Tool delegation mode; provider default responses. Fixed for the session. */
80
+ delegation?: "client" | "responses";
81
+ /** Tool delegate model; provider default gpt-5.6-sol. */
82
+ responsesModel?: string;
83
+ /** Interrupt playback on caller speech; provider default false. */
84
+ interruptOnUserTurn?: boolean;
85
+ /** Unmodelled v3 session fields. Cannot override model, delegation, audio, instructions or input. */
86
+ sessionParams?: Record<string, unknown>;
87
+ }
88
+ export declare class OpenAIGPTLive extends BaseMLLM {
89
+ private readonly options;
90
+ constructor(options: OpenAIGPTLiveOptions);
91
+ toConfig(): MllmConfig;
92
+ }
11
93
  /**
12
94
  * Constructor options for OpenAI Realtime API.
13
95
  */
14
- export interface OpenAIRealtimeOptions {
96
+ export interface OpenAIRealtimeOptions extends BaseMllmOptions {
15
97
  /** OpenAI API key */
16
98
  apiKey: string;
17
99
  /** Model name (e.g., 'gpt-4o-realtime-preview') */
@@ -67,7 +149,7 @@ export interface AzureOpenAIRealtimeParams {
67
149
  voice?: string;
68
150
  }
69
151
  /** Constructor options for Azure OpenAI Realtime API. */
70
- export interface AzureOpenAIRealtimeOptions {
152
+ export interface AzureOpenAIRealtimeOptions extends BaseMllmOptions {
71
153
  /** Azure OpenAI API key */
72
154
  apiKey: string;
73
155
  /** Azure OpenAI Realtime WebSocket URL, including deployment routing when required */
@@ -113,11 +195,11 @@ export declare class AzureOpenAIRealtime extends BaseMLLM {
113
195
  /**
114
196
  * Constructor options for Google Gemini Live (direct API, non-Vertex AI).
115
197
  */
116
- export interface GeminiLiveOptions {
198
+ export interface GeminiLiveOptions extends BaseMllmOptions {
117
199
  /** Google API key */
118
200
  apiKey: string;
119
201
  /** Model name (e.g., 'gemini-live-2.5-flash') */
120
- model?: string;
202
+ model?: GeminiLiveModel;
121
203
  /** Sent only for models/gemini-3.8-live-extended-thinking. */
122
204
  thinkingLevel?: GeminiThinkingLevel;
123
205
  /** Languages for Gemini 3.8, sent as params.language_codes. */
@@ -127,7 +209,7 @@ export interface GeminiLiveOptions {
127
209
  /** System instructions for the model */
128
210
  instructions?: string;
129
211
  /** Voice name (e.g., 'Aoede', 'Charon') */
130
- voice?: string;
212
+ voice?: GeminiLiveVoice;
131
213
  affectiveDialog?: boolean;
132
214
  proactiveAudio?: boolean;
133
215
  transcribeAgent?: boolean;
@@ -172,7 +254,7 @@ export declare class GeminiLive extends BaseMLLM {
172
254
  /**
173
255
  * Constructor options for Google Gemini Live (Vertex AI).
174
256
  */
175
- export interface VertexAIOptions {
257
+ export interface VertexAIOptions extends BaseMllmOptions {
176
258
  /** Model name (e.g., 'gemini-live-2.5-flash-preview-native-audio-09-2025') */
177
259
  model: string;
178
260
  /** WebSocket URL for real-time communication */
@@ -233,7 +315,7 @@ export declare class VertexAI extends BaseMLLM {
233
315
  /**
234
316
  * Constructor options for xAI Grok Realtime API.
235
317
  */
236
- export interface XaiGrokOptions {
318
+ export interface XaiGrokOptions extends BaseMllmOptions {
237
319
  /** xAI API key */
238
320
  apiKey: string;
239
321
  /** WebSocket URL for real-time communication (defaults to xAI Realtime API) */
@@ -284,7 +366,7 @@ export declare class XaiGrok extends BaseMLLM {
284
366
  toConfig(): MllmConfig;
285
367
  }
286
368
  /** Constructor options for Alibaba Cloud Qwen Omni Realtime. */
287
- export interface QwenOmniOptions {
369
+ export interface QwenOmniOptions extends BaseMllmOptions {
288
370
  /** Alibaba Cloud DashScope API key */
289
371
  apiKey: string;
290
372
  /** Qwen Omni model identifier */