agora-agents 2.9.0 → 2.10.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 (91) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/Agent.js +3 -3
  3. package/dist/cjs/agentkit/index.d.ts +8 -10
  4. package/dist/cjs/agentkit/index.js +10 -8
  5. package/dist/cjs/agentkit/preview/client.d.ts +6 -18
  6. package/dist/cjs/agentkit/preview/client.js +17 -84
  7. package/dist/cjs/agentkit/preview/index.d.ts +4 -2
  8. package/dist/cjs/agentkit/preview/index.js +4 -2
  9. package/dist/cjs/agentkit/preview/vendors.d.ts +8 -104
  10. package/dist/cjs/agentkit/preview/vendors.js +14 -115
  11. package/dist/cjs/agentkit/types.d.ts +10 -4
  12. package/dist/cjs/agentkit/vendors/base.d.ts +15 -4
  13. package/dist/cjs/agentkit/vendors/base.js +16 -5
  14. package/dist/cjs/agentkit/vendors/cn.js +2 -2
  15. package/dist/cjs/agentkit/vendors/llm.js +2 -2
  16. package/dist/cjs/agentkit/vendors/mllm.d.ts +92 -10
  17. package/dist/cjs/agentkit/vendors/mllm.js +115 -18
  18. package/dist/cjs/agentkit/vendors/stt.d.ts +41 -0
  19. package/dist/cjs/agentkit/vendors/stt.js +18 -1
  20. package/dist/cjs/agentkit/vendors/tts.d.ts +27 -0
  21. package/dist/cjs/agentkit/vendors/tts.js +16 -1
  22. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +11 -5
  23. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +3 -1
  24. package/dist/cjs/api/types/AnamAvatarParams.d.ts +42 -0
  25. package/dist/cjs/api/types/AnamAvatarParams.js +18 -0
  26. package/dist/cjs/api/types/Asr.d.ts +4 -1
  27. package/dist/cjs/api/types/LlmTool.d.ts +7 -0
  28. package/dist/cjs/api/types/McpServer.d.ts +24 -0
  29. package/dist/cjs/api/types/McpServer.js +3 -0
  30. package/dist/cjs/api/types/Mllm.d.ts +14 -0
  31. package/dist/cjs/api/types/SmallestAiAsr.d.ts +11 -0
  32. package/dist/cjs/api/types/SmallestAiAsr.js +3 -0
  33. package/dist/cjs/api/types/SmallestAiAsrParams.d.ts +49 -0
  34. package/dist/cjs/api/types/SmallestAiAsrParams.js +3 -0
  35. package/dist/cjs/api/types/SmallestAiTts.d.ts +9 -0
  36. package/dist/cjs/api/types/SmallestAiTts.js +3 -0
  37. package/dist/cjs/api/types/SmallestAiTtsParams.d.ts +31 -0
  38. package/dist/cjs/api/types/SmallestAiTtsParams.js +3 -0
  39. package/dist/cjs/api/types/Tts.d.ts +4 -1
  40. package/dist/cjs/api/types/index.d.ts +6 -0
  41. package/dist/cjs/api/types/index.js +6 -0
  42. package/dist/cjs/index.d.ts +2 -2
  43. package/dist/cjs/index.js +6 -3
  44. package/dist/cjs/version.d.ts +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/esm/BaseClient.mjs +2 -2
  47. package/dist/esm/agentkit/Agent.mjs +2 -2
  48. package/dist/esm/agentkit/index.d.mts +8 -10
  49. package/dist/esm/agentkit/index.mjs +3 -4
  50. package/dist/esm/agentkit/preview/client.d.mts +6 -18
  51. package/dist/esm/agentkit/preview/client.mjs +17 -84
  52. package/dist/esm/agentkit/preview/index.d.mts +4 -2
  53. package/dist/esm/agentkit/preview/index.mjs +2 -1
  54. package/dist/esm/agentkit/preview/vendors.d.mts +8 -104
  55. package/dist/esm/agentkit/preview/vendors.mjs +5 -112
  56. package/dist/esm/agentkit/types.d.mts +10 -4
  57. package/dist/esm/agentkit/vendors/base.d.mts +15 -4
  58. package/dist/esm/agentkit/vendors/base.mjs +16 -5
  59. package/dist/esm/agentkit/vendors/cn.mjs +2 -2
  60. package/dist/esm/agentkit/vendors/llm.mjs +2 -2
  61. package/dist/esm/agentkit/vendors/mllm.d.mts +92 -10
  62. package/dist/esm/agentkit/vendors/mllm.mjs +111 -16
  63. package/dist/esm/agentkit/vendors/stt.d.mts +41 -0
  64. package/dist/esm/agentkit/vendors/stt.mjs +16 -0
  65. package/dist/esm/agentkit/vendors/tts.d.mts +27 -0
  66. package/dist/esm/agentkit/vendors/tts.mjs +14 -0
  67. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +11 -5
  68. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +3 -1
  69. package/dist/esm/api/types/AnamAvatarParams.d.mts +42 -0
  70. package/dist/esm/api/types/AnamAvatarParams.mjs +15 -0
  71. package/dist/esm/api/types/Asr.d.mts +4 -1
  72. package/dist/esm/api/types/LlmTool.d.mts +7 -0
  73. package/dist/esm/api/types/McpServer.d.mts +24 -0
  74. package/dist/esm/api/types/McpServer.mjs +2 -0
  75. package/dist/esm/api/types/Mllm.d.mts +14 -0
  76. package/dist/esm/api/types/SmallestAiAsr.d.mts +11 -0
  77. package/dist/esm/api/types/SmallestAiAsr.mjs +2 -0
  78. package/dist/esm/api/types/SmallestAiAsrParams.d.mts +49 -0
  79. package/dist/esm/api/types/SmallestAiAsrParams.mjs +2 -0
  80. package/dist/esm/api/types/SmallestAiTts.d.mts +9 -0
  81. package/dist/esm/api/types/SmallestAiTts.mjs +2 -0
  82. package/dist/esm/api/types/SmallestAiTtsParams.d.mts +31 -0
  83. package/dist/esm/api/types/SmallestAiTtsParams.mjs +2 -0
  84. package/dist/esm/api/types/Tts.d.mts +4 -1
  85. package/dist/esm/api/types/index.d.mts +6 -0
  86. package/dist/esm/api/types/index.mjs +6 -0
  87. package/dist/esm/index.d.mts +2 -2
  88. package/dist/esm/index.mjs +2 -2
  89. package/dist/esm/version.d.mts +1 -1
  90. package/dist/esm/version.mjs +1 -1
  91. package/package.json +1 -1
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_js_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "agora-agents",
44
- "X-Fern-SDK-Version": "v2.9.0",
45
- "User-Agent": "agora-agents/v2.9.0",
44
+ "X-Fern-SDK-Version": "v2.10.0",
45
+ "User-Agent": "agora-agents/v2.10.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -11,11 +11,11 @@ exports.Agent = void 0;
11
11
  const index_js_1 = require("../core/domain/index.js");
