agora-agents 2.15.0 → 2.16.1

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 (39) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/Agent.d.ts +6 -3
  3. package/dist/cjs/agentkit/Agent.js +50 -18
  4. package/dist/cjs/agentkit/AgentSession.js +1 -5
  5. package/dist/cjs/agentkit/index.d.ts +2 -2
  6. package/dist/cjs/agentkit/index.js +4 -2
  7. package/dist/cjs/agentkit/preview/client.d.ts +10 -3
  8. package/dist/cjs/agentkit/preview/client.js +22 -13
  9. package/dist/cjs/agentkit/preview/index.d.ts +2 -2
  10. package/dist/cjs/agentkit/preview/index.js +3 -1
  11. package/dist/cjs/agentkit/preview/vendors.d.ts +2 -2
  12. package/dist/cjs/agentkit/preview/vendors.js +3 -1
  13. package/dist/cjs/agentkit/token.js +4 -1
  14. package/dist/cjs/agentkit/vendors/mllm.d.ts +56 -4
  15. package/dist/cjs/agentkit/vendors/mllm.js +62 -7
  16. package/dist/cjs/index.d.ts +2 -2
  17. package/dist/cjs/index.js +6 -4
  18. package/dist/cjs/version.d.ts +1 -1
  19. package/dist/cjs/version.js +1 -1
  20. package/dist/esm/BaseClient.mjs +2 -2
  21. package/dist/esm/agentkit/Agent.d.mts +6 -3
  22. package/dist/esm/agentkit/Agent.mjs +50 -18
  23. package/dist/esm/agentkit/AgentSession.mjs +1 -5
  24. package/dist/esm/agentkit/index.d.mts +2 -2
  25. package/dist/esm/agentkit/index.mjs +1 -1
  26. package/dist/esm/agentkit/preview/client.d.mts +10 -3
  27. package/dist/esm/agentkit/preview/client.mjs +22 -13
  28. package/dist/esm/agentkit/preview/index.d.mts +2 -2
  29. package/dist/esm/agentkit/preview/index.mjs +1 -1
  30. package/dist/esm/agentkit/preview/vendors.d.mts +2 -2
  31. package/dist/esm/agentkit/preview/vendors.mjs +1 -1
  32. package/dist/esm/agentkit/token.mjs +4 -1
  33. package/dist/esm/agentkit/vendors/mllm.d.mts +56 -4
  34. package/dist/esm/agentkit/vendors/mllm.mjs +60 -6
  35. package/dist/esm/index.d.mts +2 -2
  36. package/dist/esm/index.mjs +1 -1
  37. package/dist/esm/version.d.mts +1 -1
  38. package/dist/esm/version.mjs +1 -1
  39. package/package.json +2 -2
@@ -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, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsSTTOptions, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioSTTOptions, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateClientTokenOptions, 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, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LemonSliceOptions, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, MiniMaxTTSOptions, MinimaxDuplexTts, MinimaxDuplexTtsParams, 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, ProtofaceOptions, QwenOmniOptions, QwenSTTOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RTZRSTTOptions, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SonioxTTSOptions, SonioxTts, SonioxTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakConfig, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunSTTOptions, StepFunTTSOptions, StepfunAsr, StepfunAsrParams, StrictAvatarConfig, SttConfig, SttVendor, TavusOptions, 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, ElevenLabsSTT, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioSTT, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateClientToken, generateConvoAIToken, generateRtcToken, HeyGenAvatar, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LemonSlice, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, Protoface, previewRequestHeaders, QwenOmni, QwenSTT, REDACTED, RimeTTS, RTZRSTT, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SarvamTTSLanguage, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SonioxTTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunSTT, StepFunTTS, Tavus, 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, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsSTTOptions, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioSTTOptions, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateClientTokenOptions, 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, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LemonSliceOptions, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, MiniMaxTTSOptions, MinimaxDuplexTts, MinimaxDuplexTtsParams, 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, ProtofaceOptions, QwenOmniOptions, QwenSTTOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RTZRSTTOptions, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SonioxTTSOptions, SonioxTts, SonioxTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakConfig, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunSTTOptions, StepFunTTSOptions, StepfunAsr, StepfunAsrParams, StrictAvatarConfig, SttConfig, SttVendor, TavusOptions, 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, ElevenLabsSTT, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioSTT, FishAudioTTS, GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateClientToken, generateConvoAIToken, generateRtcToken, HeyGenAvatar, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LemonSlice, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, Protoface, previewRequestHeaders, QwenOmni, QwenSTT, REDACTED, RimeTTS, RTZRSTT, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SarvamTTSLanguage, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SonioxTTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunSTT, StepFunTTS, Tavus, 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 type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./agentkit/vendors/tts.js";
7
7
  export { GeminiTTS, GeminiTTSModels } from "./agentkit/vendors/tts.js";
