agora-agents 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/agentkit/Agent.d.ts +1 -1
  4. package/dist/cjs/agentkit/Agent.js +27 -12
  5. package/dist/cjs/agentkit/AgentSession.d.ts +0 -3
  6. package/dist/cjs/agentkit/AgentSession.js +3 -3
  7. package/dist/cjs/agentkit/debug.d.ts +2 -4
  8. package/dist/cjs/agentkit/debug.js +15 -6
  9. package/dist/cjs/agentkit/index.d.ts +7 -5
  10. package/dist/cjs/agentkit/index.js +15 -12
  11. package/dist/cjs/agentkit/preview/client.d.ts +6 -5
  12. package/dist/cjs/agentkit/preview/client.js +10 -5
  13. package/dist/cjs/agentkit/preview/index.d.ts +6 -5
  14. package/dist/cjs/agentkit/preview/index.js +8 -6
  15. package/dist/cjs/agentkit/preview/vendors.d.ts +65 -63
  16. package/dist/cjs/agentkit/preview/vendors.js +71 -36
  17. package/dist/cjs/agentkit/types.d.ts +23 -41
  18. package/dist/cjs/agentkit/vendors/base.d.ts +6 -2
  19. package/dist/cjs/agentkit/vendors/base.js +4 -0
  20. package/dist/cjs/agentkit/vendors/cn.js +7 -5
  21. package/dist/cjs/agentkit/vendors/llm.js +8 -1
  22. package/dist/cjs/agentkit/vendors/stt.d.ts +45 -2
  23. package/dist/cjs/agentkit/vendors/stt.js +53 -5
  24. package/dist/cjs/agentkit/vendors/tts.js +1 -1
  25. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +12 -20
  26. package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +1 -1
  27. package/dist/cjs/api/types/Asr.d.ts +4 -1
  28. package/dist/cjs/api/types/GeminiAsr.d.ts +10 -0
  29. package/dist/cjs/api/types/GeminiAsr.js +3 -0
  30. package/dist/cjs/api/types/GeminiAsrParams.d.ts +33 -0
  31. package/dist/cjs/api/types/GeminiAsrParams.js +12 -0
  32. package/dist/cjs/api/types/index.d.ts +2 -0
  33. package/dist/cjs/api/types/index.js +2 -0
  34. package/dist/cjs/index.d.ts +2 -2
  35. package/dist/cjs/index.js +5 -3
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/BaseClient.mjs +2 -2
  39. package/dist/esm/agentkit/Agent.d.mts +1 -1
  40. package/dist/esm/agentkit/Agent.mjs +27 -12
  41. package/dist/esm/agentkit/AgentSession.d.mts +0 -3
  42. package/dist/esm/agentkit/AgentSession.mjs +3 -3
  43. package/dist/esm/agentkit/debug.d.mts +2 -4
  44. package/dist/esm/agentkit/debug.mjs +15 -6
  45. package/dist/esm/agentkit/index.d.mts +7 -5
  46. package/dist/esm/agentkit/index.mjs +3 -2
  47. package/dist/esm/agentkit/preview/client.d.mts +6 -5
  48. package/dist/esm/agentkit/preview/client.mjs +10 -5
  49. package/dist/esm/agentkit/preview/index.d.mts +6 -5
  50. package/dist/esm/agentkit/preview/index.mjs +4 -4
  51. package/dist/esm/agentkit/preview/vendors.d.mts +65 -63
  52. package/dist/esm/agentkit/preview/vendors.mjs +69 -35
  53. package/dist/esm/agentkit/types.d.mts +23 -41
  54. package/dist/esm/agentkit/vendors/base.d.mts +6 -2
  55. package/dist/esm/agentkit/vendors/base.mjs +4 -0
  56. package/dist/esm/agentkit/vendors/cn.mjs +7 -5
  57. package/dist/esm/agentkit/vendors/llm.mjs +8 -1
  58. package/dist/esm/agentkit/vendors/stt.d.mts +45 -2
  59. package/dist/esm/agentkit/vendors/stt.mjs +51 -4
  60. package/dist/esm/agentkit/vendors/tts.mjs +1 -1
  61. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +12 -20
  62. package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +1 -1
  63. package/dist/esm/api/types/Asr.d.mts +4 -1
  64. package/dist/esm/api/types/GeminiAsr.d.mts +10 -0
  65. package/dist/esm/api/types/GeminiAsr.mjs +2 -0
  66. package/dist/esm/api/types/GeminiAsrParams.d.mts +33 -0
  67. package/dist/esm/api/types/GeminiAsrParams.mjs +9 -0
  68. package/dist/esm/api/types/index.d.mts +2 -0
  69. package/dist/esm/api/types/index.mjs +2 -0
  70. package/dist/esm/index.d.mts +2 -2
  71. package/dist/esm/index.mjs +2 -2
  72. package/dist/esm/version.d.mts +1 -1
  73. package/dist/esm/version.mjs +1 -1
  74. package/package.json +4 -2
  75. package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.d.ts +0 -1
  76. package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.js +0 -87
  77. package/dist/cjs/agentkit/__tests__/preview-types.test.d.ts +0 -7
  78. package/dist/cjs/agentkit/__tests__/preview-types.test.js +0 -57
  79. package/dist/cjs/agentkit/__tests__/readme-examples.test.d.ts +0 -1
  80. package/dist/cjs/agentkit/__tests__/readme-examples.test.js +0 -126
  81. package/dist/cjs/agentkit/__tests__/type-safety.test.d.ts +0 -14
  82. package/dist/cjs/agentkit/__tests__/type-safety.test.js +0 -321
  83. package/dist/esm/agentkit/__tests__/area-aware-vendors.test.d.mts +0 -1
  84. package/dist/esm/agentkit/__tests__/area-aware-vendors.test.mjs +0 -85
  85. package/dist/esm/agentkit/__tests__/preview-types.test.d.mts +0 -7
  86. package/dist/esm/agentkit/__tests__/preview-types.test.mjs +0 -55
  87. package/dist/esm/agentkit/__tests__/readme-examples.test.d.mts +0 -1
  88. package/dist/esm/agentkit/__tests__/readme-examples.test.mjs +0 -124
  89. package/dist/esm/agentkit/__tests__/type-safety.test.d.mts +0 -14
  90. package/dist/esm/agentkit/__tests__/type-safety.test.mjs +0 -319
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Agora Conversational AI TypeScript SDK
2
2
 
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FAgoraIO-Conversational-AI%2Fagent-server-sdk-ts)
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FAgoraIO%2Fagora-agents-ts)
4
4
  [![npm shield](https://img.shields.io/npm/v/agora-agents)](https://www.npmjs.com/package/agora-agents)
5
- [![ci](https://github.com/AgoraIO-Conversational-AI/agent-server-sdk-ts/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/AgoraIO-Conversational-AI/agent-server-sdk-ts/actions/workflows/ci.yml)
6
- [![coverage](https://codecov.io/gh/AgoraIO-Conversational-AI/agent-server-sdk-ts/branch/main/graph/badge.svg)](https://codecov.io/gh/AgoraIO-Conversational-AI/agent-server-sdk-ts/branch/main)
5
+ [![ci](https://github.com/AgoraIO/agora-agents-ts/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/AgoraIO/agora-agents-ts/actions/workflows/ci.yml)
6
+ [![coverage](https://codecov.io/gh/AgoraIO/agora-agents-ts/branch/main/graph/badge.svg)](https://codecov.io/gh/AgoraIO/agora-agents-ts/branch/main)
7
7
 
8
8
  The Agora Agents SDK for TypeScript lets you build real-time voice agents on Agora Conversational AI with a high-level `Agent` / `AgentSession` API and a generated REST client.
9
9
 
@@ -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.7.0",
45
- "User-Agent": "agora-agents/v2.7.0",
44
+ "X-Fern-SDK-Version": "v2.8.1",
45
+ "User-Agent": "agora-agents/v2.8.1",
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);
@@ -246,7 +246,7 @@ export declare class Agent<TTSSampleRate extends number = number, TArea extends
246
246
  */
247
247
  withAdvancedFeatures(features: AdvancedFeatures): Agent<TTSSampleRate, TArea>;
248
248
  /**
249
- * Returns a new Agent with MCP tool invocation enabled or disabled.
249
+ * Returns a new Agent with MCP and inline REST tool invocation enabled or disabled.
250
250
  */
251
251
  withTools(enabled?: boolean): Agent<TTSSampleRate, TArea>;
252
252
  /**
@@ -11,8 +11,14 @@ 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");
14
15
  const token_js_1 = require("./token.js");
15
16
  const DEFAULT_TURN_DETECTION_LANGUAGE = "en-US";
17
+ function toGeneratedMllm(config) {
18
+ // The preview vendor predates its generated schema enum. Keep the assertion at
19
+ // this wire boundary so the public and builder APIs remain accurately typed.
20
+ return config;
21
+ }
16
22
  const INTERACTION_LANGUAGES = new Set([
17
23
  "ar-EG",
18
24
  "ar-JO",
@@ -306,7 +312,7 @@ class Agent {
306
312
  return newAgent;
307
313
  }
308
314
  /**
309
- * Returns a new Agent with MCP tool invocation enabled or disabled.
315
+ * Returns a new Agent with MCP and inline REST tool invocation enabled or disabled.
310
316
  */
311
317
  withTools(enabled = true) {
312
318
  const newAgent = this._clone();
@@ -627,7 +633,7 @@ class Agent {
627
633
  remote_rtc_uids: opts.remoteUids,
628
634
  idle_timeout: opts.idleTimeout,
629
635
  enable_string_uid: opts.enableStringUid,
630
- mllm: this._mllm,
636
+ mllm: toGeneratedMllm(this._mllm),
631
637
  interruption: this._interruption,
632
638
  sal: this._sal,
633
639
  avatar: this._avatar,
@@ -639,15 +645,11 @@ class Agent {
639
645
  filler_words: this._fillerWords,
640
646
  };
641
647
  if (isMllmMode) {
642
- const mllmConfig = this._mllm ? Object.assign({}, this._mllm) : undefined;
648
+ const mllmConfig = toGeneratedMllm(this._mllm ? Object.assign({}, this._mllm) : undefined);
643
649
  if (mllmConfig) {
644
650
  // Vendor config wins: only apply agent-level values when the vendor hasn't already set them.
645
651
  // Consistent with Python (setdefault) and Go (!exists) semantics.
646
652
  //
647
- // These are production wire spellings. A route that spells one of them
648
- // differently needs a rename entry in `preview/client.ts`, or the value
649
- // lands in a field the provider ignores and fails silently. See
650
- // docs/guides/preview-endpoint.md#the-vendor-class-is-not-the-whole-wire-shape.
651
653
  const c = mllmConfig;
652
654
  if (this._greeting !== undefined && c.greeting_message === undefined) {
653
655
  c.greeting_message = this._greeting;
@@ -656,7 +658,14 @@ class Agent {
656
658
  c.failure_message = this._failureMessage;
657
659
  }
658
660
  }
659
- return Object.assign(Object.assign({}, base), { mllm: mllmConfig, turn_detection: this._turnDetection });
661
+ const isOpenAIGPTLive = (0, vendors_js_1.isOpenAIGPTLiveConfig)(mllmConfig);
662
+ if (isOpenAIGPTLive && this._turnDetection !== undefined) {
663
+ console.warn("GPT Live v3 ignores agent-level turn_detection; endpointing is internal");
664
+ }
665
+ return Object.assign(Object.assign(Object.assign({}, base), { mllm: mllmConfig }), (!isOpenAIGPTLive &&
666
+ this._turnDetection !== undefined && {
667
+ turn_detection: this._turnDetection,
668
+ }));
660
669
  }
661
670
  const skipCategories = new Set((_c = opts.skipVendorValidationCategories) !== null && _c !== void 0 ? _c : []);
662
671
  const allowMissingCategories = new Set((_d = opts.allowMissingVendorCategories) !== null && _d !== void 0 ? _d : []);
@@ -729,10 +738,16 @@ class Agent {
729
738
  : {
730
739
  vendor: this._client.area === index_js_1.Area.CN ? "fengming" : "ares",
731
740
  };
732
- // Unconditional: turn detection is the single source of truth for the
733
- // interaction language, so a vendor-level `language` would be silently
734
- // discarded here. Do not add one to a vendor class — see
735
- // docs/guides/preview-endpoint.md#the-vendor-class-is-not-the-whole-wire-shape.
741
+ if (asrConfig.vendor === "gemini" && asrConfig.params !== undefined) {
742
+ const params = Object.assign({}, asrConfig.params);
743
+ if (params.language_hints === undefined && params.language_codes !== undefined) {
744
+ params.language_hints = params.language_codes;
745
+ }
746
+ delete params.language_codes;
747
+ asrConfig.params = params;
748
+ }
749
+ // Turn detection is the single source of truth for the top-level
750
+ // interaction language. Provider-specific languages remain in params.
736
751
  asrConfig.language = turnDetectionConfig.language;
737
752
  return Object.keys(asrConfig).length > 0 ? asrConfig : undefined;
738
753
  }
@@ -137,9 +137,6 @@ export declare class AgentSession {
137
137
  /**
138
138
  * Client-level default headers, for debug logging only.
139
139
  *
140
- * These carry the preview `agora-feature` gate, which the generated client
141
- * merges in below the SDK's view — so without this the header that decides
142
- * whether a request reaches a preview provider is invisible in debug output.
143
140
  * Reaches into `_options` the same way `authMode` is read in the constructor;
144
141
  * supplier-valued headers are skipped rather than resolved, since debug
145
142
  * logging must not trigger side effects.
@@ -120,9 +120,6 @@ class AgentSession {
120
120
  /**
121
121
  * Client-level default headers, for debug logging only.
122
122
  *
123
- * These carry the preview `agora-feature` gate, which the generated client
124
- * merges in below the SDK's view — so without this the header that decides
125
- * whether a request reaches a preview provider is invisible in debug output.
126
123
  * Reaches into `_options` the same way `authMode` is read in the constructor;
127
124
  * supplier-valued headers are skipped rather than resolved, since debug
128
125
  * logging must not trigger side effects.
@@ -139,6 +136,9 @@ class AgentSession {
139
136
  result[key] = value;
140
137
  }
141
138
  }
139
+ if (this._previewFeatures.length > 0) {
140
+ return (0, client_js_1.previewRequestHeaders)(this._previewFeatures, result);
141
+ }
142
142
  return result;
143
143
  }
144
144
  /**
@@ -25,9 +25,7 @@ export declare function redactSecrets(value: unknown): unknown;
25
25
  /**
26
26
  * Redacts request headers for debug logging.
27
27
  *
28
- * `agora-feature` and the SDK identification headers are kept — they are what
29
- * makes a preview request identifiable, and no header carries a secret except
30
- * the authorization scheme's credential, whose scheme name is preserved so the
31
- * active auth mode stays visible.
28
+ * Non-authorization headers are kept. The authorization credential is removed,
29
+ * while its scheme name stays visible so the active auth mode can be diagnosed.
32
30
  */
33
31
  export declare function redactHeadersForDebug(headers: Record<string, string>): Record<string, string>;
@@ -46,6 +46,10 @@ const SENSITIVE_BODY_KEYS = new Set([
46
46
  "agora_token",
47
47
  "agoratoken",
48
48
  "authorization",
49
+ "headers",
50
+ "x-api-key",
51
+ "cookie",
52
+ "set-cookie",
49
53
  "appid",
50
54
  "app_id",
51
55
  "agora_appid",
@@ -68,7 +72,7 @@ function redactQueryKeys(value) {
68
72
  }
69
73
  let changed = false;
70
74
  for (const key of [...parsed.searchParams.keys()]) {
71
- if (key.toLowerCase() !== "key") {
75
+ if (!isSensitiveKey(key)) {
72
76
  continue;
73
77
  }
74
78
  const current = parsed.searchParams.getAll(key);
@@ -115,18 +119,23 @@ function redactSecrets(value) {
115
119
  /**
116
120
  * Redacts request headers for debug logging.
117
121
  *
118
- * `agora-feature` and the SDK identification headers are kept — they are what
119
- * makes a preview request identifiable, and no header carries a secret except
120
- * the authorization scheme's credential, whose scheme name is preserved so the
121
- * active auth mode stays visible.
122
+ * Non-authorization headers are kept. The authorization credential is removed,
123
+ * while its scheme name stays visible so the active auth mode can be diagnosed.
122
124
  */
123
125
  function redactHeadersForDebug(headers) {
124
126
  const result = {};
125
127
  for (const [key, value] of Object.entries(headers)) {
126
- if (key.toLowerCase() !== "authorization") {
128
+ const normalized = key.toLowerCase();
129
+ const sensitive = isSensitiveKey(normalized) ||
130
+ ["authorization", "api-key", "api_key", "token", "secret", "credential", "cookie"].some((marker) => normalized.includes(marker));
131
+ if (!sensitive || value.length === 0) {
127
132
  result[key] = value;
128
133
  continue;
129
134
  }
135
+ if (normalized !== "authorization") {
136
+ result[key] = exports.REDACTED;
137
+ continue;
138
+ }
130
139
  const scheme = value.split(/[\s=]/, 1)[0];
131
140
  result[key] = scheme && scheme !== value ? `${scheme} ${exports.REDACTED}` : exports.REDACTED;
132
141
  }
@@ -29,12 +29,14 @@ export { AudioScenario, CredentialMode, DataChannel, FillerWordsSelectionRule, G
29
29
  export { REDACTED, redactHeadersForDebug, redactSecrets } from "./debug.js";
30
30
  export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPresetModel, OpenAIPresetModel, OpenAITtsPresetModel, PresetCategory, PresetInput, TtsPreset, } from "./presets.js";
31
31
  export { AgentPresets, normalizePresetInput } from "./presets.js";
32
- export type { GeminiSTTModel, GeminiSTTOptions, PreviewFeature, PreviewRoute, } from "./preview/index.js";
33
- export { createPreviewRoute, GeminiSTT, GeminiSTTModels, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/index.js";
32
+ export type { PreviewFeature, PreviewRoute } from "./preview/client.js";
33
+ export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.js";
34
+ export type { OpenAIGPTLiveOptions } from "./preview/vendors.js";
35
+ export { OpenAIGPTLive } from "./preview/vendors.js";
34
36
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.js";
35
37
  export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
36
38
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.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, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, 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, 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";
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";
38
40
  export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LiveAvatarAvatarOptions, } from "./vendors/avatar.js";
39
41
  export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LiveAvatarAvatar, } from "./vendors/avatar.js";
40
42
  export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.js";
@@ -45,7 +47,7 @@ export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, Custom
45
47
  export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.js";
46
48
  export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.js";
47
49
  export { AzureOpenAIRealtime, GeminiLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.js";
48
- export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, SarvamSTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
49
- export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.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";
50
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";
51
53
  export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.js";
@@ -20,9 +20,9 @@
20
20
  * parts that need manual updates when adding new sugar.
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.GeminiSTTModels = exports.GeminiSTT = 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.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 = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = 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.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = void 0;
23
+ exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.normalizePresetInput = exports.AgentPresets = exports.redactSecrets = exports.redactHeadersForDebug = exports.REDACTED = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SilenceActionValues = exports.SalModeValues = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.Geofence = exports.FillerWordsSelectionRule = exports.DataChannel = exports.CredentialMode = exports.AudioScenario = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.toBaseAvatarConfig = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.AgentSession = exports.Agent = void 0;
24
+ exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.OpenAIGPTLive = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
+ exports.XAiTTS = exports.TypecastTTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.GeminiLive = exports.AzureOpenAIRealtime = exports.VertexAILLM = void 0;
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; } });
@@ -78,15 +78,15 @@ Object.defineProperty(exports, "redactSecrets", { enumerable: true, get: functio
78
78
  var presets_js_1 = require("./presets.js");
79
79
  Object.defineProperty(exports, "AgentPresets", { enumerable: true, get: function () { return presets_js_1.AgentPresets; } });
80
80
  Object.defineProperty(exports, "normalizePresetInput", { enumerable: true, get: function () { return presets_js_1.normalizePresetInput; } });
81
- var index_js_1 = require("./preview/index.js");
82
- Object.defineProperty(exports, "createPreviewRoute", { enumerable: true, get: function () { return index_js_1.createPreviewRoute; } });
83
- Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return index_js_1.GeminiSTT; } });
84
- Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return index_js_1.GeminiSTTModels; } });
85
- Object.defineProperty(exports, "PREVIEW_API_BASE_URL", { enumerable: true, get: function () { return index_js_1.PREVIEW_API_BASE_URL; } });
86
- Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get: function () { return index_js_1.PREVIEW_FEATURE_HEADER; } });
87
- Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: function () { return index_js_1.PreviewFeatures; } });
88
- Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return index_js_1.previewRequestHeaders; } });
89
- Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return index_js_1.requiredPreviewFeatures; } });
81
+ var client_js_1 = require("./preview/client.js");
82
+ Object.defineProperty(exports, "createPreviewRoute", { enumerable: true, get: function () { return client_js_1.createPreviewRoute; } });
83
+ Object.defineProperty(exports, "PREVIEW_API_BASE_URL", { enumerable: true, get: function () { return client_js_1.PREVIEW_API_BASE_URL; } });
84
+ Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get: function () { return client_js_1.PREVIEW_FEATURE_HEADER; } });
85
+ Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: function () { return client_js_1.PreviewFeatures; } });
86
+ Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
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, "OpenAIGPTLive", { enumerable: true, get: function () { return vendors_js_1.OpenAIGPTLive; } });
90
90
  // Token generation
