agora-agents 2.8.1 → 2.9.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 (33) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/AgentSession.js +1 -0
  3. package/dist/cjs/agentkit/index.d.ts +2 -2
  4. package/dist/cjs/agentkit/index.js +6 -2
  5. package/dist/cjs/agentkit/preview/client.d.ts +19 -5
  6. package/dist/cjs/agentkit/preview/client.js +76 -1
  7. package/dist/cjs/agentkit/preview/index.d.ts +3 -3
  8. package/dist/cjs/agentkit/preview/index.js +6 -1
  9. package/dist/cjs/agentkit/preview/vendors.d.ts +31 -0
  10. package/dist/cjs/agentkit/preview/vendors.js +33 -1
  11. package/dist/cjs/agentkit/vendors/mllm.d.ts +7 -2
  12. package/dist/cjs/agentkit/vendors/mllm.js +13 -2
  13. package/dist/cjs/index.d.ts +2 -2
  14. package/dist/cjs/index.js +7 -3
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/esm/BaseClient.mjs +2 -2
  18. package/dist/esm/agentkit/AgentSession.mjs +2 -1
  19. package/dist/esm/agentkit/index.d.mts +2 -2
  20. package/dist/esm/agentkit/index.mjs +1 -1
  21. package/dist/esm/agentkit/preview/client.d.mts +19 -5
  22. package/dist/esm/agentkit/preview/client.mjs +76 -2
  23. package/dist/esm/agentkit/preview/index.d.mts +3 -3
  24. package/dist/esm/agentkit/preview/index.mjs +2 -2
  25. package/dist/esm/agentkit/preview/vendors.d.mts +31 -0
  26. package/dist/esm/agentkit/preview/vendors.mjs +31 -0
  27. package/dist/esm/agentkit/vendors/mllm.d.mts +7 -2
  28. package/dist/esm/agentkit/vendors/mllm.mjs +13 -2
  29. package/dist/esm/index.d.mts +2 -2
  30. package/dist/esm/index.mjs +1 -1
  31. package/dist/esm/version.d.mts +1 -1
  32. package/dist/esm/version.mjs +1 -1
  33. package/package.json +1 -1
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_js_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "agora-agents",
44
- "X-Fern-SDK-Version": "v2.8.1",
45
- "User-Agent": "agora-agents/v2.8.1",
44
+ "X-Fern-SDK-Version": "v2.9.0",
45
+ "User-Agent": "agora-agents/v2.9.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -436,6 +436,7 @@ class AgentSession {
436
436
  });
437
437
  const enrichedProperties = this._enrichAvatarParams(resolved.properties, expiresIn);
438
438
  this._validateEnrichedAvatarConfig(enrichedProperties);
439
+ (0, client_js_1.applyPreviewShape)(enrichedProperties);
439
440
  this._previewFeatures = (0, client_js_1.requiredPreviewFeatures)(enrichedProperties);
440
441
  if (this._previewFeatures.length > 0) {
441
442
  const route = (0, client_js_1.createPreviewRoute)(this._client, this._previewFeatures);
@@ -31,8 +31,8 @@ export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPre
31
31
  export { AgentPresets, normalizePresetInput } from "./presets.js";
32
32
  export type { PreviewFeature, PreviewRoute } from "./preview/client.js";
33
33
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.js";
34
- export type { OpenAIGPTLiveOptions } from "./preview/vendors.js";
35
- export { OpenAIGPTLive } from "./preview/vendors.js";
34
+ export type { GeminiLiveModel, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "./preview/vendors.js";
35
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./preview/vendors.js";
36
36
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.js";
37
37
  export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
38
38
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.js";
@@ -21,8 +21,8 @@
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.normalizePresetInput = exports.AgentPresets = exports.redactSecrets = exports.redactHeadersForDebug = exports.REDACTED = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SilenceActionValues = exports.SalModeValues = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.Geofence = exports.FillerWordsSelectionRule = exports.DataChannel = exports.CredentialMode = exports.AudioScenario = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.toBaseAvatarConfig = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.AgentSession = exports.Agent = void 0;
24
- exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.OpenAIGPTLive = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
- exports.XAiTTS = exports.TypecastTTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.VertexAILLM = void 0;
24
+ exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
+ exports.XAiTTS = exports.TypecastTTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = void 0;
26
26
  // Core classes
27
27
  var Agent_js_1 = require("./Agent.js");
28
28
  Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return Agent_js_1.Agent; } });
@@ -86,6 +86,10 @@ Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: funct
86
86
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
87
87
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
88
88
  var vendors_js_1 = require("./preview/vendors.js");
89
+ Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
90
+ Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_PREVIEW_MLLM_URL; } });
91
+ Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return vendors_js_1.GeminiLiveModels; } });
92
+ Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return vendors_js_1.GeminiThinkingLevels; } });
89
93
  Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return vendors_js_1.OpenAIGPTLive; } });
90
94
  // Token generation
91
95
  var token_js_1 = require("./token.js");
@@ -31,7 +31,7 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
- /** @deprecated Gemini ASR now uses the production endpoint. */
34
+ /** Gemini preview MLLM gate; Gemini ASR uses the production endpoint. */
35
35
  readonly GeminiLive: "gemini-live";