8
8
  export * as Agora from "./api/index.js";
package/dist/cjs/index.js CHANGED
@@ -36,10 +36,10 @@ 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.Gemini = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.FishAudioTTS = exports.FishAudioSTT = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.ElevenLabsSTT = 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.OpenAIGPTLive = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxDuplexTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.LemonSlice = 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.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = exports.generateClientToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiThinkingLevels = exports.GeminiSTTModels = exports.GeminiSTT = exports.GeminiLiveModels = exports.GeminiLive = void 0;
41
- 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.Tavus = exports.StepFunTTS = exports.StepFunSTT = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SonioxTTS = exports.SmallestAITTS = exports.SmallestAISTT = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTSLanguage = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RTZRSTT = exports.RimeTTS = exports.REDACTED = exports.QwenSTT = exports.QwenOmni = exports.previewRequestHeaders = exports.Protoface = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = void 0;
42
- exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.GeminiTTSModels = exports.GeminiTTS = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = void 0;
39
+ exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GEMINI_LIVE_MODEL_TABLE = exports.GEMINI_EAP_MLLM_MODELS = exports.FishAudioTTS = exports.FishAudioSTT = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.ElevenLabsSTT = 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.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxDuplexTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.LemonSlice = 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.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = exports.generateClientToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiThinkingLevels = exports.GeminiSTTModels = exports.GeminiSTT = exports.GeminiLiveModels = exports.GeminiLive = exports.Gemini = exports.GEMINI_PREVIEW_MLLM_URL = void 0;
41
+ 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.Tavus = exports.StepFunTTS = exports.StepFunSTT = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SonioxTTS = exports.SmallestAITTS = exports.SmallestAISTT = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTSLanguage = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RTZRSTT = exports.RimeTTS = exports.REDACTED = exports.QwenSTT = exports.QwenOmni = exports.previewRequestHeaders = exports.Protoface = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OpenAI = void 0;
42
+ exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.GeminiTTSModels = exports.GeminiTTS = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = void 0;
43
43
  var AgoraPoolClient_js_1 = require("./AgoraPoolClient.js");
44
44
  Object.defineProperty(exports, "AgoraClient", { enumerable: true, get: function () { return AgoraPoolClient_js_1.AgoraClient; } });
45
45
  // Agentkit layer exports - clean, ergonomic API
@@ -91,6 +91,8 @@ Object.defineProperty(exports, "FengmingSTT", { enumerable: true, get: function
91
91
  Object.defineProperty(exports, "FillerWordsSelectionRule", { enumerable: true, get: function () { return index_js_1.FillerWordsSelectionRule; } });
92
92
  Object.defineProperty(exports, "FishAudioSTT", { enumerable: true, get: function () { return index_js_1.FishAudioSTT; } });
93
93
  Object.defineProperty(exports, "FishAudioTTS", { enumerable: true, get: function () { return index_js_1.FishAudioTTS; } });
94
+ Object.defineProperty(exports, "GEMINI_EAP_MLLM_MODELS", { enumerable: true, get: function () { return index_js_1.GEMINI_EAP_MLLM_MODELS; } });
95
+ Object.defineProperty(exports, "GEMINI_LIVE_MODEL_TABLE", { enumerable: true, get: function () { return index_js_1.GEMINI_LIVE_MODEL_TABLE; } });
94
96
  Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return index_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
95
97
  Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return index_js_1.GEMINI_MLLM_URL; } });
96
98
  Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return index_js_1.GEMINI_PREVIEW_MLLM_URL; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.15.0";
1
+ export declare const SDK_VERSION = "v2.16.1";
@@ -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.15.0";
4
+ exports.SDK_VERSION = "v2.16.1";
@@ -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.15.0",
9
- "User-Agent": "agora-agents/v2.15.0",
8
+ "X-Fern-SDK-Version": "v2.16.1",
9
+ "User-Agent": "agora-agents/v2.16.1",
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);
@@ -155,9 +155,12 @@ export declare class Agent<TTSSampleRate extends number = number, TArea extends
155
155
  * Returns a new Agent with the specified MLLM vendor.