91
91
  var token_js_1 = require("./token.js");
92
92
  Object.defineProperty(exports, "ExpiresIn", { enumerable: true, get: function () { return token_js_1.ExpiresIn; } });
@@ -157,6 +157,9 @@ Object.defineProperty(exports, "AmazonSTT", { enumerable: true, get: function ()
157
157
  Object.defineProperty(exports, "AresSTT", { enumerable: true, get: function () { return stt_js_1.AresSTT; } });
158
158
  Object.defineProperty(exports, "AssemblyAISTT", { enumerable: true, get: function () { return stt_js_1.AssemblyAISTT; } });
159
159
  Object.defineProperty(exports, "DeepgramSTT", { enumerable: true, get: function () { return stt_js_1.DeepgramSTT; } });
160
+ Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return stt_js_1.GeminiSTT; } });
161
+ Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return stt_js_1.GeminiSTTModels; } });
162
+ Object.defineProperty(exports, "GeminiTranscriptionMode", { enumerable: true, get: function () { return stt_js_1.GeminiTranscriptionMode; } });
160
163
  Object.defineProperty(exports, "GoogleSTT", { enumerable: true, get: function () { return stt_js_1.GoogleSTT; } });
161
164
  Object.defineProperty(exports, "MicrosoftSTT", { enumerable: true, get: function () { return stt_js_1.MicrosoftSTT; } });
