agora-agents 2.14.0 → 2.16.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 (89) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/Agent.d.ts +6 -4
  3. package/dist/cjs/agentkit/Agent.js +89 -29
  4. package/dist/cjs/agentkit/AgentSession.js +1 -5
  5. package/dist/cjs/agentkit/index.d.ts +9 -9
  6. package/dist/cjs/agentkit/index.js +8 -4
  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/types.d.ts +51 -6
  14. package/dist/cjs/agentkit/vendors/cn.d.ts +12 -0
  15. package/dist/cjs/agentkit/vendors/cn.js +16 -1
  16. package/dist/cjs/agentkit/vendors/mllm.d.ts +56 -4
  17. package/dist/cjs/agentkit/vendors/mllm.js +62 -7
  18. package/dist/cjs/agentkit/vendors/stt.d.ts +24 -0
  19. package/dist/cjs/agentkit/vendors/stt.js +31 -1
  20. package/dist/cjs/agentkit/vendors/tts.d.ts +0 -38
  21. package/dist/cjs/agentkit/vendors/tts.js +1 -24
  22. package/dist/cjs/api/types/Asr.d.ts +10 -1
  23. package/dist/cjs/api/types/ElevenLabsAsr.d.ts +10 -0
  24. package/dist/cjs/api/types/ElevenLabsAsrParams.d.ts +9 -0
  25. package/dist/cjs/api/types/ElevenLabsAsrParams.js +3 -0
  26. package/dist/cjs/api/types/FishAudioAsr.d.ts +10 -0
  27. package/dist/cjs/api/types/FishAudioAsr.js +3 -0
  28. package/dist/cjs/api/types/FishAudioAsrParams.d.ts +9 -0
  29. package/dist/cjs/api/types/FishAudioAsrParams.js +3 -0
  30. package/dist/cjs/api/types/QwenAsr.d.ts +10 -0
  31. package/dist/cjs/api/types/QwenAsr.js +3 -0
  32. package/dist/cjs/api/types/QwenAsrParams.d.ts +9 -0
  33. package/dist/cjs/api/types/QwenAsrParams.js +3 -0
  34. package/dist/cjs/api/types/Tts.d.ts +1 -4
  35. package/dist/cjs/api/types/index.d.ts +6 -2
  36. package/dist/cjs/api/types/index.js +6 -2
  37. package/dist/cjs/index.d.ts +2 -2
  38. package/dist/cjs/index.js +9 -5
  39. package/dist/cjs/version.d.ts +1 -1
  40. package/dist/cjs/version.js +1 -1
  41. package/dist/esm/BaseClient.mjs +2 -2
  42. package/dist/esm/agentkit/Agent.d.mts +6 -4
  43. package/dist/esm/agentkit/Agent.mjs +89 -29
  44. package/dist/esm/agentkit/AgentSession.mjs +1 -5
  45. package/dist/esm/agentkit/index.d.mts +9 -9
  46. package/dist/esm/agentkit/index.mjs +4 -4
  47. package/dist/esm/agentkit/preview/client.d.mts +10 -3
  48. package/dist/esm/agentkit/preview/client.mjs +22 -13
  49. package/dist/esm/agentkit/preview/index.d.mts +2 -2
  50. package/dist/esm/agentkit/preview/index.mjs +1 -1
  51. package/dist/esm/agentkit/preview/vendors.d.mts +2 -2
  52. package/dist/esm/agentkit/preview/vendors.mjs +1 -1
  53. package/dist/esm/agentkit/types.d.mts +51 -6
  54. package/dist/esm/agentkit/vendors/cn.d.mts +12 -0
  55. package/dist/esm/agentkit/vendors/cn.mjs +14 -0
  56. package/dist/esm/agentkit/vendors/mllm.d.mts +56 -4
  57. package/dist/esm/agentkit/vendors/mllm.mjs +60 -6
  58. package/dist/esm/agentkit/vendors/stt.d.mts +24 -0
  59. package/dist/esm/agentkit/vendors/stt.mjs +28 -0
  60. package/dist/esm/agentkit/vendors/tts.d.mts +0 -38
  61. package/dist/esm/agentkit/vendors/tts.mjs +0 -22
  62. package/dist/esm/api/types/Asr.d.mts +10 -1
  63. package/dist/esm/api/types/ElevenLabsAsr.d.mts +10 -0
  64. package/dist/esm/api/types/ElevenLabsAsrParams.d.mts +9 -0
  65. package/dist/esm/api/types/ElevenLabsAsrParams.mjs +2 -0
  66. package/dist/esm/api/types/FishAudioAsr.d.mts +10 -0
  67. package/dist/esm/api/types/FishAudioAsr.mjs +2 -0
  68. package/dist/esm/api/types/FishAudioAsrParams.d.mts +9 -0
  69. package/dist/esm/api/types/FishAudioAsrParams.mjs +2 -0
  70. package/dist/esm/api/types/QwenAsr.d.mts +10 -0
  71. package/dist/esm/api/types/QwenAsr.mjs +2 -0
  72. package/dist/esm/api/types/QwenAsrParams.d.mts +9 -0
  73. package/dist/esm/api/types/QwenAsrParams.mjs +2 -0
  74. package/dist/esm/api/types/Tts.d.mts +1 -4
  75. package/dist/esm/api/types/index.d.mts +6 -2
  76. package/dist/esm/api/types/index.mjs +6 -2
  77. package/dist/esm/index.d.mts +2 -2
  78. package/dist/esm/index.mjs +4 -4
  79. package/dist/esm/version.d.mts +1 -1
  80. package/dist/esm/version.mjs +1 -1
  81. package/package.json +1 -1
  82. package/dist/cjs/api/types/HumeAiTts.d.ts +0 -9
  83. package/dist/cjs/api/types/HumeAiTtsParams.d.ts +0 -29
  84. package/dist/cjs/api/types/HumeAiTtsParams.js +0 -12
  85. package/dist/esm/api/types/HumeAiTts.d.mts +0 -9
  86. package/dist/esm/api/types/HumeAiTtsParams.d.mts +0 -29
  87. package/dist/esm/api/types/HumeAiTtsParams.mjs +0 -9
  88. /package/dist/cjs/api/types/{HumeAiTts.js → ElevenLabsAsr.js} +0 -0
  89. /package/dist/esm/api/types/{HumeAiTts.mjs → ElevenLabsAsr.mjs} +0 -0