36
36
  readonly LiveModels: "live-models";
37
37
  };
@@ -51,9 +51,23 @@ export interface PreviewRoute {
51
51
  export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
52
52
  /** Build generated resource clients for one preview session. */
53
53
  export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
54
+ export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
54
55
  /**
55
- * Returns the preview features a start request needs, derived from the request
56
- * body rather than from the vendor classes — so hand-written configs are
57
- * covered too.
56
+ * Retargets MLLM fields that the shared builder wrote using production
57
+ * spellings, so a preview config follows the preview route's structure.
58
+ *
59
+ * `Agent` fills `mllm.greeting_message` from an agent-level `greeting` whenever
60
+ * the vendor has not set that key — correct for every GA vendor, but the
61
+ * preview Gemini models read `greeting`, so the value would land in a field
62
+ * they ignore and the agent would silently never greet.
63
+ *
64
+ * Rather than teach the shared builder about preview providers, the translation
65
+ * lives here and disappears with this directory at GA. The vendor's own value
66
+ * wins; the production-spelled one is the fallback, which also migrates a
67
+ * hand-written `greeting_message` onto the preview key so an existing config
68
+ * keeps working after only swapping the model.
69
+ *
70
+ * Mutates `properties.mllm` in place. Safe because every SDK hands this a fresh
71
+ * copy of the MLLM config rather than the Agent's stored one.
58
72
  */
59
- export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
73
+ export declare function applyPreviewShape(properties: Agora.StartAgentsRequest.Properties): void;
@@ -26,6 +26,7 @@ exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_B
26
26
  exports.previewRequestHeaders = previewRequestHeaders;
27
27
  exports.createPreviewRoute = createPreviewRoute;
28
28
  exports.requiredPreviewFeatures = requiredPreviewFeatures;
29
+ exports.applyPreviewShape = applyPreviewShape;
29
30
  const Client_js_1 = require("../../api/resources/agentManagement/client/Client.js");
30
31
  const Client_js_2 = require("../../api/resources/agents/client/Client.js");
31
32
  const vendors_js_1 = require("./vendors.js");
@@ -45,7 +46,7 @@ exports.PREVIEW_FEATURE_HEADER = "agora-feature";
45
46
  * preview endpoint.
46
47
  */
47
48
  exports.PreviewFeatures = {
48
- /** @deprecated Gemini ASR now uses the production endpoint. */
49
+ /** Gemini preview MLLM gate; Gemini ASR uses the production endpoint. */
49
50
  GeminiLive: "gemini-live",
50
51
  LiveModels: "live-models",
51
52
  };
@@ -80,6 +81,42 @@ const PREVIEW_ASR_VENDORS = new Set();
80
81
  * body rather than from the vendor classes — so hand-written configs are
81
82
  * covered too.
82
83
  */
84
+ const PREVIEW_MLLM_MODELS = new Set([
85
+ "models/gemini-3.8-live",
86
+ "models/gemini-3.8-live-extended-thinking",
87
+ ]);
88
+ /**
89
+ * Whether a config carries the envelope the preview MLLM vendor classes emit:
90
+ * a top-level `mllm.api_key`, and a `url` on the Gemini Developer API host.
91
+ * GeminiLive configurations for older model IDs use a different URL: `""` or
92
+ * a WebSocket endpoint.
93
+ *
94
+ * This is the second recognition path, and it exists because keying only off
95
+ * {@link PREVIEW_MLLM_MODELS} makes an unrecognised model name fail silently:
96
+ * {@link applyPreviewShape} would stop retargeting `greeting_message`, the
97
+ * greeting would land in a field these models ignore, and the agent would
98
+ * simply never greet. A model name we have not listed yet is reachable by
99
+ * following this SDK's own advice to override `model` when Google renames one
100
+ * ahead of a release, so the failure has to not be silent.
101
+ */
102
+ function hasPreviewMllmEnvelope(mllm) {
103
+ return (typeof mllm.api_key === "string" && typeof mllm.url === "string" && mllm.url.startsWith(vendors_js_1.GEMINI_PREVIEW_MLLM_URL));
104
+ }
105
+ /**
106
+ * Whether an MLLM config targets a preview model — by name, or by the wire
107
+ * envelope only the preview vendor classes produce.
108
+ */
109
+ function isPreviewMllm(mllm) {
110
+ var _a;
111
+ if (!mllm || mllm.vendor !== "gemini") {
112
+ return false;
113
+ }
114
+ const model = (_a = mllm.params) === null || _a === void 0 ? void 0 : _a.model;
115
+ if (typeof model === "string" && PREVIEW_MLLM_MODELS.has(model)) {
116
+ return true;
117
+ }
118
+ return hasPreviewMllmEnvelope(mllm);
119
+ }
83
120
  function requiredPreviewFeatures(properties) {
84
121
  var _a;
85
122
  const features = new Set();
@@ -90,5 +127,43 @@ function requiredPreviewFeatures(properties) {
90
127
  if ((0, vendors_js_1.isOpenAIGPTLiveConfig)(properties.mllm)) {
91
128
  features.add(exports.PreviewFeatures.LiveModels);
92
129
  }
130
+ if (isPreviewMllm(properties.mllm)) {
131
+ features.add(exports.PreviewFeatures.GeminiLive);
132
+ }
93
133
  return [...features];
94
134
  }
135
+ const PREVIEW_MLLM_FIELD_RENAMES = new Map([["greeting_message", "greeting"]]);
136
+ /**
137
+ * Retargets MLLM fields that the shared builder wrote using production
138
+ * spellings, so a preview config follows the preview route's structure.
139
+ *
140
+ * `Agent` fills `mllm.greeting_message` from an agent-level `greeting` whenever
141
+ * the vendor has not set that key — correct for every GA vendor, but the
142
+ * preview Gemini models read `greeting`, so the value would land in a field
143
+ * they ignore and the agent would silently never greet.
144
+ *
145
+ * Rather than teach the shared builder about preview providers, the translation
146
+ * lives here and disappears with this directory at GA. The vendor's own value
147
+ * wins; the production-spelled one is the fallback, which also migrates a
148
+ * hand-written `greeting_message` onto the preview key so an existing config
149
+ * keeps working after only swapping the model.
150
+ *
151
+ * Mutates `properties.mllm` in place. Safe because every SDK hands this a fresh
152
+ * copy of the MLLM config rather than the Agent's stored one.
153
+ */
154
+ function applyPreviewShape(properties) {
155
+ const mllm = properties.mllm;
156
+ if (!mllm || !isPreviewMllm(mllm)) {
157
+ return;
158
+ }
159
+ for (const [production, preview] of PREVIEW_MLLM_FIELD_RENAMES) {
160
+ const value = mllm[production];
161
+ if (value === undefined) {
162
+ continue;
163
+ }
164
+ if (mllm[preview] === undefined) {
165
+ mllm[preview] = value;
166
+ }
167
+ delete mllm[production];
168
+ }
169
+ }
@@ -7,6 +7,6 @@
7
7
  export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.js";
8
8
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.js";
9
9
  export type { PreviewFeature, PreviewRoute } from "./client.js";
10
- export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.js";
11
- export type { OpenAIGPTLiveOptions } from "./vendors.js";
12
- export { OpenAIGPTLive } from "./vendors.js";
10
+ export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.js";
11
+ export type { GeminiLiveModel, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "./vendors.js";
12
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./vendors.js";
@@ -6,12 +6,13 @@
6
6
  * the production vendor modules independently.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.OpenAIGPTLive = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = void 0;
9
+ exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = void 0;
10
10
  var stt_js_1 = require("../vendors/stt.js");
11
11
  Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return stt_js_1.GeminiSTT; } });