162
165
  Object.defineProperty(exports, "OpenAISTT", { enumerable: true, get: function () { return stt_js_1.OpenAISTT; } });
@@ -7,9 +7,9 @@
7
7
  * and binds that session to the preview host while ordinary AgoraClient calls
8
8
  * remain on the regional production endpoint.
9
9
  *
10
- * Everything under `agentkit/preview/` is temporary. When these providers ship
11
- * on the production gateway, delete this directory and move the vendor classes
12
- * into `vendors/stt.ts`.
10
+ * Everything under `agentkit/preview/` is temporary. When a provider ships on
11
+ * the production gateway, remove its preview registration and move its class
12
+ * into the corresponding production vendor module.
13
13
  */
14
14
  import type { AgoraClient } from "../../AgoraPoolClient.js";
15
15
  import type * as Agora from "../../api/index.js";
@@ -31,10 +31,11 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
- /** Gemini 3.5 Transcribe ASR. */
34
+ /** @deprecated Gemini ASR now uses the production endpoint. */
35
35
  readonly GeminiLive: "gemini-live";
36
+ readonly LiveModels: "live-models";
36
37
  };
37
- /** A preview provider family (`"gemini-live"`). */
38
+ /** A preview provider family gate value. */
38
39
  export type PreviewFeature = (typeof PreviewFeatures)[keyof typeof PreviewFeatures];