12
12
  const AgentSession_js_1 = require("./AgentSession.js");
13
13
  const constants_js_1 = require("./constants.js");
14
- const vendors_js_1 = require("./preview/vendors.js");
15
14
  const token_js_1 = require("./token.js");
15
+ const mllm_js_1 = require("./vendors/mllm.js");
16
16
  const DEFAULT_TURN_DETECTION_LANGUAGE = "en-US";
17
17
  function toGeneratedMllm(config) {
18
- // The preview vendor predates its generated schema enum. Keep the assertion at
18
+ // GPT Live is not yet present in the generated schema enum. Keep the assertion at
19
19
  // this wire boundary so the public and builder APIs remain accurately typed.
20
20
  return config;
21
21
  }
@@ -658,7 +658,7 @@ class Agent {
658
658
  c.failure_message = this._failureMessage;
659
659
  }
660
660
  }
661
- const isOpenAIGPTLive = (0, vendors_js_1.isOpenAIGPTLiveConfig)(mllmConfig);
661
+ const isOpenAIGPTLive = (0, mllm_js_1.isOpenAIGPTLiveConfig)(mllmConfig);
662
662
  if (isOpenAIGPTLive && this._turnDetection !== undefined) {
663
663
  console.warn("GPT Live v3 ignores agent-level turn_detection; endpointing is internal");
664
664
  }
@@ -31,23 +31,21 @@ export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPre
31
31
  export { AgentPresets, normalizePresetInput } from "./presets.js";
32
32
  export type { PreviewFeature, PreviewRoute } from "./preview/client.js";
33
33
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.js";
34
- export type { GeminiLiveModel, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "./preview/vendors.js";
35
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./preview/vendors.js";
36
34
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.js";
37
35
  export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
38
36
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.js";
39
- 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, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarParams, 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.js";
37
+ 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, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarParams, 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.js";
40
38
  export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LiveAvatarAvatarOptions, } from "./vendors/avatar.js";
41
39
  export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LiveAvatarAvatar, } from "./vendors/avatar.js";
42
40
  export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.js";
43
- export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, type BaseLlmOptions, BaseMLLM, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.js";
41
+ export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, type BaseLlmOptions, BaseMLLM, type BaseMllmOptions, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.js";
44
42
  export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.js";
45
43
  export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, SensetimeAvatar, SpatiusAvatar, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.js";
46
44
  export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, CustomLLMOptions, DifyOptions, GeminiOptions, GroqOptions, OpenAIOptions, VertexAILLMOptions, } from "./vendors/llm.js";
47
45
  export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.js";
48
- export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.js";
49
- export { AzureOpenAIRealtime, GeminiLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.js";
50
- export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, SarvamSTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
51
- export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.js";
52
- export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.js";
53
- export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.js";
46
+ export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.js";
47
+ export { AzureOpenAIRealtime, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.js";
48
+ export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
49
+ export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.js";
50
+ export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, SmallestAITTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.js";
51
+ export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SmallestAITTS, TypecastTTS, XAiTTS, } from "./vendors/tts.js";
@@ -21,8 +21,8 @@
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.normalizePresetInput = exports.AgentPresets = exports.redactSecrets = exports.redactHeadersForDebug = exports.REDACTED = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SilenceActionValues = exports.SalModeValues = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.Geofence = exports.FillerWordsSelectionRule = exports.DataChannel = exports.CredentialMode = exports.AudioScenario = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.toBaseAvatarConfig = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.AgentSession = exports.Agent = void 0;
24
- exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
- exports.XAiTTS = exports.TypecastTTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = void 0;
24
+ exports.VertexAILLM = exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
+ exports.XAiTTS = exports.TypecastTTS = exports.SmallestAITTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SmallestAISTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GeminiLive = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.AzureOpenAIRealtime = void 0;
26
26
  // Core classes
27
27
  var Agent_js_1 = require("./Agent.js");
28
28
  Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return Agent_js_1.Agent; } });