12
12
  Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return stt_js_1.GeminiSTTModels; } });
13
13
  Object.defineProperty(exports, "GeminiTranscriptionMode", { enumerable: true, get: function () { return stt_js_1.GeminiTranscriptionMode; } });
14
14
  var client_js_1 = require("./client.js");
15
+ Object.defineProperty(exports, "applyPreviewShape", { enumerable: true, get: function () { return client_js_1.applyPreviewShape; } });
15
16
  Object.defineProperty(exports, "createPreviewRoute", { enumerable: true, get: function () { return client_js_1.createPreviewRoute; } });
16
17
  Object.defineProperty(exports, "PREVIEW_API_BASE_URL", { enumerable: true, get: function () { return client_js_1.PREVIEW_API_BASE_URL; } });
17
18
  Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get: function () { return client_js_1.PREVIEW_FEATURE_HEADER; } });
@@ -19,4 +20,8 @@ Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: funct
19
20
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
20
21
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
21
22
  var vendors_js_1 = require("./vendors.js");
23
+ Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
24
+ Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_PREVIEW_MLLM_URL; } });
25
+ Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return vendors_js_1.GeminiLiveModels; } });
26
+ Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return vendors_js_1.GeminiThinkingLevels; } });
22
27
  Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return vendors_js_1.OpenAIGPTLive; } });
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import type { McpServersItem, MllmConfig, MllmTurnDetectionConfig } from "../types.js";
10
10
  import { BaseMLLM } from "../vendors/base.js";
11
+ import type { GeminiLiveOptions } from "../vendors/mllm.js";
11
12
  export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
12
13
  export declare function isOpenAIGPTLiveConfig(config: unknown): boolean;
13
14
  /** GPT Live v3 alpha options. Not for production traffic. */
@@ -72,3 +73,33 @@ export declare class OpenAIGPTLive extends BaseMLLM {
72
73
  constructor(options: OpenAIGPTLiveOptions);
73
74
  toConfig(): MllmConfig;
74
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. */
105
+ export declare function buildGeminiPreviewConfig(options: GeminiLiveOptions): MllmConfig;
@@ -8,8 +8,9 @@
8
8
  * preview endpoint automatically.
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = void 0;
11
+ exports.GEMINI_PREVIEW_MLLM_URL = exports.GeminiThinkingLevels = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiLiveModels = exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = void 0;
12
12
  exports.isOpenAIGPTLiveConfig = isOpenAIGPTLiveConfig;
13
+ exports.buildGeminiPreviewConfig = buildGeminiPreviewConfig;
13
14
  const base_js_1 = require("../vendors/base.js");
14
15
  // =============================================================================
15
16
  // OpenAI GPT Live (MLLM)
@@ -86,3 +87,34 @@ class OpenAIGPTLive extends base_js_1.BaseMLLM {
86
87
  }
87
88
  }