39
40
  /** Session-scoped clients bound to one resolved route. */
40
41
  export interface PreviewRoute {
@@ -8,9 +8,9 @@
8
8
  * and binds that session to the preview host while ordinary AgoraClient calls
9
9
  * remain on the regional production endpoint.
10
10
  *
11
- * Everything under `agentkit/preview/` is temporary. When these providers ship
12
- * on the production gateway, delete this directory and move the vendor classes
13
- * into `vendors/stt.ts`.
11
+ * Everything under `agentkit/preview/` is temporary. When a provider ships on
12
+ * the production gateway, remove its preview registration and move its class
13
+ * into the corresponding production vendor module.
14
14
  */
15
15
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
16
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -28,6 +28,7 @@ exports.createPreviewRoute = createPreviewRoute;
28
28
  exports.requiredPreviewFeatures = requiredPreviewFeatures;
29
29
  const Client_js_1 = require("../../api/resources/agentManagement/client/Client.js");
30
30
  const Client_js_2 = require("../../api/resources/agents/client/Client.js");
31
+ const vendors_js_1 = require("./vendors.js");
31
32
  /** Base URL that serves the preview providers. */
32
33
  exports.PREVIEW_API_BASE_URL = "https://partner.ai.agora.io/preview/api/conversational-ai-agent";
33
34
  /**
@@ -44,8 +45,9 @@ exports.PREVIEW_FEATURE_HEADER = "agora-feature";
44
45
  * preview endpoint.
45
46
  */
46
47
  exports.PreviewFeatures = {
47
- /** Gemini 3.5 Transcribe ASR. */
48
+ /** @deprecated Gemini ASR now uses the production endpoint. */
48
49
  GeminiLive: "gemini-live",
50
+ LiveModels: "live-models",
49
51
  };
50
52
  /**
51
53
  * Pins the gate after any caller headers. This is also used for per-call auth
@@ -72,7 +74,7 @@ function createPreviewRoute(client, features) {
72
74
  };
73
75
  }
74
76
  /** ASR vendor served only by the preview endpoint. */
75
- const PREVIEW_ASR_VENDORS = new Set(["gemini"]);
77
+ const PREVIEW_ASR_VENDORS = new Set();
76
78
  /**
77
79
  * Returns the preview features a start request needs, derived from the request
78
80
  * body rather than from the vendor classes — so hand-written configs are
@@ -85,5 +87,8 @@ function requiredPreviewFeatures(properties) {
85
87
  if (asrVendor !== undefined && PREVIEW_ASR_VENDORS.has(asrVendor)) {
86
88
  features.add(exports.PreviewFeatures.GeminiLive);
87
89
  }
90
+ if ((0, vendors_js_1.isOpenAIGPTLiveConfig)(properties.mllm)) {
91
+ features.add(exports.PreviewFeatures.LiveModels);
92
+ }
88
93
  return [...features];
89
94
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Preview provider surface.
3
3
  *
4
- * Self-contained on purpose: when these providers ship on the production
5
- * gateway, this directory is deleted and the vendor classes move into
6
- * `vendors/stt.ts`.
4
+ * Preview routing stays here while provider implementations can graduate to
5
+ * the production vendor modules independently.
7
6
  */
7
+ export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.js";
8
+ export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.js";
8
9
  export type { PreviewFeature, PreviewRoute } from "./client.js";
9
10
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.js";
10
- export type { GeminiSTTModel, GeminiSTTOptions } from "./vendors.js";
11
- export { GeminiSTT, GeminiSTTModels } from "./vendors.js";
11
+ export type { OpenAIGPTLiveOptions } from "./vendors.js";
12
+ export { OpenAIGPTLive } from "./vendors.js";
@@ -2,12 +2,15 @@
2
2
  /**
3
3
  * Preview provider surface.
4
4
  *
5
- * Self-contained on purpose: when these providers ship on the production
6
- * gateway, this directory is deleted and the vendor classes move into
7
- * `vendors/stt.ts`.
5
+ * Preview routing stays here while provider implementations can graduate to
6
+ * the production vendor modules independently.
8
7
  */
9
8
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.GeminiSTTModels = exports.GeminiSTT = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = void 0;
9
+ exports.OpenAIGPTLive = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = void 0;
10
+ var stt_js_1 = require("../vendors/stt.js");
11
+ Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return stt_js_1.GeminiSTT; } });
12
+ Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return stt_js_1.GeminiSTTModels; } });
13
+ Object.defineProperty(exports, "GeminiTranscriptionMode", { enumerable: true, get: function () { return stt_js_1.GeminiTranscriptionMode; } });
11
14
  var client_js_1 = require("./client.js");