@@ -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, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, 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, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, 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, 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, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, 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, HumeAITTS, 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, 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.GeminiLiveModels = exports.GeminiLive = exports.Gemini = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_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.OpenAIRealtime = 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.HumeAITTS = 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 = void 0;
41
- 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.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.QwenOmni = exports.previewRequestHeaders = exports.Protoface = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = 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 = 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
@@ -83,12 +83,16 @@ Object.defineProperty(exports, "DeepgramSTT", { enumerable: true, get: function
83
83
  Object.defineProperty(exports, "DeepgramTTS", { enumerable: true, get: function () { return index_js_1.DeepgramTTS; } });
84
84
  Object.defineProperty(exports, "DeepSeekLLM", { enumerable: true, get: function () { return index_js_1.DeepSeekLLM; } });
85
85
  Object.defineProperty(exports, "Dify", { enumerable: true, get: function () { return index_js_1.Dify; } });
86
+ Object.defineProperty(exports, "ElevenLabsSTT", { enumerable: true, get: function () { return index_js_1.ElevenLabsSTT; } });
86
87
  // TTS vendors
87
88
  Object.defineProperty(exports, "ElevenLabsTTS", { enumerable: true, get: function () { return index_js_1.ElevenLabsTTS; } });
88
89
  Object.defineProperty(exports, "ExpiresIn", { enumerable: true, get: function () { return index_js_1.ExpiresIn; } });
89
90
  Object.defineProperty(exports, "FengmingSTT", { enumerable: true, get: function () { return index_js_1.FengmingSTT; } });
90
91
  Object.defineProperty(exports, "FillerWordsSelectionRule", { enumerable: true, get: function () { return index_js_1.FillerWordsSelectionRule; } });
92
+ Object.defineProperty(exports, "FishAudioSTT", { enumerable: true, get: function () { return index_js_1.FishAudioSTT; } });
91
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; } });
92
96
  Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return index_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
93
97
  Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return index_js_1.GEMINI_MLLM_URL; } });
94
98
  Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return index_js_1.GEMINI_PREVIEW_MLLM_URL; } });