88
89
  exports.OpenAIGPTLive = OpenAIGPTLive;
90
+ // Google preview MLLMs use a separate feature gate from GPT Live.
91
+ exports.GeminiLiveModels = {
92
+ /** Public ID for the low-latency voice model. */
93
+ Live38: "models/gemini-3.8-live",
94
+ /** Public ID for the reasoning voice model. */
95
+ Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking",
96
+ };
97
+ /**
98
+ * The model name the Gemini MLLM sends by default.
99
+ *
100
+ * Low-latency Gemini voice is the default.
101
+ */
102
+ exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiLiveModels.Live38;
103
+ /** Reasoning budget for Gemini extended thinking. */
104
+ exports.GeminiThinkingLevels = ["low", "medium", "high"];
105
+ /** Default endpoint for the preview Gemini MLLMs. */
106
+ exports.GEMINI_PREVIEW_MLLM_URL = "https://generativelanguage.googleapis.com";
107
+ /** Builds the 3.8 preview wire config from the existing GeminiLive options. */
108
+ function buildGeminiPreviewConfig(options) {
109
+ const { model: requestedModel, apiKey, thinkingLevel, voice = "Puck", languageCodes, url = exports.GEMINI_PREVIEW_MLLM_URL, instructions, transcribeAgent, transcribeUser, affectiveDialog, proactiveAudio, httpOptions, greetingMessage, failureMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = options;
110
+ const model = (requestedModel === null || requestedModel === void 0 ? void 0 : requestedModel.trim()) || exports.GEMINI_MLLM_DEFAULT_MODEL;
111
+ const reasoningModel = model === exports.GeminiLiveModels.Live38ExtendedThinking;
112
+ const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model,
113
+ 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 }));
114
+ if (!reasoningModel) {
115
+ delete params.thinking_level;
116
+ }
117
+ delete params.api_key;
118
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url,
119
+ params }, (messages && { messages })), (greetingMessage && { greeting: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (turnDetection && { turn_detection: turnDetection }));
120
+ }
@@ -5,6 +5,7 @@
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.js";
8
9
  import type { MllmConfig, MllmTurnDetectionConfig } from "../types.js";
9
10
  import { BaseCNMLLM, BaseMLLM } from "./base.js";
10
11
  /**
@@ -116,8 +117,12 @@ export interface GeminiLiveOptions {
116
117
  /** Google API key */
117
118
  apiKey: string;
118
119
  /** Model name (e.g., 'gemini-live-2.5-flash') */
119
- model: string;
120
- /** WebSocket URL for real-time communication */
120
+ model?: string;
121
+ /** Sent only for models/gemini-3.8-live-extended-thinking. */
122
+ thinkingLevel?: GeminiThinkingLevel;
123
+ /** Languages for Gemini 3.8, sent as params.language_codes. */
124
+ languageCodes?: readonly string[];
125
+ /** Endpoint override; Gemini 3.8 defaults to the Developer API host. */
121
126
  url?: string;
122
127
  /** System instructions for the model */
123
128
  instructions?: string;
@@ -8,6 +8,7 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.QwenOmni = exports.XaiGrok = exports.VertexAI = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.OpenAIRealtime = void 0;
11
+ const vendors_js_1 = require("../preview/vendors.js");
11
12
  const base_js_1 = require("./base.js");