156
156
  *
157
157
  * MLLM vendors handle real-time audio end-to-end, bypassing the standard
158
- * ASR → LLM → TTS pipeline. Calling this method automatically sets
159
- * `mllm.enable: true`, so `withLlm()`, `withTts()`, and `withStt()`
160
- * are not needed.
158
+ * ASR → LLM → TTS pipeline. Calling this method makes the start request
159
+ * send `advanced_features.enable_mllm: true` (merged with any other
160
+ * advanced features), so `withLlm()`, `withTts()`, and `withStt()` are not
161
+ * needed. `mllm.enable` is never sent: when it is present the backend does
162
+ * not deliver RTM `message.metrics`. A vendor config that sets it has it
163
+ * removed.
161
164
  *
162
165
  * Note: avatars are not supported with MLLM. The avatar publisher requires
163
166
  * the cascading ASR + LLM + TTS pipeline. Combining `withMllm()` and
@@ -5,6 +5,17 @@
5
5
  * multiple sessions. Set the unique agent instance `name` in
6
6
  * {@link Agent.createSession}, not on the Agent itself.
7
7
  */
8
+ var __rest = (this && this.__rest) || function (s, e) {
9
+ var t = {};
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
11
+ t[p] = s[p];
12
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
13
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
14
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
15
+ t[p[i]] = s[p[i]];
16
+ }
17
+ return t;
18
+ };
8
19
  import { Area } from "../core/domain/index.mjs";
9
20
  import { AgentSession } from "./AgentSession.mjs";
10
21
  import { AudioScenario } from "./constants.mjs";
@@ -16,6 +27,28 @@ function toGeneratedMllm(config) {
16
27
  // this wire boundary so the public and builder APIs remain accurately typed.
17
28
  return config;
18
29
  }