@@ -85,12 +85,6 @@ Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get
85
85
  Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: function () { return client_js_1.PreviewFeatures; } });
86
86
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
87
87
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
88
- var vendors_js_1 = require("./preview/vendors.js");
89
- Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
90
- Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_PREVIEW_MLLM_URL; } });
91
- Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return vendors_js_1.GeminiLiveModels; } });
92
- Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return vendors_js_1.GeminiThinkingLevels; } });
93
- Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return vendors_js_1.OpenAIGPTLive; } });
94
88
  // Token generation
95
89
  var token_js_1 = require("./token.js");
96
90
  Object.defineProperty(exports, "ExpiresIn", { enumerable: true, get: function () { return token_js_1.ExpiresIn; } });
@@ -150,7 +144,13 @@ Object.defineProperty(exports, "VertexAILLM", { enumerable: true, get: function
150
144
  // MLLM vendor classes
151
145
  var mllm_js_1 = require("./vendors/mllm.js");
152
146
  Object.defineProperty(exports, "AzureOpenAIRealtime", { enumerable: true, get: function () { return mllm_js_1.AzureOpenAIRealtime; } });
147
+ Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
148
+ Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_MLLM_URL; } });
149
+ Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return mllm_js_1.GEMINI_PREVIEW_MLLM_URL; } });
153
150
  Object.defineProperty(exports, "GeminiLive", { enumerable: true, get: function () { return mllm_js_1.GeminiLive; } });
151
+ Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return mllm_js_1.GeminiLiveModels; } });
152
+ Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return mllm_js_1.GeminiThinkingLevels; } });
153
+ Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return mllm_js_1.OpenAIGPTLive; } });
154
154
  Object.defineProperty(exports, "OpenAIRealtime", { enumerable: true, get: function () { return mllm_js_1.OpenAIRealtime; } });
155
155
  Object.defineProperty(exports, "QwenOmni", { enumerable: true, get: function () { return mllm_js_1.QwenOmni; } });
156
156
  Object.defineProperty(exports, "VertexAI", { enumerable: true, get: function () { return mllm_js_1.VertexAI; } });