12
13
  function requireString(value, field, vendor) {
13
14
  if (typeof value !== "string" || value.length === 0) {
@@ -102,11 +103,21 @@ exports.AzureOpenAIRealtime = AzureOpenAIRealtime;
102
103
  class GeminiLive extends base_js_1.BaseMLLM {
103
104
  constructor(options) {
104
105
  super();
105
- this.options = options;
106
+ if (!options.apiKey.trim()) {
107
+ throw new Error("GeminiLive requires apiKey");
108
+ }
109
+ if (options.thinkingLevel !== undefined && !vendors_js_1.GeminiThinkingLevels.includes(options.thinkingLevel)) {
110
+ throw new Error("GeminiLive thinkingLevel must be low, medium, or high");
111
+ }
112
+ this.options = Object.assign(Object.assign({}, options), { apiKey: options.apiKey.trim() });
106
113
  }
107
114
  toConfig() {
108
115
  const { apiKey, model, url, instructions, voice, affectiveDialog, proactiveAudio, transcribeAgent, transcribeUser, httpOptions, greetingMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = this.options;
109
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
116
+ const selectedModel = (model === null || model === void 0 ? void 0 : model.trim()) || vendors_js_1.GeminiLiveModels.Live38;
117
+ if (selectedModel === vendors_js_1.GeminiLiveModels.Live38 || selectedModel === vendors_js_1.GeminiLiveModels.Live38ExtendedThinking) {
118
+ return (0, vendors_js_1.buildGeminiPreviewConfig)(this.options);
119
+ }
120
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model: selectedModel }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
110
121
  }
111
122
  }
112
123
  exports.GeminiLive = GeminiLive;
@@ -1,8 +1,8 @@
1
1
  export type { AgoraAuthMode } from "./AgoraPoolClient.js";
2
2
  export { AgoraClient } from "./AgoraPoolClient.js";
3
3
  export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.js";
4
- export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveOptions, GeminiOptions, GeminiSTTModel, GeminiSTTOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
5
- export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
4
+ export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
5
+ export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
6
6
  export * as Agora from "./api/index.js";
7
7
  export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
8
8
  export { Area } from "./core/domain/index.js";
package/dist/cjs/index.js CHANGED
@@ -36,9 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.GeminiLive = exports.Gemini = exports.FishAudioTTS = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.Dify = exports.DeepSeekLLM = exports.DeepgramTTS = exports.DeepgramSTT = exports.DataChannel = exports.createPreviewRoute = exports.CustomLLM = exports.CredentialMode = exports.CosyVoiceTTS = exports.CartesiaTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.AzureOpenAIRealtime = exports.AzureOpenAI = exports.AudioScenario = exports.AssemblyAISTT = exports.AresSTT = exports.Anthropic = exports.AnamAvatar = exports.AmazonTTS = exports.AmazonSTT = exports.AmazonBedrock = exports.AliyunLLM = exports.AkoolAvatar = exports.AgentSession = exports.AgentPresets = exports.Agent = exports.AgoraClient = void 0;
40
- exports.REDACTED = exports.QwenOmni = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.HumeAITTS = exports.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = void 0;
41
- exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RimeTTS = void 0;
39
+ exports.GeminiSTT = exports.GeminiLiveModels = exports.GeminiLive = exports.Gemini = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.FishAudioTTS = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.Dify = exports.DeepSeekLLM = exports.DeepgramTTS = exports.DeepgramSTT = exports.DataChannel = exports.createPreviewRoute = exports.CustomLLM = exports.CredentialMode = exports.CosyVoiceTTS = exports.CartesiaTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.AzureOpenAIRealtime = exports.AzureOpenAI = exports.AudioScenario = exports.AssemblyAISTT = exports.AresSTT = exports.Anthropic = exports.AnamAvatar = exports.AmazonTTS = exports.AmazonSTT = exports.AmazonBedrock = exports.AliyunLLM = exports.AkoolAvatar = exports.AgentSession = exports.AgentPresets = exports.Agent = exports.AgoraClient = void 0;
40
+ exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.HumeAITTS = exports.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiThinkingLevels = exports.GeminiSTTModels = void 0;
41
+ exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RimeTTS = exports.REDACTED = exports.QwenOmni = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
42
42
  var AgoraPoolClient_js_1 = require("./AgoraPoolClient.js");
43
43
  Object.defineProperty(exports, "AgoraClient", { enumerable: true, get: function () { return AgoraPoolClient_js_1.AgoraClient; } });
44
44
  // Agentkit layer exports - clean, ergonomic API
@@ -88,10 +88,14 @@ Object.defineProperty(exports, "ExpiresIn", { enumerable: true, get: function ()
88
88
  Object.defineProperty(exports, "FengmingSTT", { enumerable: true, get: function () { return index_js_1.FengmingSTT; } });
89
89
  Object.defineProperty(exports, "FillerWordsSelectionRule", { enumerable: true, get: function () { return index_js_1.FillerWordsSelectionRule; } });
90
90
  Object.defineProperty(exports, "FishAudioTTS", { enumerable: true, get: function () { return index_js_1.FishAudioTTS; } });
91
+ Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return index_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
92
+ Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return index_js_1.GEMINI_PREVIEW_MLLM_URL; } });
91
93
  Object.defineProperty(exports, "Gemini", { enumerable: true, get: function () { return index_js_1.Gemini; } });
92
94
  Object.defineProperty(exports, "GeminiLive", { enumerable: true, get: function () { return index_js_1.GeminiLive; } });
95
+ Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return index_js_1.GeminiLiveModels; } });
93
96
  Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return index_js_1.GeminiSTT; } });
94
97
  Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return index_js_1.GeminiSTTModels; } });
98
+ Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return index_js_1.GeminiThinkingLevels; } });
95
99
  Object.defineProperty(exports, "GeminiTranscriptionMode", { enumerable: true, get: function () { return index_js_1.GeminiTranscriptionMode; } });
96
100
  Object.defineProperty(exports, "GenericAvatar", { enumerable: true, get: function () { return index_js_1.GenericAvatar; } });