30
+ /**
31
+ * Returns a copy of an MLLM config without `mllm.enable`.
32
+ *
33
+ * The SDK enables MLLM with `advanced_features.enable_mllm`, never with
34
+ * `mllm.enable`. When `mllm.enable` is present in the start body the backend
35
+ * does not send RTM `message.metrics` (ttfb), even if
36
+ * `advanced_features.enable_mllm` is also set. Audio and transcripts are not
37
+ * affected, so the problem is easy to miss. A value set by a custom vendor or a
38
+ * hand-written config is dropped for the same reason.
39
+ */
40
+ function withoutMllmEnable(config) {
41
+ const { enable: _dropped } = config, rest = __rest(config, ["enable"]);
42
+ return rest;
43
+ }
44
+ /**
45
+ * Merges `enable_mllm: true` into the caller's advanced features (for example
46
+ * `enable_rtm`). Used only for MLLM sessions; the cascading pipeline never
47
+ * gets `enable_mllm`.
48
+ */
49
+ function withEnableMllm(features) {
50
+ return Object.assign(Object.assign({}, features), { enable_mllm: true });
51
+ }
19
52
  const INTERACTION_LANGUAGES = new Set([
20
53
  "ar-EG",
21
54
  "ar-JO",
@@ -209,9 +242,12 @@ export class Agent {
209
242
  * Returns a new Agent with the specified MLLM vendor.
210
243
  *
211
244
  * MLLM vendors handle real-time audio end-to-end, bypassing the standard
212
- * ASR → LLM → TTS pipeline. Calling this method automatically sets
213
- * `mllm.enable: true`, so `withLlm()`, `withTts()`, and `withStt()`
214
- * are not needed.
245
+ * ASR → LLM → TTS pipeline. Calling this method makes the start request
246
+ * send `advanced_features.enable_mllm: true` (merged with any other
247
+ * advanced features), so `withLlm()`, `withTts()`, and `withStt()` are not
248
+ * needed. `mllm.enable` is never sent: when it is present the backend does
249
+ * not deliver RTM `message.metrics`. A vendor config that sets it has it
250
+ * removed.
215
251
  *
216
252
  * Note: avatars are not supported with MLLM. The avatar publisher requires
217
253
  * the cascading ASR + LLM + TTS pipeline. Combining `withMllm()` and
@@ -220,14 +256,8 @@ export class Agent {
220
256
  * @param vendor - MLLM vendor instance (e.g., new VertexAI({ model: '...', projectId: '...', ... }))
221
257
  */
222
258
  withMllm(vendor) {
223
- var _a;
224
259
  const newAgent = this._clone();
225
- newAgent._mllm = Object.assign(Object.assign({}, vendor.toConfig()), { enable: true });
226
- if (((_a = newAgent._advancedFeatures) === null || _a === void 0 ? void 0 : _a.enable_mllm) !== undefined) {
227
- const advancedFeatures = Object.assign({}, newAgent._advancedFeatures);
228
- delete advancedFeatures.enable_mllm;
229
- newAgent._advancedFeatures = Object.keys(advancedFeatures).length > 0 ? advancedFeatures : undefined;
230
- }
260
+ newAgent._mllm = withoutMllmEnable(vendor.toConfig());
231
261
  return newAgent;
232
262
  }
233
263
  /**
@@ -618,10 +648,10 @@ export class Agent {
618
648
  * and RTM privileges (required for RTM-enabled sessions).
619
649
  */
620
650
  toProperties(opts) {
621
- var _a, _b, _c, _d, _e, _f, _g, _h;
651
+ var _a, _b, _c, _d, _e, _f, _g;
622
652
  // In MLLM mode the backend handles audio end-to-end; LLM, TTS, and ASR
623
653
  // are not required.
624
- const isMllmMode = ((_a = this._mllm) === null || _a === void 0 ? void 0 : _a.enable) === true || this._mllm !== undefined;
654
+ const isMllmMode = this._mllm !== undefined;
625
655
  // Reject incompatible combinations before any work (token generation, etc.).
626
656
  // Avatars are currently supported only with the cascading ASR/LLM/TTS pipeline;
627
657
  // the MLLM pipeline does not flow through the avatar publisher, so combining
@@ -651,7 +681,7 @@ export class Agent {
651
681
  // to receive transcripts and state events. Default it automatically so
652
682
  // callers only need to set advancedFeatures.enable_rtm: true.
653
683
  let resolvedParameters = this._parameters;
654
- if (((_b = this._advancedFeatures) === null || _b === void 0 ? void 0 : _b.enable_rtm) && !(resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.data_channel)) {
684
+ if (((_a = this._advancedFeatures) === null || _a === void 0 ? void 0 : _a.enable_rtm) && !(resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.data_channel)) {
655
685
  resolvedParameters = Object.assign(Object.assign({}, resolvedParameters), { data_channel: "rtm" });
656
686
  }
657
687
  if ((resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.audio_scenario) === undefined) {
@@ -676,7 +706,9 @@ export class Agent {
676
706
  filler_words: this._fillerWords,
677
707
  };
678
708
  if (isMllmMode) {
679
- const mllmConfig = toGeneratedMllm(this._mllm ? Object.assign({}, this._mllm) : undefined);
709
+ // `mllm.enable` is never sent; `advanced_features.enable_mllm` enables MLLM.
710
+ // See withoutMllmEnable() for why.
711
+ const mllmConfig = toGeneratedMllm(this._mllm ? withoutMllmEnable(this._mllm) : undefined);
680
712
  if (mllmConfig) {
681
713
  // Vendor config wins: only apply agent-level values when the vendor hasn't already set them.
682
714
  // Consistent with Python (setdefault) and Go (!exists) semantics.
@@ -693,15 +725,15 @@ export class Agent {
693
725
  if (isOpenAIGPTLive && this._turnDetection !== undefined) {
694
726
  console.warn("GPT Live v3 ignores agent-level turn_detection; endpointing is internal");
695
727
  }
696
- return Object.assign(Object.assign(Object.assign({}, base), { mllm: mllmConfig }), (!isOpenAIGPTLive &&
728
+ return Object.assign(Object.assign(Object.assign({}, base), { advanced_features: withEnableMllm(this._advancedFeatures), mllm: mllmConfig }), (!isOpenAIGPTLive &&
697
729
  this._turnDetection !== undefined && {
698
730
  turn_detection: Object.assign(Object.assign({}, this._turnDetection), (this._turnDetection.language !== undefined && {
699
731
  language: toWireLanguage(this._turnDetection.language),
700
732
  })),
701
733
  }));
702
734
  }
703
- const skipCategories = new Set((_c = opts.skipVendorValidationCategories) !== null && _c !== void 0 ? _c : []);
704
- const allowMissingCategories = new Set((_d = opts.allowMissingVendorCategories) !== null && _d !== void 0 ? _d : []);
735
+ const skipCategories = new Set((_b = opts.skipVendorValidationCategories) !== null && _b !== void 0 ? _b : []);
736
+ const allowMissingCategories = new Set((_c = opts.allowMissingVendorCategories) !== null && _c !== void 0 ? _c : []);
705
737
  if (opts.skipVendorValidation) {
706
738
  for (const category of ["asr", "llm", "tts"]) {
707
739
  skipCategories.add(category);
@@ -724,7 +756,7 @@ export class Agent {
724
756
  ? this._llm.system_messages
725
757
  : this._instructions
726
758
  ? [{ role: "system", content: this._instructions }]
727
- : undefined, greeting_message: (_e = this._llm.greeting_message) !== null && _e !== void 0 ? _e : this._greeting, greeting_configs: (_f = this._llm.greeting_configs) !== null && _f !== void 0 ? _f : this._greetingConfigs, failure_message: (_g = this._llm.failure_message) !== null && _g !== void 0 ? _g : this._failureMessage, max_history: (_h = this._llm.max_history) !== null && _h !== void 0 ? _h : this._maxHistory }) : undefined;
759
+ : undefined, greeting_message: (_d = this._llm.greeting_message) !== null && _d !== void 0 ? _d : this._greeting, greeting_configs: (_e = this._llm.greeting_configs) !== null && _e !== void 0 ? _e : this._greetingConfigs, failure_message: (_f = this._llm.failure_message) !== null && _f !== void 0 ? _f : this._failureMessage, max_history: (_g = this._llm.max_history) !== null && _g !== void 0 ? _g : this._maxHistory }) : undefined;
728
760
  const turnDetectionConfig = resolveTurnDetectionConfig(this._turnDetection);
729
761
  const asrConfig = this._stt !== undefined || !allowMissingAsr
730
762
  ? this._resolveAsrConfig(turnDetectionConfig)
@@ -194,11 +194,7 @@ export class AgentSession {
194
194
  * Returns true when the agent is configured for MLLM (multimodal end-to-end audio).
195
195
  */
196
196
  _isMllmMode() {
197
- const mllm = this._agent.mllm;
198
- if ((mllm === null || mllm === void 0 ? void 0 : mllm.enable) === true) {
199
- return true;
200
- }
201
- return mllm !== undefined;
197
+ return this._agent.mllm !== undefined;
202
198
  }
203
199
  /**
204
200
  * Warns when agent-level `instructions` would be silently discarded.
@@ -44,8 +44,8 @@ export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions,
44
44
  export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, QwenSTT, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
45
45
  export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, CustomLLMOptions, DifyOptions, GeminiOptions, GroqOptions, OpenAIOptions, VertexAILLMOptions, } from "./vendors/llm.mjs";
46
46
  export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.mjs";
47
- export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.mjs";
48
- export { AzureOpenAIRealtime, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
47
+ export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.mjs";
48
+ export { AzureOpenAIRealtime, GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
49
49
  export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, ElevenLabsSTTOptions, FishAudioSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.mjs";
50
50
  export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, ElevenLabsSTT, FishAudioSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
51
51
  export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, SmallestAITTSOptions, SonioxTTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.mjs";
@@ -37,7 +37,7 @@ export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS
37
37
  // LLM vendor classes
38
38
  export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.mjs";
39
39
  // MLLM vendor classes
40
- export { AzureOpenAIRealtime, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
40
+ export { AzureOpenAIRealtime, GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
41
41
  // STT vendor classes
42
42
  export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, ElevenLabsSTT, FishAudioSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
43
43
  // TTS vendor classes
@@ -16,7 +16,7 @@ import type * as Agora from "../../api/index.mjs";
16
16
  import { AgentManagementClient } from "../../api/resources/agentManagement/client/Client.mjs";
17
17
  import { AgentsClient } from "../../api/resources/agents/client/Client.mjs";
18
18
  /** Base URL that serves the preview providers. */
19
- export declare const PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
19
+ export declare const PREVIEW_API_BASE_URL = "https://us-west-1-preview.ai.agora.io/api/conversational-ai-agent";
20
20
  /**
21
21
  * Request header that opts a request into a preview provider family.
22
22
  *
@@ -31,6 +31,8 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
+ /** Gemini Live EAP models. */
35
+ readonly Gemini: "gemini";
34
36
  /** @deprecated Gemini ASR, Live, and TTS now use the production endpoint. */
35
37
  readonly GeminiLive: "gemini-live";
36
38
  /** @deprecated GPT Live now uses the production endpoint. */
@@ -52,8 +54,13 @@ export interface PreviewRoute {
52
54
  export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
53
55
  /** Build generated resource clients for one preview session. */
54
56
  export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
55
- /** Compatibility helper; all formerly registered providers now use production. */
56
- export declare function requiredPreviewFeatures(_properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
57
+ /**
58
+ * Returns the preview features a start request needs. Routing is chosen by
59
+ * `mllm.params.model` alone, using `GEMINI_LIVE_MODEL_TABLE`. It reads the
60
+ * request body rather than the vendor classes, so hand-written configs are
61
+ * covered too.
62
+ */
63
+ export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
57
64
  /**
58
65
  * Normalizes the historical Gemini preview greeting field for production.
59
66
  * Kept under its old name so callers importing this compatibility helper do
@@ -22,8 +22,9 @@ 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 { resolveGeminiLiveModel } from "../vendors/mllm.mjs";
25
26
  /** Base URL that serves the preview providers. */
26
- export const PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
27
+ export const PREVIEW_API_BASE_URL = "https://us-west-1-preview.ai.agora.io/api/conversational-ai-agent";
27
28
  /**
28
29
  * Request header that opts a request into a preview provider family.
29
30
  *
@@ -38,6 +39,8 @@ export const PREVIEW_FEATURE_HEADER = "agora-feature";
38
39
  * preview endpoint.
39
40
  */
40
41
  export const PreviewFeatures = {
42
+ /** Gemini Live EAP models. */
43
+ Gemini: "gemini",
41
44
  /** @deprecated Gemini ASR, Live, and TTS now use the production endpoint. */
42
45
  GeminiLive: "gemini-live",
43
46
  /** @deprecated GPT Live now uses the production endpoint. */
@@ -67,26 +70,32 @@ export function createPreviewRoute(client, features) {
67
70
  features: [...features],
68
71
  };
69
72
  }
70
- /** Compatibility helper; all formerly registered providers now use production. */
71
- export function requiredPreviewFeatures(_properties) {
72
- return [];
73
+ function geminiLiveModelSpec(properties) {
74
+ var _a;
75
+ const mllm = properties.mllm;
76
+ const model = (_a = mllm === null || mllm === void 0 ? void 0 : mllm.params) === null || _a === void 0 ? void 0 : _a.model;
77
+ return (mllm === null || mllm === void 0 ? void 0 : mllm.vendor) === "gemini" && typeof model === "string" ? resolveGeminiLiveModel(model) : undefined;
78
+ }
79
+ /**
80
+ * Returns the preview features a start request needs. Routing is chosen by
81
+ * `mllm.params.model` alone, using `GEMINI_LIVE_MODEL_TABLE`. It reads the
82
+ * request body rather than the vendor classes, so hand-written configs are
83
+ * covered too.
84
+ */
85
+ export function requiredPreviewFeatures(properties) {
86
+ var _a;
87
+ return ((_a = geminiLiveModelSpec(properties)) === null || _a === void 0 ? void 0 : _a.preview) === true ? [PreviewFeatures.Gemini] : [];
73
88
  }
74
- const PRODUCTION_GEMINI_MLLM_MODELS = new Set([
75
- "models/gemini-3.8-live",
76
- "models/gemini-3.8-live-extended-thinking",
77
- ]);
78
89
  /**
79
90
  * Normalizes the historical Gemini preview greeting field for production.
80
91
  * Kept under its old name so callers importing this compatibility helper do
81
92
  * not need to change code when moving an existing request to production.
82
93
  */
83
94
  export function applyPreviewShape(properties) {
84
- var _a;
95
+ // Applies to every model in GEMINI_LIVE_MODEL_TABLE, EAP models included,
96
+ // so an EAP body stays identical to the GA body.
85
97
  const mllm = properties.mllm;
86
- if (!mllm ||
87
- mllm.vendor !== "gemini" ||
88
- typeof ((_a = mllm.params) === null || _a === void 0 ? void 0 : _a.model) !== "string" ||
89
- !PRODUCTION_GEMINI_MLLM_MODELS.has(mllm.params.model)) {
98
+ if (!mllm || geminiLiveModelSpec(properties) === undefined) {
90
99
  return;
91
100
  }
92
101
  if (mllm.greeting_message === undefined && mllm.greeting !== undefined) {
@@ -12,5 +12,5 @@ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "../vendo
12
12
  export { GeminiTTS, GeminiTTSModels } from "../vendors/tts.mjs";
13
13
  export type { PreviewFeature, PreviewRoute } from "./client.mjs";
14
14
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
15
- export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.mjs";
16
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
15
+ export type { GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.mjs";
16
+ export { GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
@@ -8,4 +8,4 @@ export { OpenAIGPTLive } from "../vendors/mllm.mjs";
8
8
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
9
9
  export { GeminiTTS, GeminiTTSModels } from "../vendors/tts.mjs";
10
10
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
11
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
11
+ export { GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
@@ -3,7 +3,7 @@ import type { MllmConfig } from "../types.mjs";
3
3
  import { type GeminiLiveOptions } from "../vendors/mllm.mjs";
4
4
  /** Legacy preview import aliases for the production GPT Live implementation. */
5
5
  /** Gemini 3.8 names remain available from the historical preview path. */
6
- export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "../vendors/mllm.mjs";
7
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.mjs";
6
+ export type { GeminiLiveModel, GeminiLiveModelRow, GeminiLiveModelSpec, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "../vendors/mllm.mjs";
7
+ export { GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.mjs";
8
8
  /** @deprecated Use `new GeminiLive(options).toConfig()`. */
9
9
  export declare function buildGeminiPreviewConfig(options: GeminiLiveOptions): MllmConfig;
@@ -1,6 +1,6 @@
1
1
  /** Legacy preview import aliases for production MLLM implementations. */
2
2
  import { GeminiLive } from "../vendors/mllm.mjs";
3
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.mjs";
3
+ export { GEMINI_EAP_MLLM_MODELS, GEMINI_LIVE_MODEL_TABLE, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.mjs";
4
4
  /** @deprecated Use `new GeminiLive(options).toConfig()`. */
5
5
  export function buildGeminiPreviewConfig(options) {
6
6
  return new GeminiLive(options).toConfig();
@@ -147,7 +147,10 @@ export function generateConvoAIToken(opts) {
147
147
  const configuredPrivilegeExpire = (_b = opts.privilegeExpire) !== null && _b !== void 0 ? _b : 0;
148
148
  const privilegeExpire = configuredPrivilegeExpire === 0 ? tokenExpire : configuredPrivilegeExpire;
149
149
  const account = _uidToAccount(opts.uid);
150
- return _requireBuiltToken(agoraToken.ConvoAITokenBuilder.buildToken(opts.appId, opts.appCertificate, opts.channelName, account, agoraToken.RtcRole.PUBLISHER, tokenExpire, privilegeExpire, privilegeExpire, privilegeExpire, privilegeExpire, account, privilegeExpire), opts.appId, opts.appCertificate);
150
+ return _requireBuiltToken(
151
+ // agora-token >= 2.0.7 signature. It grants publisher RTC privileges and
152
+ // RTM login for `account`, all expiring at `privilegeExpire`.
153
+ agoraToken.ConvoAITokenBuilder.buildToken(opts.appId, opts.appCertificate, opts.channelName, account, tokenExpire, privilegeExpire), opts.appId, opts.appCertificate);
151
154
  }
152
155
  function _uidToAccount(uid) {
153
156
  if (typeof uid === "string") {
@@ -2,8 +2,9 @@
2
2
  * Type-safe MLLM (Multimodal Large Language Model) vendor classes.
3
3
  *
4
4
  * MLLM vendors handle real-time audio end-to-end, bypassing the standard
5
- * ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` automatically
6
- * sets `mllm.enable: true`.
5
+ * ASR → LLM → TTS pipeline. Calling `agent.withMllm(vendor)` makes the start
6
+ * request send `advanced_features.enable_mllm: true`. `mllm.enable` is never
7
+ * sent, because its presence stops RTM `message.metrics` from being delivered.
7
8
  */
8
9
  import type { MllmConfig, MllmTurnDetectionConfig } from "../types.mjs";
9
10
  import { BaseCNMLLM, BaseMLLM, type BaseMllmOptions } from "./base.mjs";
@@ -12,7 +13,49 @@ export declare const GeminiLiveModels: {
12
13
  readonly Live38: "models/gemini-3.8-live";
13
14
  /** Public ID for the reasoning voice model. */
14
15
  readonly Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking";
16
+ /** Gemini Live EAP voice model. Accepts `thinkingLevel`. */
17
+ readonly Live4: "gemini-4-live";
18
+ /** Gemini Live EAP translation model. Set `translateTo` to use it. */
19
+ readonly Live4Translate: "gemini-4-live-translate";
15
20
  };
21
+ /** How the SDK treats one Gemini Live model ID. */
22
+ export interface GeminiLiveModelSpec {
23
+ /**
24
+ * Served only by the preview endpoint. `AgentSession` routes these sessions
25
+ * to the preview host with `agora-feature: gemini`. The start body is the
26
+ * same as the GA body.
27
+ */
28
+ readonly preview: boolean;
29
+ /** Accepts `thinkingLevel`, sent as `params.thinking_level`. */
30
+ readonly extendedThinking?: boolean;
31
+ }
32
+ /** A row in {@link GEMINI_LIVE_MODEL_TABLE}: a model spec, or an alias of another row. */
33
+ export type GeminiLiveModelRow = GeminiLiveModelSpec | {
34
+ readonly aliasOf: string;
35
+ readonly deprecated?: boolean;
36
+ };
37
+ /**
38
+ * Every Gemini Live model that uses the Gemini 3.8 builder path, keyed by the
39
+ * model ID sent in `mllm.params.model`. This one table selects the builder
40
+ * path, the production greeting normalization, and preview routing.
41
+ *
42
+ * A renamed model can keep its old ID as `{ aliasOf: "<new name>", deprecated: true }`.
43
+ * An alias takes the target's spec, and the SDK sends the model ID the caller
44
+ * wrote unchanged.
45
+ *
46
+ * Models missing from this table use the legacy Gemini path and the production
47
+ * route.
48
+ */
49
+ export declare const GEMINI_LIVE_MODEL_TABLE: Readonly<Record<string, GeminiLiveModelRow>>;
50
+ /**
51
+ * Looks up a model in a Gemini Live model table, following alias rows.
52
+ * Returns `undefined` for models missing from the table.
53
+ */
54
+ export declare function resolveGeminiLiveModel(model: string, table?: Readonly<Record<string, GeminiLiveModelRow>>): GeminiLiveModelSpec | undefined;
55
+ /** Gemini Live EAP models, served only by the preview endpoint. Derived from {@link GEMINI_LIVE_MODEL_TABLE}. */
56
+ export declare const GEMINI_EAP_MLLM_MODELS: ReadonlySet<string>;
57
+ /** Gemini Live models served by the production endpoint. Derived from {@link GEMINI_LIVE_MODEL_TABLE}. */
58
+ export declare const PRODUCTION_GEMINI_MLLM_MODELS: ReadonlySet<string>;
16
59
  /** The model Gemini Live sends by default. */
17
60
  export declare const GEMINI_MLLM_DEFAULT_MODEL: string;
18
61
  /** Default Gemini Developer API endpoint for Gemini 3.8 models. */
@@ -25,7 +68,7 @@ export type GeminiLiveModel = (typeof GeminiLiveModels)[keyof typeof GeminiLiveM
25
68
  export declare const GeminiThinkingLevels: readonly ["low", "medium", "high"];
26
69
  export type GeminiThinkingLevel = (typeof GeminiThinkingLevels)[number];
27
70
  /** Known Gemini output voices; future voice names remain accepted. */
28
- export type GeminiLiveVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | (string & {});
71
+ export type GeminiLiveVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | "Fola" | (string & {});
29
72
  /** @deprecated Use {@link GeminiLiveVoice}. */
30
73
  export type GeminiPreviewVoice = GeminiLiveVoice;
31
74
  export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
@@ -200,10 +243,19 @@ export interface GeminiLiveOptions extends BaseMllmOptions {
200
243
  apiKey: string;
201
244
  /** Model name (e.g., 'gemini-live-2.5-flash') */
202
245
  model?: GeminiLiveModel;
203
- /** Sent only for models/gemini-3.8-live-extended-thinking. */
246
+ /** Sent only for models/gemini-3.8-live-extended-thinking and gemini-4-live. */
204
247
  thinkingLevel?: GeminiThinkingLevel;
205
248
  /** Languages for Gemini 3.8, sent as params.language_codes. */
206
249
  languageCodes?: readonly string[];
250
+ /**
251
+ * Switches the session to speech translation, sent as params.translate_to
252
+ * whenever set. The Gemini Live EAP `gemini-4-live-translate` model uses it. Codes are a vendor allow-list that the SDK does not
253
+ * validate: `es` and `pt-BR` work, `es-ES` does not. A rejected code closes
254
+ * the session mid-stream with a 1007.
255
+ */
256
+ translateTo?: string;
257
+ /** Sent as params.echo_target_language whenever set. Used with `translateTo`. */
258
+ echoTargetLanguage?: boolean;
207
259
  /** Endpoint override; Gemini 3.8 defaults to the Developer API host. */
208
260
  url?: string;
209
261
  /** System instructions for the model */