@@ -168,6 +168,7 @@ Object.defineProperty(exports, "GoogleSTT", { enumerable: true, get: function ()
168
168
  Object.defineProperty(exports, "MicrosoftSTT", { enumerable: true, get: function () { return stt_js_1.MicrosoftSTT; } });
169
169
  Object.defineProperty(exports, "OpenAISTT", { enumerable: true, get: function () { return stt_js_1.OpenAISTT; } });
170
170
  Object.defineProperty(exports, "SarvamSTT", { enumerable: true, get: function () { return stt_js_1.SarvamSTT; } });
171
+ Object.defineProperty(exports, "SmallestAISTT", { enumerable: true, get: function () { return stt_js_1.SmallestAISTT; } });
171
172
  Object.defineProperty(exports, "SpeechmaticsSTT", { enumerable: true, get: function () { return stt_js_1.SpeechmaticsSTT; } });
172
173
  Object.defineProperty(exports, "XAiSTT", { enumerable: true, get: function () { return stt_js_1.XAiSTT; } });
173
174
  // TTS vendor classes
@@ -188,5 +189,6 @@ Object.defineProperty(exports, "MurfTTS", { enumerable: true, get: function () {
188
189
  Object.defineProperty(exports, "OpenAITTS", { enumerable: true, get: function () { return tts_js_1.OpenAITTS; } });
189
190
  Object.defineProperty(exports, "RimeTTS", { enumerable: true, get: function () { return tts_js_1.RimeTTS; } });
190
191
  Object.defineProperty(exports, "SarvamTTS", { enumerable: true, get: function () { return tts_js_1.SarvamTTS; } });
192
+ Object.defineProperty(exports, "SmallestAITTS", { enumerable: true, get: function () { return tts_js_1.SmallestAITTS; } });
191
193
  Object.defineProperty(exports, "TypecastTTS", { enumerable: true, get: function () { return tts_js_1.TypecastTTS; } });
192
194
  Object.defineProperty(exports, "XAiTTS", { enumerable: true, get: function () { return tts_js_1.XAiTTS; } });
@@ -31,8 +31,9 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
- /** Gemini preview MLLM gate; Gemini ASR uses the production endpoint. */
34
+ /** @deprecated Gemini Live now uses the production endpoint. */
35
35
  readonly GeminiLive: "gemini-live";
36
+ /** @deprecated GPT Live now uses the production endpoint. */
36
37
  readonly LiveModels: "live-models";
37
38
  };
38
39
  /** A preview provider family gate value. */
@@ -51,23 +52,10 @@ export interface PreviewRoute {
51
52
  export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
52
53
  /** Build generated resource clients for one preview session. */
53
54
  export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
54
- export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
55
+ export declare function requiredPreviewFeatures(_properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
55
56
  /**
56
- * Retargets MLLM fields that the shared builder wrote using production
57
- * spellings, so a preview config follows the preview route's structure.
58
- *
59
- * `Agent` fills `mllm.greeting_message` from an agent-level `greeting` whenever
60
- * the vendor has not set that key — correct for every GA vendor, but the
61
- * preview Gemini models read `greeting`, so the value would land in a field
62
- * they ignore and the agent would silently never greet.
63
- *
64
- * Rather than teach the shared builder about preview providers, the translation
65
- * lives here and disappears with this directory at GA. The vendor's own value
66
- * wins; the production-spelled one is the fallback, which also migrates a
67
- * hand-written `greeting_message` onto the preview key so an existing config
68
- * keeps working after only swapping the model.
69
- *
70
- * Mutates `properties.mllm` in place. Safe because every SDK hands this a fresh
71
- * copy of the MLLM config rather than the Agent's stored one.
57
+ * Normalizes the historical Gemini preview greeting field for production.
58
+ * Kept under its old name so callers importing this compatibility helper do
59
+ * not need to change code when moving an existing request to production.
72
60
  */
73
61
  export declare function applyPreviewShape(properties: Agora.StartAgentsRequest.Properties): void;
@@ -29,7 +29,6 @@ exports.requiredPreviewFeatures = requiredPreviewFeatures;
29
29
  exports.applyPreviewShape = applyPreviewShape;
30
30
  const Client_js_1 = require("../../api/resources/agentManagement/client/Client.js");
31
31
  const Client_js_2 = require("../../api/resources/agents/client/Client.js");
32
- const vendors_js_1 = require("./vendors.js");
33
32
  /** Base URL that serves the preview providers. */
34
33
  exports.PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
35
34
  /**
@@ -46,8 +45,9 @@ exports.PREVIEW_FEATURE_HEADER = "agora-feature";
46
45
  * preview endpoint.
47
46
  */
48
47
  exports.PreviewFeatures = {
49
- /** Gemini preview MLLM gate; Gemini ASR uses the production endpoint. */
48
+ /** @deprecated Gemini Live now uses the production endpoint. */
50
49
  GeminiLive: "gemini-live",
50
+ /** @deprecated GPT Live now uses the production endpoint. */
51
51
  LiveModels: "live-models",
52
52
  };
53
53
  /**
@@ -74,96 +74,29 @@ function createPreviewRoute(client, features) {
74
74
  features: [...features],
75
75
  };
76
76
  }
77
- /** ASR vendor served only by the preview endpoint. */
78
- const PREVIEW_ASR_VENDORS = new Set();
79
- /**
80
- * Returns the preview features a start request needs, derived from the request
81
- * body rather than from the vendor classes — so hand-written configs are
82
- * covered too.
83
- */
84
- const PREVIEW_MLLM_MODELS = new Set([
77
+ function requiredPreviewFeatures(_properties) {
78
+ return [];
79
+ }
80
+ const PRODUCTION_GEMINI_MLLM_MODELS = new Set([
85
81
  "models/gemini-3.8-live",
86
82
  "models/gemini-3.8-live-extended-thinking",
87
83
  ]);
88
84
  /**
89
- * Whether a config carries the envelope the preview MLLM vendor classes emit:
90
- * a top-level `mllm.api_key`, and a `url` on the Gemini Developer API host.
91
- * GeminiLive configurations for older model IDs use a different URL: `""` or
92
- * a WebSocket endpoint.
93
- *
94
- * This is the second recognition path, and it exists because keying only off
95
- * {@link PREVIEW_MLLM_MODELS} makes an unrecognised model name fail silently:
96
- * {@link applyPreviewShape} would stop retargeting `greeting_message`, the
97
- * greeting would land in a field these models ignore, and the agent would
98
- * simply never greet. A model name we have not listed yet is reachable by
99
- * following this SDK's own advice to override `model` when Google renames one
100
- * ahead of a release, so the failure has to not be silent.
101
- */
102
- function hasPreviewMllmEnvelope(mllm) {
103
- return (typeof mllm.api_key === "string" && typeof mllm.url === "string" && mllm.url.startsWith(vendors_js_1.GEMINI_PREVIEW_MLLM_URL));
104
- }
105
- /**
106
- * Whether an MLLM config targets a preview model — by name, or by the wire
107
- * envelope only the preview vendor classes produce.
108
- */
109
- function isPreviewMllm(mllm) {
110
- var _a;
111
- if (!mllm || mllm.vendor !== "gemini") {
112
- return false;
113
- }
114
- const model = (_a = mllm.params) === null || _a === void 0 ? void 0 : _a.model;
115
- if (typeof model === "string" && PREVIEW_MLLM_MODELS.has(model)) {
116
- return true;
117
- }
118
- return hasPreviewMllmEnvelope(mllm);
119
- }
120
- function requiredPreviewFeatures(properties) {
121
- var _a;
122
- const features = new Set();
123
- const asrVendor = (_a = properties.asr) === null || _a === void 0 ? void 0 : _a.vendor;
124
- if (asrVendor !== undefined && PREVIEW_ASR_VENDORS.has(asrVendor)) {
125
- features.add(exports.PreviewFeatures.GeminiLive);
126
- }
127
- if ((0, vendors_js_1.isOpenAIGPTLiveConfig)(properties.mllm)) {
128
- features.add(exports.PreviewFeatures.LiveModels);
129
- }
130
- if (isPreviewMllm(properties.mllm)) {
131
- features.add(exports.PreviewFeatures.GeminiLive);
132
- }
133
- return [...features];
134
- }
135
- const PREVIEW_MLLM_FIELD_RENAMES = new Map([["greeting_message", "greeting"]]);
136
- /**
137
- * Retargets MLLM fields that the shared builder wrote using production
138
- * spellings, so a preview config follows the preview route's structure.
139
- *
140
- * `Agent` fills `mllm.greeting_message` from an agent-level `greeting` whenever
141
- * the vendor has not set that key — correct for every GA vendor, but the
142
- * preview Gemini models read `greeting`, so the value would land in a field
143
- * they ignore and the agent would silently never greet.
144
- *
145
- * Rather than teach the shared builder about preview providers, the translation
146
- * lives here and disappears with this directory at GA. The vendor's own value
147
- * wins; the production-spelled one is the fallback, which also migrates a
148
- * hand-written `greeting_message` onto the preview key so an existing config
149
- * keeps working after only swapping the model.
150
- *
151
- * Mutates `properties.mllm` in place. Safe because every SDK hands this a fresh
152
- * copy of the MLLM config rather than the Agent's stored one.
85
+ * Normalizes the historical Gemini preview greeting field for production.
86
+ * Kept under its old name so callers importing this compatibility helper do
87
+ * not need to change code when moving an existing request to production.
153
88
  */
154
89
  function applyPreviewShape(properties) {
90
+ var _a;
155
91
  const mllm = properties.mllm;
156
- if (!mllm || !isPreviewMllm(mllm)) {
92
+ if (!mllm ||
93
+ mllm.vendor !== "gemini" ||
94
+ typeof ((_a = mllm.params) === null || _a === void 0 ? void 0 : _a.model) !== "string" ||
95
+ !PRODUCTION_GEMINI_MLLM_MODELS.has(mllm.params.model)) {
157
96
  return;
158
97
  }
159
- for (const [production, preview] of PREVIEW_MLLM_FIELD_RENAMES) {
160
- const value = mllm[production];
161
- if (value === undefined) {
162
- continue;
163
- }
164
- if (mllm[preview] === undefined) {
165
- mllm[preview] = value;
166
- }
167
- delete mllm[production];
98
+ if (mllm.greeting_message === undefined && mllm.greeting !== undefined) {
99
+ mllm.greeting_message = mllm.greeting;
168
100
  }
101
+ delete mllm.greeting;
169
102
  }
@@ -4,9 +4,11 @@
4
4
  * Preview routing stays here while provider implementations can graduate to
5
5
  * the production vendor modules independently.
6
6
  */
7
+ export type { OpenAIGPTLiveOptions } from "../vendors/mllm.js";
8
+ export { OpenAIGPTLive } from "../vendors/mllm.js";
7
9
  export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.js";
8
10
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.js";
9
11
  export type { PreviewFeature, PreviewRoute } from "./client.js";
10
12
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.js";
11
- export type { GeminiLiveModel, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "./vendors.js";
12
- export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, } from "./vendors.js";
13
+ export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.js";
14
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.js";
@@ -6,7 +6,9 @@
6
6
  * the production vendor modules independently.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = void 0;
9
+ exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.OpenAIGPTLive = void 0;
10
+ var mllm_js_1 = require("../vendors/mllm.js");
11
+ Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return mllm_js_1.OpenAIGPTLive; } });
10
12
  var stt_js_1 = require("../vendors/stt.js");
11
13
  Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return stt_js_1.GeminiSTT; } });
12
14
  Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return stt_js_1.GeminiSTTModels; } });
@@ -21,7 +23,7 @@ Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get:
21
23
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
22
24
  var vendors_js_1 = require("./vendors.js");
23
25
  Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
26
+ Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_URL; } });
24
27
  Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_PREVIEW_MLLM_URL; } });