@@ -111,7 +115,6 @@ Object.defineProperty(exports, "generateConvoAIToken", { enumerable: true, get:
111
115
  Object.defineProperty(exports, "generateRtcToken", { enumerable: true, get: function () { return index_js_1.generateRtcToken; } });
112
116
  // Avatar vendors
113
117
  Object.defineProperty(exports, "HeyGenAvatar", { enumerable: true, get: function () { return index_js_1.HeyGenAvatar; } });
114
- Object.defineProperty(exports, "HumeAITTS", { enumerable: true, get: function () { return index_js_1.HumeAITTS; } });
115
118
  Object.defineProperty(exports, "InterruptionDisabledStrategy", { enumerable: true, get: function () { return index_js_1.InterruptionDisabledStrategy; } });
116
119
  Object.defineProperty(exports, "InterruptionDisabledStrategyAppend", { enumerable: true, get: function () { return index_js_1.InterruptionDisabledStrategyAppend; } });
117
120
  Object.defineProperty(exports, "InterruptionDisabledStrategyIgnore", { enumerable: true, get: function () { return index_js_1.InterruptionDisabledStrategyIgnore; } });
@@ -156,6 +159,7 @@ Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: funct
156
159
  Object.defineProperty(exports, "Protoface", { enumerable: true, get: function () { return index_js_1.Protoface; } });
157
160
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return index_js_1.previewRequestHeaders; } });
158
161
  Object.defineProperty(exports, "QwenOmni", { enumerable: true, get: function () { return index_js_1.QwenOmni; } });
162
+ Object.defineProperty(exports, "QwenSTT", { enumerable: true, get: function () { return index_js_1.QwenSTT; } });
159
163
  Object.defineProperty(exports, "REDACTED", { enumerable: true, get: function () { return index_js_1.REDACTED; } });
160
164
  Object.defineProperty(exports, "RimeTTS", { enumerable: true, get: function () { return index_js_1.RimeTTS; } });
161
165
  Object.defineProperty(exports, "RTZRSTT", { enumerable: true, get: function () { return index_js_1.RTZRSTT; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.14.0";
1
+ export declare const SDK_VERSION = "v2.16.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.14.0";
4
+ exports.SDK_VERSION = "v2.16.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.14.0",
9
- "User-Agent": "agora-agents/v2.14.0",
8
+ "X-Fern-SDK-Version": "v2.16.0",
9
+ "User-Agent": "agora-agents/v2.16.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);
@@ -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
@@ -457,5 +460,4 @@ export declare class Agent<TTSSampleRate extends number = number, TArea extends
457
460
  */
458
461
  private _clone;
459
462
  private _resolveAsrConfig;
460
- private _resolveTurnDetectionConfig;
461
463
  }
@@ -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",
@@ -58,6 +91,41 @@ function assertTurnDetectionLanguage(value) {
58
91
  throw new Error(`Invalid turnDetection.language: ${value}`);
59
92
  }
60
93
  }
94
+ /** Joins a language list into the comma-separated string the API expects. */
95
+ function toWireLanguage(language) {
96
+ return typeof language === "string" ? language : [...new Set(language)].join(",");
97
+ }
98
+ /**
99
+ * Validates `turnDetection` and resolves `language` to the wire string.
100
+ *
101
+ * - Defaults `language` to en-US.
102
+ * - Semantic EoS takes only one English or Chinese language. The types already
103
+ * enforce this; the runtime check covers untyped callers.
104
+ * - Several languages with no EoS mode set fall back to silence VAD.
105
+ */
106
+ function resolveTurnDetectionConfig(config) {
107
+ var _a, _b;
108
+ const language = (_a = config === null || config === void 0 ? void 0 : config.language) !== null && _a !== void 0 ? _a : DEFAULT_TURN_DETECTION_LANGUAGE;
109
+ const languages = typeof language === "string" ? [language] : [...new Set(language)];
110
+ if (languages.length === 0) {
111
+ throw new Error("turnDetection.language must not be an empty list");
112
+ }
113
+ languages.forEach(assertTurnDetectionLanguage);
114
+ const endOfSpeech = (_b = config === null || config === void 0 ? void 0 : config.config) === null || _b === void 0 ? void 0 : _b.end_of_speech;
115
+ if ((endOfSpeech === null || endOfSpeech === void 0 ? void 0 : endOfSpeech.mode) === "semantic") {
116
+ if (typeof language !== "string") {
117
+ throw new Error("turnDetection.language cannot be a list when end_of_speech.mode is semantic; use one English or Chinese language, or use end_of_speech.mode vad. Otherwise the service silently uses VAD instead of semantic end of speech");
118
+ }
119
+ if (!/^(en|zh)-/.test(language)) {
120
+ throw new Error(`Semantic end_of_speech supports only English and Chinese languages; got turnDetection.language: ${language}. Otherwise the service silently uses VAD instead of semantic end of speech`);
121
+ }
122
+ }
123
+ const resolved = Object.assign(Object.assign({}, config), { language: languages.join(",") });
124
+ if (languages.length > 1 && (endOfSpeech === null || endOfSpeech === void 0 ? void 0 : endOfSpeech.mode) === undefined) {
125
+ resolved.config = Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.config), { end_of_speech: Object.assign(Object.assign({}, endOfSpeech), { mode: "vad" }) });
126
+ }
127
+ return resolved;
128
+ }
61
129
  /**
62
130
  * Agent class representing a reusable agent configuration.
63
131
  *
@@ -174,9 +242,12 @@ export class Agent {
174
242
  * Returns a new Agent with the specified MLLM vendor.
175
243
  *
176
244
  * MLLM vendors handle real-time audio end-to-end, bypassing the standard
177
- * ASR → LLM → TTS pipeline. Calling this method automatically sets
178
- * `mllm.enable: true`, so `withLlm()`, `withTts()`, and `withStt()`
179
- * 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.
180
251
  *
181
252
  * Note: avatars are not supported with MLLM. The avatar publisher requires
182
253
  * the cascading ASR + LLM + TTS pipeline. Combining `withMllm()` and
@@ -185,14 +256,8 @@ export class Agent {
185
256
  * @param vendor - MLLM vendor instance (e.g., new VertexAI({ model: '...', projectId: '...', ... }))
186
257
  */