12
15
  Object.defineProperty(exports, "createPreviewRoute", { enumerable: true, get: function () { return client_js_1.createPreviewRoute; } });
13
16
  Object.defineProperty(exports, "PREVIEW_API_BASE_URL", { enumerable: true, get: function () { return client_js_1.PREVIEW_API_BASE_URL; } });
@@ -16,5 +19,4 @@ Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: funct
16
19
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
17
20
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
18
21
  var vendors_js_1 = require("./vendors.js");
19
- Object.defineProperty(exports, "GeminiSTT", { enumerable: true, get: function () { return vendors_js_1.GeminiSTT; } });
20
- Object.defineProperty(exports, "GeminiSTTModels", { enumerable: true, get: function () { return vendors_js_1.GeminiSTTModels; } });
22
+ Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return vendors_js_1.OpenAIGPTLive; } });
@@ -2,71 +2,73 @@
2
2
  * Preview provider vendor classes.
3
3
  *
4
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 drop
6
- * into `agent.withStt()` unchanged. They only work against the preview
7
- * endpoint; AgentSession routes it automatically.
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
8
  */
9
- import type { SttConfig, TurnDetectionLanguage } from "../types.js";
10
- import type { SampleRate } from "../vendors/base.js";
11
- import { BaseSTT } from "../vendors/base.js";
12
- /** Gemini preview transcription models. */
13
- export declare const GeminiSTTModels: {
14
- readonly Transcribe35Live: "gemini-3.5-transcribe-live";
15
- };
16
- /**
17
- * A Gemini preview transcription model. Known model names autocomplete; any
18
- * string is accepted so a newly published preview model can be used before this
19
- * SDK is updated.
20
- */
21
- export type GeminiSTTModel = (typeof GeminiSTTModels)[keyof typeof GeminiSTTModels] | (string & {});
22
- /** Constructor options for {@link GeminiSTT}. */
23
- export interface GeminiSTTOptions {
24
- /** Google API key. */
9
+ import type { McpServersItem, MllmConfig, MllmTurnDetectionConfig } from "../types.js";
10
+ import { BaseMLLM } from "../vendors/base.js";
11
+ export declare const OPENAI_GPT_LIVE_VENDOR: "openai_gpt_live";
12
+ export declare function isOpenAIGPTLiveConfig(config: unknown): boolean;
13
+ /** GPT Live v3 alpha options. Not for production traffic. */
14
+ export interface OpenAIGPTLiveOptions {
25
15
  apiKey: string;
26
- /** Model name. Defaults to `gemini-3.5-transcribe-live`. */
27
- model?: GeminiSTTModel;
28
- /**
29
- * Languages the model should transcribe, sent as `params.language_codes`.
30
- *
31
- * Omitted from the request when unset, which is how the provider spells
32
- * auto-detect — the SDK does not pin a language the caller never asked for.
33
- * Pass one code to commit to a language, several to let the model choose
34
- * between them, or an explicit empty array to request auto-detect
35
- * outright.
36
- *
37
- * This is the only language setting on this vendor. The top-level
38
- * `asr.language` is supplied by `Agent` from `turnDetection.language`, as
39
- * it is for every STT vendor.
40
- */
41
- languageCodes?: readonly TurnDetectionLanguage[];
42
- /**
43
- * Words and phrases to bias recognition toward — product names, jargon,
44
- * proper nouns the model would otherwise mis-hear.
45
- */
46
- customVocabulary?: readonly string[];
47
- /** Audio sample rate in Hz. Defaults to 16000. */
48
- sampleRate?: SampleRate;
49
- /**
50
- * Emit per-word timestamps in transcription results. Omitted unless
51
- * explicitly set; cannot be `true` when `customVocabulary` is set.
52
- */
53
- wordTimestamp?: boolean;
54
- /** Additional vendor-specific parameters. */
55
- additionalParams?: Record<string, unknown>;
16
+ /** Full WebSocket URL, used verbatim except OpenAI's legacy /v1/live route. */
17
+ url?: string;
18
+ /** @deprecated Use prompt. Serialized as prompt; an explicit prompt wins. */
19
+ instructions?: string;
20
+ greeting?: string;
21
+ failureMessage?: string;
22
+ inputModalities?: string[];
23
+ outputModalities?: string[];
24
+ messages?: Record<string, unknown>[];
25
+ /** MCP servers exposed to GPT Live. Requires Agent.withTools(). */
26
+ mcpServers?: McpServersItem[];
27
+ /** Additional provider fields; explicit options take precedence. */
28
+ params?: Record<string, unknown>;
29
+ /** @deprecated Unsupported in v3; setting this raises an error. */
30
+ inputAudioTranscription?: Record<string, unknown>;
31
+ /** @deprecated Ignored with a warning; v3 performs endpointing internally. */
32
+ turnDetection?: MllmTurnDetectionConfig;
33
+ /** Defaults to gpt-live-1. */
34
+ model?: string;
35
+ /** Output voice; provider default marin. Custom voice objects require PR #1522; use params after rollout. */
36
+ voice?: string;
37
+ /** Session instructions. */
38
+ prompt?: string;
39
+ /** Host when url is omitted; default wss://api.openai.com. */
40
+ baseUrl?: string;
41
+ /** WebSocket path; default /v1/live/sessions. */
42
+ path?: string;
43
+ /** Optional OpenAI-Alpha selector for preview contracts. Omitted by default. */
44
+ alphaSelector?: string;
45
+ /** Extra provider request headers as a JSON string; protocol headers win. */
46
+ headers?: string;
47
+ /** Assistant silence boundary in ms; provider default 600. Zero disables inference. */
48
+ outputIdleEndMs?: number;
49
+ /** Caller silence boundary in ms; provider default 1500. */
50
+ inputIdleEndMs?: number;
51
+ /** Speech amplitude threshold on the 16-bit scale; provider default 50. */
52
+ outputSilencePeak?: number;
53
+ /** Graph PCM sample rate; provider default 24000. */
54
+ outputSampleRate?: number;
55
+ /** Initial audio cushion; provider default 0. Negative disables pacing. */
56
+ outputBufferMs?: number;
57
+ /** Mic append batching in ms. Join default 0; extension class default 100. */
58
+ inputBatchMs?: number;
59
+ /** Advertise graph tools; provider default false. Does not control delegate built-ins. */
60
+ toolEnabled?: boolean;
61
+ /** Tool delegation mode; provider default responses. Fixed for the session. */
62
+ delegation?: "client" | "responses";
63
+ /** Tool delegate model; provider default gpt-5.6-sol. */
64
+ responsesModel?: string;
65
+ /** Interrupt playback on caller speech; provider default false. */
66
+ interruptOnUserTurn?: boolean;
67
+ /** Unmodelled v3 session fields. Cannot override model, delegation, audio, instructions or input. */
68
+ sessionParams?: Record<string, unknown>;
56
69
  }
57
- /**
58
- * Gemini 3.5 Transcribe ASR vendor (preview).
59
- *
60
- * @example
61
- * ```typescript
62
- * const agent = new Agent({ client }).withStt(new GeminiSTT({
63
- * apiKey: process.env.GOOGLE_API_KEY!,
64
- * languageCodes: ['en-US'],
65
- * }));
66
- * ```
67
- */
68
- export declare class GeminiSTT extends BaseSTT {
70
+ export declare class OpenAIGPTLive extends BaseMLLM {
69
71
  private readonly options;
70
- constructor(options: GeminiSTTOptions);
71
- toConfig(): SttConfig;
72
+ constructor(options: OpenAIGPTLiveOptions);
73
+ toConfig(): MllmConfig;
72
74
  }