25
28
  Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return vendors_js_1.GeminiLiveModels; } });
26
29
  Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return vendors_js_1.GeminiThinkingLevels; } });
27
- Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return vendors_js_1.OpenAIGPTLive; } });
@@ -1,105 +1,9 @@
1
- /**
2
- * Preview provider vendor classes.
3
- *
4
- * These follow the same shape as the GA vendor classes in `vendors/` —
5
- * camelCase constructor options in, snake_case wire config out — so they work
6
- * with the corresponding Agent builder method. AgentSession routes them to the
7
- * preview endpoint automatically.
8
- */
9
- import type { McpServersItem, MllmConfig, MllmTurnDetectionConfig } from "../types.js";
10
- import { BaseMLLM } from "../vendors/base.js";
11
- import type { GeminiLiveOptions } from "../vendors/mllm.js";
12
- export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
13
- export declare function isOpenAIGPTLiveConfig(config: unknown): boolean;
14
- /** GPT Live v3 alpha options. Not for production traffic. */
15
- export interface OpenAIGPTLiveOptions {
16
- apiKey: string;
17
- /** Full WebSocket URL, used verbatim except OpenAI's legacy /v1/live route. */
18
- url?: string;
19
- /** @deprecated Use prompt. Serialized as prompt; an explicit prompt wins. */
20
- instructions?: string;
21
- greeting?: string;
22
- failureMessage?: string;
23
- inputModalities?: string[];
24
- outputModalities?: string[];
25
- messages?: Record<string, unknown>[];
26
- /** MCP servers exposed to GPT Live. Requires Agent.withTools(). */
27
- mcpServers?: McpServersItem[];
28
- /** Additional provider fields; explicit options take precedence. */
29
- params?: Record<string, unknown>;
30
- /** @deprecated Unsupported in v3; setting this raises an error. */
31
- inputAudioTranscription?: Record<string, unknown>;
32
- /** @deprecated Ignored with a warning; v3 performs endpointing internally. */
33
- turnDetection?: MllmTurnDetectionConfig;
34
- /** Defaults to gpt-live-1. */
35
- model?: string;
36
- /** Output voice; provider default marin. Custom voice objects require PR #1522; use params after rollout. */
37
- voice?: string;
38
- /** Session instructions. */
39
- prompt?: string;
40
- /** Host when url is omitted; default wss://api.openai.com. */
41
- baseUrl?: string;
42
- /** WebSocket path; default /v1/live/sessions. */
43
- path?: string;
44
- /** Optional OpenAI-Alpha selector for preview contracts. Omitted by default. */
45
- alphaSelector?: string;
46
- /** Extra provider request headers as a JSON string; protocol headers win. */
47
- headers?: string;
48
- /** Assistant silence boundary in ms; provider default 600. Zero disables inference. */
49
- outputIdleEndMs?: number;
50
- /** Caller silence boundary in ms; provider default 1500. */
51
- inputIdleEndMs?: number;
52
- /** Speech amplitude threshold on the 16-bit scale; provider default 50. */
53
- outputSilencePeak?: number;
54
- /** Graph PCM sample rate; provider default 24000. */
55
- outputSampleRate?: number;
56
- /** Initial audio cushion; provider default 0. Negative disables pacing. */
57
- outputBufferMs?: number;
58
- /** Mic append batching in ms. Join default 0; extension class default 100. */
59
- inputBatchMs?: number;
60
- /** Advertise graph tools; provider default false. Does not control delegate built-ins. */
61
- toolEnabled?: boolean;
62
- /** Tool delegation mode; provider default responses. Fixed for the session. */
63
- delegation?: "client" | "responses";
64
- /** Tool delegate model; provider default gpt-5.6-sol. */
65
- responsesModel?: string;
66
- /** Interrupt playback on caller speech; provider default false. */
67
- interruptOnUserTurn?: boolean;
68
- /** Unmodelled v3 session fields. Cannot override model, delegation, audio, instructions or input. */
69
- sessionParams?: Record<string, unknown>;
70
- }
71
- export declare class OpenAIGPTLive extends BaseMLLM {
72
- private readonly options;
73
- constructor(options: OpenAIGPTLiveOptions);
74
- toConfig(): MllmConfig;
75
- }
76
- export declare const GeminiLiveModels: {
77
- /** Public ID for the low-latency voice model. */
78
- readonly Live38: "models/gemini-3.8-live";
79
- /** Public ID for the reasoning voice model. */
80
- readonly Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking";
81
- };
82
- /**
83
- * The model name the Gemini MLLM sends by default.
84
- *
85
- * Low-latency Gemini voice is the default.
86
- */
87
- export declare const GEMINI_MLLM_DEFAULT_MODEL: string;
88
- /**
89
- * A preview Gemini MLLM model. Any string is accepted for launch flexibility;
90
- * the `models/` prefix on the 3.8 IDs is preserved on the wire.
91
- */
92
- export type GeminiLiveModel = (typeof GeminiLiveModels)[keyof typeof GeminiLiveModels] | (string & {});
93
- /** Reasoning budget for Gemini extended thinking. */
94
- export declare const GeminiThinkingLevels: readonly ["low", "medium", "high"];
95
- /** Reasoning budget: `"low"` | `"medium"` | `"high"`. */
96
- export type GeminiThinkingLevel = (typeof GeminiThinkingLevels)[number];
97
- /**
98
- * A Gemini output voice. Known voices autocomplete; any string is accepted so a
99
- * newly published voice can be used before this SDK is updated.
100
- */
101
- export type GeminiPreviewVoice = "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede" | "Leda" | "Orus" | "Zephyr" | (string & {});
102
- /** Default endpoint for the preview Gemini MLLMs. */
103
- export declare const GEMINI_PREVIEW_MLLM_URL = "https://generativelanguage.googleapis.com";
104
- /** Builds the 3.8 preview wire config from the existing GeminiLive options. */
1
+ /** Legacy preview import aliases for production MLLM implementations. */
2
+ import type { MllmConfig } from "../types.js";
3
+ import { type GeminiLiveOptions } from "../vendors/mllm.js";
4
+ /** Legacy preview import aliases for the production GPT Live implementation. */
5
+ /** Gemini 3.8 names remain available from the historical preview path. */
6
+ export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, } from "../vendors/mllm.js";
7
+ export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, isOpenAIGPTLiveConfig, OPENAI_GPT_LIVE_VENDOR, OpenAIGPTLive, } from "../vendors/mllm.js";
8
+ /** @deprecated Use `new GeminiLive(options).toConfig()`. */
105
9
  export declare function buildGeminiPreviewConfig(options: GeminiLiveOptions): MllmConfig;