187
258
  withMllm(vendor) {
188
- var _a;
189
259
  const newAgent = this._clone();
190
- newAgent._mllm = Object.assign(Object.assign({}, vendor.toConfig()), { enable: true });
191
- if (((_a = newAgent._advancedFeatures) === null || _a === void 0 ? void 0 : _a.enable_mllm) !== undefined) {
192
- const advancedFeatures = Object.assign({}, newAgent._advancedFeatures);
193
- delete advancedFeatures.enable_mllm;
194
- newAgent._advancedFeatures = Object.keys(advancedFeatures).length > 0 ? advancedFeatures : undefined;
195
- }
260
+ newAgent._mllm = withoutMllmEnable(vendor.toConfig());
196
261
  return newAgent;
197
262
  }
198
263
  /**
@@ -583,10 +648,10 @@ export class Agent {
583
648
  * and RTM privileges (required for RTM-enabled sessions).
584
649
  */
585
650
  toProperties(opts) {
586
- var _a, _b, _c, _d, _e, _f, _g, _h;
651
+ var _a, _b, _c, _d, _e, _f, _g;
587
652
  // In MLLM mode the backend handles audio end-to-end; LLM, TTS, and ASR
588
653
  // are not required.
589
- const isMllmMode = ((_a = this._mllm) === null || _a === void 0 ? void 0 : _a.enable) === true || this._mllm !== undefined;
654
+ const isMllmMode = this._mllm !== undefined;
590
655
  // Reject incompatible combinations before any work (token generation, etc.).
591
656
  // Avatars are currently supported only with the cascading ASR/LLM/TTS pipeline;
592
657
  // the MLLM pipeline does not flow through the avatar publisher, so combining
@@ -616,7 +681,7 @@ export class Agent {
616
681
  // to receive transcripts and state events. Default it automatically so
617
682
  // callers only need to set advancedFeatures.enable_rtm: true.
618
683
  let resolvedParameters = this._parameters;
619
- 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)) {
620
685
  resolvedParameters = Object.assign(Object.assign({}, resolvedParameters), { data_channel: "rtm" });
621
686
  }
622
687
  if ((resolvedParameters === null || resolvedParameters === void 0 ? void 0 : resolvedParameters.audio_scenario) === undefined) {
@@ -641,7 +706,9 @@ export class Agent {
641
706
  filler_words: this._fillerWords,
642
707
  };
643
708
  if (isMllmMode) {
644
- 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);
645
712
  if (mllmConfig) {
646
713
  // Vendor config wins: only apply agent-level values when the vendor hasn't already set them.
647
714
  // Consistent with Python (setdefault) and Go (!exists) semantics.
@@ -658,13 +725,15 @@ export class Agent {
658
725
  if (isOpenAIGPTLive && this._turnDetection !== undefined) {
659
726
  console.warn("GPT Live v3 ignores agent-level turn_detection; endpointing is internal");
660
727
  }
661
- 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 &&
662
729
  this._turnDetection !== undefined && {
663
- turn_detection: this._turnDetection,
730
+ turn_detection: Object.assign(Object.assign({}, this._turnDetection), (this._turnDetection.language !== undefined && {
731
+ language: toWireLanguage(this._turnDetection.language),
732
+ })),
664
733
  }));
665
734
  }