97
101
  Object.defineProperty(exports, "GenericTTS", { enumerable: true, get: function () { return index_js_1.GenericTTS; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.8.1";
1
+ export declare const SDK_VERSION = "v2.9.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "v2.8.1";
4
+ exports.SDK_VERSION = "v2.9.0";
@@ -5,8 +5,8 @@ export function normalizeClientOptions(options) {
5
5
  const headers = mergeHeaders({
6
6
  "X-Fern-Language": "JavaScript",
7
7
  "X-Fern-SDK-Name": "agora-agents",
8
- "X-Fern-SDK-Version": "v2.8.1",
9
- "User-Agent": "agora-agents/v2.8.1",
8
+ "X-Fern-SDK-Version": "v2.9.0",
9
+ "User-Agent": "agora-agents/v2.9.0",
10
10
  "X-Fern-Runtime": core.RUNTIME.type,
11
11
  "X-Fern-Runtime-Version": core.RUNTIME.version,
12
12
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -17,7 +17,7 @@ import { AgoraError } from "../errors/index.mjs";
17
17
  import { isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, validateAvatarConfig, validateTtsSampleRate, } from "./avatar-types.mjs";
18
18
  import { redactHeadersForDebug, redactSecrets } from "./debug.mjs";
19
19
  import { getPresetCategory, inferAsrPreset, inferLlmPreset, inferTtsPreset, normalizePresetInput, resolveSessionPresets, } from "./presets.mjs";
20
- import { createPreviewRoute, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
20
+ import { applyPreviewShape, createPreviewRoute, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
21
21
  import { ExpiresIn as ExpiresInHelper, generateConvoAIToken } from "./token.mjs";
22
22
  /**
23
23
  * AgentSession class for managing agent lifecycle and interactions.
@@ -433,6 +433,7 @@ export class AgentSession {
433
433
  });
434
434
  const enrichedProperties = this._enrichAvatarParams(resolved.properties, expiresIn);
435
435
  this._validateEnrichedAvatarConfig(enrichedProperties);
436
+ applyPreviewShape(enrichedProperties);
436
437
  this._previewFeatures = requiredPreviewFeatures(enrichedProperties);
437
438
  if (this._previewFeatures.length > 0) {
438
439
  const route = createPreviewRoute(this._client, this._previewFeatures);
@@ -31,8 +31,8 @@ export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPre
31
31
  export { AgentPresets, normalizePresetInput } from "./presets.mjs";
32
32
  export type { PreviewFeature, PreviewRoute } from "./preview/client.mjs";
33
33
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
34
- export type { OpenAIGPTLiveOptions } from "./preview/vendors.mjs";
35
- export { OpenAIGPTLive } from "./preview/vendors.mjs";
34
+ export type { GeminiLiveModel, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "./preview/vendors.mjs";
35
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./preview/vendors.mjs";
36
36
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.mjs";
37
37
  export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
38
38
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
@@ -27,7 +27,7 @@ export { AudioScenario, CredentialMode, DataChannel, FillerWordsSelectionRule, G
27
27
  export { REDACTED, redactHeadersForDebug, redactSecrets } from "./debug.mjs";
28
28
  export { AgentPresets, normalizePresetInput } from "./presets.mjs";
29
29
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
30
- export { OpenAIGPTLive } from "./preview/vendors.mjs";
30
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./preview/vendors.mjs";
31
31
  // Token generation
32
32
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
33
33
  // Avatar vendor classes
@@ -31,7 +31,7 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
- /** @deprecated Gemini ASR now uses the production endpoint. */
34
+ /** Gemini preview MLLM gate; Gemini ASR uses the production endpoint. */
35
35
  readonly GeminiLive: "gemini-live";
36
36
  readonly LiveModels: "live-models";
37
37
  };
@@ -51,9 +51,23 @@ export interface PreviewRoute {
51
51
  export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
52
52
  /** Build generated resource clients for one preview session. */
53
53
  export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
54
+ export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
54
55
  /**
55
- * Returns the preview features a start request needs, derived from the request
56
- * body rather than from the vendor classes — so hand-written configs are
57
- * covered too.
56
+ * Retargets MLLM fields that the shared builder wrote using production
57
+ * spellings, so a preview config follows the preview route's structure.
58
+ *
59
+ * `Agent` fills `mllm.greeting_message` from an agent-level `greeting` whenever
60
+ * the vendor has not set that key — correct for every GA vendor, but the
61
+ * preview Gemini models read `greeting`, so the value would land in a field
62
+ * they ignore and the agent would silently never greet.
63
+ *
64
+ * Rather than teach the shared builder about preview providers, the translation
65
+ * lives here and disappears with this directory at GA. The vendor's own value
66
+ * wins; the production-spelled one is the fallback, which also migrates a
67
+ * hand-written `greeting_message` onto the preview key so an existing config
68
+ * keeps working after only swapping the model.
69
+ *
70
+ * Mutates `properties.mllm` in place. Safe because every SDK hands this a fresh
71
+ * copy of the MLLM config rather than the Agent's stored one.
58
72
  */
59
- export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
73
+ export declare function applyPreviewShape(properties: Agora.StartAgentsRequest.Properties): void;
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  };
23
23
  import { AgentManagementClient } from "../../api/resources/agentManagement/client/Client.mjs";
24
24
  import { AgentsClient } from "../../api/resources/agents/client/Client.mjs";
25
- import { isOpenAIGPTLiveConfig } from "./vendors.mjs";
25
+ import { GEMINI_PREVIEW_MLLM_URL, isOpenAIGPTLiveConfig } from "./vendors.mjs";
26
26
  /** Base URL that serves the preview providers. */
27
27
  export const PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
28
28
  /**
@@ -39,7 +39,7 @@ export const PREVIEW_FEATURE_HEADER = "agora-feature";
39
39
  * preview endpoint.
40
40
  */
41
41
  export const PreviewFeatures = {
42
- /** @deprecated Gemini ASR now uses the production endpoint. */
42
+ /** Gemini preview MLLM gate; Gemini ASR uses the production endpoint. */
43
43
  GeminiLive: "gemini-live",
44
44
  LiveModels: "live-models",
45
45
  };
@@ -74,6 +74,42 @@ const PREVIEW_ASR_VENDORS = new Set();
74
74
  * body rather than from the vendor classes — so hand-written configs are
75
75
  * covered too.
76
76
  */
77
+ const PREVIEW_MLLM_MODELS = new Set([
78
+ "models/gemini-3.8-live",
79
+ "models/gemini-3.8-live-extended-thinking",
80
+ ]);
81
+ /**
82
+ * Whether a config carries the envelope the preview MLLM vendor classes emit:
83
+ * a top-level `mllm.api_key`, and a `url` on the Gemini Developer API host.
84
+ * GeminiLive configurations for older model IDs use a different URL: `""` or
85
+ * a WebSocket endpoint.
86
+ *
87
+ * This is the second recognition path, and it exists because keying only off
88
+ * {@link PREVIEW_MLLM_MODELS} makes an unrecognised model name fail silently:
89
+ * {@link applyPreviewShape} would stop retargeting `greeting_message`, the
90
+ * greeting would land in a field these models ignore, and the agent would
91
+ * simply never greet. A model name we have not listed yet is reachable by
92
+ * following this SDK's own advice to override `model` when Google renames one
93
+ * ahead of a release, so the failure has to not be silent.
94
+ */
95
+ function hasPreviewMllmEnvelope(mllm) {
96
+ return (typeof mllm.api_key === "string" && typeof mllm.url === "string" && mllm.url.startsWith(GEMINI_PREVIEW_MLLM_URL));
97
+ }
98
+ /**
99
+ * Whether an MLLM config targets a preview model — by name, or by the wire
100
+ * envelope only the preview vendor classes produce.
101
+ */
102
+ function isPreviewMllm(mllm) {
103
+ var _a;
104
+ if (!mllm || mllm.vendor !== "gemini") {
105
+ return false;
106
+ }
107
+ const model = (_a = mllm.params) === null || _a === void 0 ? void 0 : _a.model;
108
+ if (typeof model === "string" && PREVIEW_MLLM_MODELS.has(model)) {
109
+ return true;
110
+ }
111
+ return hasPreviewMllmEnvelope(mllm);
112
+ }
77
113
  export function requiredPreviewFeatures(properties) {
78
114
  var _a;
79
115
  const features = new Set();
@@ -84,5 +120,43 @@ export function requiredPreviewFeatures(properties) {
84
120
  if (isOpenAIGPTLiveConfig(properties.mllm)) {
85
121
  features.add(PreviewFeatures.LiveModels);
86
122
  }
123
+ if (isPreviewMllm(properties.mllm)) {
124
+ features.add(PreviewFeatures.GeminiLive);
125
+ }
87
126
  return [...features];
88
127
  }
128
+ const PREVIEW_MLLM_FIELD_RENAMES = new Map([["greeting_message", "greeting"]]);
129
+ /**
130
+ * Retargets MLLM fields that the shared builder wrote using production
131
+ * spellings, so a preview config follows the preview route's structure.
132
+ *
133
+ * `Agent` fills `mllm.greeting_message` from an agent-level `greeting` whenever
134
+ * the vendor has not set that key — correct for every GA vendor, but the
135
+ * preview Gemini models read `greeting`, so the value would land in a field
136
+ * they ignore and the agent would silently never greet.
137
+ *
138
+ * Rather than teach the shared builder about preview providers, the translation
139
+ * lives here and disappears with this directory at GA. The vendor's own value
140
+ * wins; the production-spelled one is the fallback, which also migrates a
141
+ * hand-written `greeting_message` onto the preview key so an existing config
142
+ * keeps working after only swapping the model.
143
+ *
144
+ * Mutates `properties.mllm` in place. Safe because every SDK hands this a fresh
145
+ * copy of the MLLM config rather than the Agent's stored one.
146
+ */
147
+ export function applyPreviewShape(properties) {
148
+ const mllm = properties.mllm;
149
+ if (!mllm || !isPreviewMllm(mllm)) {
150
+ return;
151
+ }
152
+ for (const [production, preview] of PREVIEW_MLLM_FIELD_RENAMES) {
153
+ const value = mllm[production];
154
+ if (value === undefined) {
155
+ continue;
156
+ }
157
+ if (mllm[preview] === undefined) {
158
+ mllm[preview] = value;
159
+ }
160
+ delete mllm[production];
161
+ }
162
+ }
@@ -7,6 +7,6 @@
7
7
  export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.mjs";
8
8
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
9
9
  export type { PreviewFeature, PreviewRoute } from "./client.mjs";
10
- export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
11
- export type { OpenAIGPTLiveOptions } from "./vendors.mjs";
12
- export { OpenAIGPTLive } from "./vendors.mjs";
10
+ 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";
@@ -5,5 +5,5 @@
5
5
  * the production vendor modules independently.
6
6
  */
7
7
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
8
- export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
9
- export { OpenAIGPTLive } from "./vendors.mjs";
8
+ 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";
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import type { McpServersItem, MllmConfig, MllmTurnDetectionConfig } from "../types.mjs";
10
10
  import { BaseMLLM } from "../vendors/base.mjs";
11
+ import type { GeminiLiveOptions } from "../vendors/mllm.mjs";
11
12
  export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
12
13
  export declare function isOpenAIGPTLiveConfig(config: unknown): boolean;
13
14
  /** GPT Live v3 alpha options. Not for production traffic. */
@@ -72,3 +73,33 @@ export declare class OpenAIGPTLive extends BaseMLLM {
72
73
  constructor(options: OpenAIGPTLiveOptions);
73
74
  toConfig(): MllmConfig;
74
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. */
105
+ export declare function buildGeminiPreviewConfig(options: GeminiLiveOptions): MllmConfig;
@@ -81,3 +81,34 @@ export class OpenAIGPTLive extends BaseMLLM {
81
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
82
  }
83
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. */
102
+ 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 }));
114
+ }
@@ -5,6 +5,7 @@
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";
8
9
  import type { MllmConfig, MllmTurnDetectionConfig } from "../types.mjs";
9
10
  import { BaseCNMLLM, BaseMLLM } from "./base.mjs";
10
11
  /**
@@ -116,8 +117,12 @@ export interface GeminiLiveOptions {
116
117
  /** Google API key */
117
118
  apiKey: string;
118
119
  /** Model name (e.g., 'gemini-live-2.5-flash') */
119
- model: string;
120
- /** WebSocket URL for real-time communication */
120
+ model?: string;
121
+ /** Sent only for models/gemini-3.8-live-extended-thinking. */
122
+ thinkingLevel?: GeminiThinkingLevel;
123
+ /** Languages for Gemini 3.8, sent as params.language_codes. */
124
+ languageCodes?: readonly string[];
125
+ /** Endpoint override; Gemini 3.8 defaults to the Developer API host. */
121
126
  url?: string;
122
127
  /** System instructions for the model */
123
128
  instructions?: string;
@@ -5,6 +5,7 @@
5
5
  * ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` automatically
6
6
  * sets `mllm.enable: true`.
7
7
  */
8
+ import { buildGeminiPreviewConfig, GeminiLiveModels, GeminiThinkingLevels } from "../preview/vendors.mjs";
8
9
  import { BaseCNMLLM, BaseMLLM } from "./base.mjs";
9
10
  function requireString(value, field, vendor) {
10
11
  if (typeof value !== "string" || value.length === 0) {
@@ -97,11 +98,21 @@ export class AzureOpenAIRealtime extends BaseMLLM {
97
98
  export class GeminiLive extends BaseMLLM {
98
99
  constructor(options) {
99
100
  super();
100
- this.options = options;
101
+ if (!options.apiKey.trim()) {
102
+ throw new Error("GeminiLive requires apiKey");
103
+ }
104
+ if (options.thinkingLevel !== undefined && !GeminiThinkingLevels.includes(options.thinkingLevel)) {
105
+ throw new Error("GeminiLive thinkingLevel must be low, medium, or high");
106
+ }
107
+ this.options = Object.assign(Object.assign({}, options), { apiKey: options.apiKey.trim() });
101
108
  }
102
109
  toConfig() {
103
110
  const { apiKey, model, url, instructions, voice, affectiveDialog, proactiveAudio, transcribeAgent, transcribeUser, httpOptions, greetingMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = this.options;
104
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
111
+ const selectedModel = (model === null || model === void 0 ? void 0 : model.trim()) || GeminiLiveModels.Live38;
112
+ if (selectedModel === GeminiLiveModels.Live38 || selectedModel === GeminiLiveModels.Live38ExtendedThinking) {
113
+ return buildGeminiPreviewConfig(this.options);
114
+ }
115
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url: url !== null && url !== void 0 ? url : "", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model: selectedModel }), (instructions && { instructions })), (voice && { voice })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (httpOptions && { http_options: httpOptions })) }, (messages && { messages })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
105
116
  }
106
117
  }
107
118
  /**
@@ -1,8 +1,8 @@
1
1
  export type { AgoraAuthMode } from "./AgoraPoolClient.mjs";
2
2
  export { AgoraClient } from "./AgoraPoolClient.mjs";
3
3
  export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.mjs";
4
- export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveOptions, GeminiOptions, GeminiSTTModel, GeminiSTTOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.mjs";
5
- export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.mjs";
4
+ export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.mjs";
5
+ export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.mjs";
6
6
  export * as Agora from "./api/index.mjs";
7
7
  export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
8
8
  export { Area } from "./core/domain/index.mjs";
@@ -4,7 +4,7 @@ export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedroc
4
4
  // Base vendor classes
5
5
  BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify,
6
6
  // TTS vendors
7
- ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken,
7
+ ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken,
8
8
  // Avatar vendors
9
9
  HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput,
10
10
  // LLM vendors
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.8.1";
1
+ export declare const SDK_VERSION = "v2.9.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "v2.8.1";
1
+ export const SDK_VERSION = "v2.9.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-agents",
3
- "version": "2.8.1",
3
+ "version": "2.9.0",
4
4
  "private": false,
5
5
  "repository": "github:AgoraIO/agora-agents-ts",
6
6
  "type": "commonjs",