@@ -1,120 +1,19 @@
1
1
  "use strict";
2
- /**
3
- * Preview provider vendor classes.
4
- *
5
- * These follow the same shape as the GA vendor classes in `vendors/` —
6
- * camelCase constructor options in, snake_case wire config out — so they work
7
- * with the corresponding Agent builder method. AgentSession routes them to the
8
- * preview endpoint automatically.
9
- */
2
+ /** Legacy preview import aliases for production MLLM implementations. */
10
3
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.GEMINI_PREVIEW_MLLM_URL = exports.GeminiThinkingLevels = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiLiveModels = exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = void 0;
12
- exports.isOpenAIGPTLiveConfig = isOpenAIGPTLiveConfig;
4
+ exports.OpenAIGPTLive = exports.OPENAI_GPT_LIVE_VENDOR = exports.isOpenAIGPTLiveConfig = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = void 0;
13
5
  exports.buildGeminiPreviewConfig = buildGeminiPreviewConfig;
14
- const base_js_1 = require("../vendors/base.js");
15
- // =============================================================================
16
- // OpenAI GPT Live (MLLM)
17
- // =============================================================================
18
- exports.OPENAI_GPT_LIVE_VENDOR = "openai_gpt_live";
19
- function isOpenAIGPTLiveConfig(config) {
20
- return (config === null || config === void 0 ? void 0 : config.vendor) === exports.OPENAI_GPT_LIVE_VENDOR;
21
- }
22
- function normalizeMcpServers(servers) {
23
- return servers.map((server) => (Object.assign({ transport: "streamable_http" }, server)));
24
- }
25
- class OpenAIGPTLive extends base_js_1.BaseMLLM {
26
- constructor(options) {
27
- super();
28
- this.options = options;
29
- if (!options.apiKey)
30
- throw new Error("OpenAIGPTLive requires apiKey");
31
- }
32
- toConfig() {
33
- var _a, _b;
34
- const o = this.options;
35
- const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ model: "gpt-live-1" }, o.params), (o.instructions !== undefined && { prompt: o.instructions })), (o.model !== undefined && { model: o.model })), (o.voice !== undefined && { voice: o.voice })), (o.prompt !== undefined && { prompt: o.prompt })), (o.baseUrl !== undefined && { base_url: o.baseUrl })), (o.path !== undefined && { path: o.path })), (o.alphaSelector !== undefined && { alpha_selector: o.alphaSelector })), (o.headers !== undefined && { headers: o.headers })), (o.outputIdleEndMs !== undefined && { output_idle_end_ms: o.outputIdleEndMs })), (o.inputIdleEndMs !== undefined && { input_idle_end_ms: o.inputIdleEndMs })), (o.outputSilencePeak !== undefined && { output_silence_peak: o.outputSilencePeak })), (o.outputSampleRate !== undefined && { output_sample_rate: o.outputSampleRate })), (o.outputBufferMs !== undefined && { output_buffer_ms: o.outputBufferMs })), (o.inputBatchMs !== undefined && { input_batch_ms: o.inputBatchMs })), (o.toolEnabled !== undefined && { tool_enabled: o.toolEnabled })), (o.delegation !== undefined && { delegation: o.delegation })), (o.responsesModel !== undefined && { responses_model: o.responsesModel })), (o.interruptOnUserTurn !== undefined && { interrupt_on_user_turn: o.interruptOnUserTurn })), (o.sessionParams !== undefined && { session_params: o.sessionParams }));
36
- if (o.inputAudioTranscription !== undefined || "input_audio_transcription" in params) {
37
- throw new Error("GPT Live v3 does not support input_audio_transcription");
38
- }
39
- if (o.turnDetection !== undefined || "turn_detection" in params) {
40
- console.warn("GPT Live v3 ignores turn_detection; endpointing is internal");
41
- delete params.turn_detection;
42
- }
43
- if (params.delegation !== undefined && params.delegation !== "client" && params.delegation !== "responses") {
44
- throw new Error("GPT Live delegation must be client or responses");
45
- }
46
- if (params.headers !== undefined) {
47
- let headers;
48
- try {
49
- headers = JSON.parse(String(params.headers));
50
- }
51
- catch (_c) {
52
- throw new Error("GPT Live headers must be a JSON object string");
53
- }
54
- if (headers === null || typeof headers !== "object" || Array.isArray(headers)) {
55
- throw new Error("GPT Live headers must be a JSON object string");
56
- }
57
- }
58
- const session = params.session_params === undefined ? {} : params.session_params;
59
- if (session === null || typeof session !== "object" || Array.isArray(session)) {
60
- throw new Error("GPT Live session_params must be an object");
61
- }
62
- for (const key of ["model", "delegation", "audio", "instructions", "input"]) {
63
- if (key in session)
64
- throw new Error(`GPT Live session_params cannot override ${key}`);
65
- }
66
- let url = o.url ||
67
- `${String((_a = params.base_url) !== null && _a !== void 0 ? _a : "wss://api.openai.com").replace(/\/+$/, "")}/${String((_b = params.path) !== null && _b !== void 0 ? _b : "/v1/live/sessions").replace(/^\/+/, "")}`;
68
- if (!/^wss?:\/\/[^/]/i.test(url)) {
69
- throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
70
- }
71
- let parsed;
72
- try {
73
- parsed = new URL(url);
74
- }
75
- catch (_d) {
76
- throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
77
- }
78
- if ((parsed.protocol !== "ws:" && parsed.protocol !== "wss:") || !parsed.hostname) {
79
- throw new Error("GPT Live url must be a full ws:// or wss:// endpoint");
80
- }
81
- if (parsed.hostname === "api.openai.com" && parsed.pathname === "/v1/live") {
82
- parsed.pathname = "/v1/live/sessions";
83
- url = parsed.toString();
84
- }
85
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: exports.OPENAI_GPT_LIVE_VENDOR, api_key: o.apiKey, url,
86
- params }, (o.greeting !== undefined && { greeting_message: o.greeting })), (o.failureMessage !== undefined && { failure_message: o.failureMessage })), (o.inputModalities !== undefined && { input_modalities: o.inputModalities })), (o.outputModalities !== undefined && { output_modalities: o.outputModalities })), (o.messages !== undefined && { messages: o.messages })), (o.mcpServers !== undefined && { mcp_servers: normalizeMcpServers(o.mcpServers) }));
87
- }
88
- }
89
- exports.OpenAIGPTLive = OpenAIGPTLive;
90
- // Google preview MLLMs use a separate feature gate from GPT Live.
91
- exports.GeminiLiveModels = {
92
- /** Public ID for the low-latency voice model. */
93
- Live38: "models/gemini-3.8-live",
94
- /** Public ID for the reasoning voice model. */
95
- Live38ExtendedThinking: "models/gemini-3.8-live-extended-thinking",
96
- };
97
- /**
98
- * The model name the Gemini MLLM sends by default.
99
- *
100
- * Low-latency Gemini voice is the default.
101
- */
102
- exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiLiveModels.Live38;
103
- /** Reasoning budget for Gemini extended thinking. */
104
- exports.GeminiThinkingLevels = ["low", "medium", "high"];
105
- /** Default endpoint for the preview Gemini MLLMs. */
106
- exports.GEMINI_PREVIEW_MLLM_URL = "https://generativelanguage.googleapis.com";
107
- /** Builds the 3.8 preview wire config from the existing GeminiLive options. */
6
+ const mllm_js_1 = require("../vendors/mllm.js");
7
+ var mllm_js_2 = require("../vendors/mllm.js");
8
+ Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return mllm_js_2.GEMINI_MLLM_DEFAULT_MODEL; } });
9
+ Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return mllm_js_2.GEMINI_MLLM_URL; } });
10
+ Object.defineProperty(exports, "GEMINI_PREVIEW_MLLM_URL", { enumerable: true, get: function () { return mllm_js_2.GEMINI_PREVIEW_MLLM_URL; } });
11
+ Object.defineProperty(exports, "GeminiLiveModels", { enumerable: true, get: function () { return mllm_js_2.GeminiLiveModels; } });
12
+ Object.defineProperty(exports, "GeminiThinkingLevels", { enumerable: true, get: function () { return mllm_js_2.GeminiThinkingLevels; } });
13
+ Object.defineProperty(exports, "isOpenAIGPTLiveConfig", { enumerable: true, get: function () { return mllm_js_2.isOpenAIGPTLiveConfig; } });
14
+ Object.defineProperty(exports, "OPENAI_GPT_LIVE_VENDOR", { enumerable: true, get: function () { return mllm_js_2.OPENAI_GPT_LIVE_VENDOR; } });
15
+ Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return mllm_js_2.OpenAIGPTLive; } });
16
+ /** @deprecated Use `new GeminiLive(options).toConfig()`. */
108
17
  function buildGeminiPreviewConfig(options) {
109
- const { model: requestedModel, apiKey, thinkingLevel, voice = "Puck", languageCodes, url = exports.GEMINI_PREVIEW_MLLM_URL, instructions, transcribeAgent, transcribeUser, affectiveDialog, proactiveAudio, httpOptions, greetingMessage, failureMessage, inputModalities, outputModalities, messages, additionalParams, turnDetection, } = options;
110
- const model = (requestedModel === null || requestedModel === void 0 ? void 0 : requestedModel.trim()) || exports.GEMINI_MLLM_DEFAULT_MODEL;
111
- const reasoningModel = model === exports.GeminiLiveModels.Live38ExtendedThinking;
112
- const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { model,
113
- voice }), (reasoningModel && thinkingLevel !== undefined && { thinking_level: thinkingLevel })), (languageCodes && { language_codes: [...languageCodes] })), (instructions && { instructions })), (transcribeAgent !== undefined && { transcribe_agent: transcribeAgent })), (transcribeUser !== undefined && { transcribe_user: transcribeUser })), (affectiveDialog !== undefined && { affective_dialog: affectiveDialog })), (proactiveAudio !== undefined && { proactive_audio: proactiveAudio })), (httpOptions && { http_options: httpOptions }));
114
- if (!reasoningModel) {
115
- delete params.thinking_level;
116
- }
117
- delete params.api_key;
118
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "gemini", api_key: apiKey, url,
119
- params }, (messages && { messages })), (greetingMessage && { greeting: greetingMessage })), (failureMessage && { failure_message: failureMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (turnDetection && { turn_detection: turnDetection }));
18
+ return new mllm_js_1.GeminiLive(options).toConfig();
120
19
  }