666
- const skipCategories = new Set((_c = opts.skipVendorValidationCategories) !== null && _c !== void 0 ? _c : []);
667
- 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 : []);
668
737
  if (opts.skipVendorValidation) {
669
738
  for (const category of ["asr", "llm", "tts"]) {
670
739
  skipCategories.add(category);
@@ -687,8 +756,8 @@ export class Agent {
687
756
  ? this._llm.system_messages
688
757
  : this._instructions
689
758
  ? [{ role: "system", content: this._instructions }]
690
- : 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;
691
- const turnDetectionConfig = this._resolveTurnDetectionConfig();
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;
760
+ const turnDetectionConfig = resolveTurnDetectionConfig(this._turnDetection);
692
761
  const asrConfig = this._stt !== undefined || !allowMissingAsr
693
762
  ? this._resolveAsrConfig(turnDetectionConfig)
694
763
  : undefined;
@@ -756,15 +825,6 @@ export class Agent {
756
825
  asrConfig.language = turnDetectionConfig.language;
757
826
  return Object.keys(asrConfig).length > 0 ? asrConfig : undefined;
758
827
  }
759
- _resolveTurnDetectionConfig() {
760
- var _a;
761
- const turnDetection = Object.assign({}, ((_a = this._turnDetection) !== null && _a !== void 0 ? _a : {}));
762
- const existingTurnDetectionLanguage = turnDetection.language;
763
- const language = existingTurnDetectionLanguage !== null && existingTurnDetectionLanguage !== void 0 ? existingTurnDetectionLanguage : DEFAULT_TURN_DETECTION_LANGUAGE;
764
- assertTurnDetectionLanguage(language);
765
- turnDetection.language = language;
766
- return turnDetection;
767
- }
768
828
  }
769
829
  function _parseNumericUid(uid, label) {
770
830
  if (!/^\d+$/.test(uid)) {
@@ -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.
@@ -35,18 +35,18 @@ export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, Previ
35
35
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.mjs";
36
36
  export type { GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
37
37
  export { ExpiresIn, generateClientToken, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
38
- export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AsrVendorName, AvatarConfig, AvatarWireVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, GradiumTts, GradiumTtsParams, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, McpServer, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarParams, SpeakConfig, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTts, TypecastTtsParams, XAiAsr, XAiAsrParams, XAiTts, XAiTtsParams, } from "./types.mjs";
38
+ export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AsrVendorName, AvatarConfig, AvatarWireVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, GradiumTts, GradiumTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, McpServer, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SemanticEndOfSpeechLanguage, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarParams, SpeakConfig, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionLanguages, TurnDetectionNestedConfig, TurnDetectionType, TypecastTts, TypecastTtsParams, XAiAsr, XAiAsrParams, XAiTts, XAiTtsParams, } from "./types.mjs";
39
39
  export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LemonSliceOptions, LiveAvatarAvatarOptions, ProtofaceOptions, TavusOptions, } from "./vendors/avatar.mjs";
40
40
  export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LemonSlice, LiveAvatarAvatar, Protoface, Tavus, } from "./vendors/avatar.mjs";
41
41
  export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.mjs";
42
42
  export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, type BaseLlmOptions, BaseMLLM, type BaseMllmOptions, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.mjs";
43
- export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunSTTOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.mjs";
44
- export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
43
+ export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, QwenSTTOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunSTTOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.mjs";
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";
49
- export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.mjs";
50
- export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
51
- export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, SmallestAITTSOptions, SonioxTTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.mjs";
52
- export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.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
+ export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, ElevenLabsSTTOptions, FishAudioSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.mjs";
50
+ export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, ElevenLabsSTT, FishAudioSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
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";
52
+ export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
@@ -33,12 +33,12 @@ export { ExpiresIn, generateClientToken, generateConvoAIToken, generateRtcToken,
33
33
  export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LemonSlice, LiveAvatarAvatar, Protoface, Tavus, } from "./vendors/avatar.mjs";
34
34
  // Base vendor classes
35
35
  export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, } from "./vendors/base.mjs";
36
- export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
36
+ 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";
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
- export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
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
44
- export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
44
+ export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
@@ -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();