retell-sdk 4.56.0 → 4.58.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.
@@ -172,6 +172,11 @@ export interface ConversationFlowResponse {
172
172
  */
173
173
  global_prompt?: string | null;
174
174
 
175
+ /**
176
+ * Whether this conversation flow is used for transfer LLM.
177
+ */
178
+ is_transfer_llm?: boolean | null;
179
+
175
180
  /**
176
181
  * Knowledge base configuration for RAG retrieval.
177
182
  */
@@ -7539,6 +7544,11 @@ export interface ConversationFlowCreateParams {
7539
7544
  */
7540
7545
  global_prompt?: string | null;
7541
7546
 
7547
+ /**
7548
+ * Whether this conversation flow is used for transfer LLM.
7549
+ */
7550
+ is_transfer_llm?: boolean | null;
7551
+
7542
7552
  /**
7543
7553
  * Knowledge base configuration for RAG retrieval.
7544
7554
  */
@@ -14859,6 +14869,11 @@ export interface ConversationFlowUpdateParams {
14859
14869
  */
14860
14870
  global_prompt?: string | null;
14861
14871
 
14872
+ /**
14873
+ * Body param: Whether this conversation flow is used for transfer LLM.
14874
+ */
14875
+ is_transfer_llm?: boolean | null;
14876
+
14862
14877
  /**
14863
14878
  * Body param: Knowledge base configuration for RAG retrieval.
14864
14879
  */
@@ -72,4 +72,5 @@ export {
72
72
  type PhoneNumberUpdateParams,
73
73
  type PhoneNumberImportParams,
74
74
  } from './phone-number';
75
+ export { Tests, type BatchTestResponse, type TestCreateBatchTestParams } from './tests';
75
76
  export { Voice, type VoiceResponse, type VoiceListResponse } from './voice';
@@ -11,9 +11,7 @@ export class Llm extends APIResource {
11
11
  *
12
12
  * @example
13
13
  * ```ts
14
- * const llmResponse = await client.llm.create({
15
- * start_speaker: 'user',
16
- * });
14
+ * const llmResponse = await client.llm.create();
17
15
  * ```
18
16
  */
19
17
  create(body: LlmCreateParams, options?: Core.RequestOptions): Core.APIPromise<LlmResponse> {
@@ -55,7 +53,6 @@ export class Llm extends APIResource {
55
53
  * const llmResponse = await client.llm.update(
56
54
  * '16b980523634a6dc504898cda492e939',
57
55
  * {
58
- * start_speaker: 'user',
59
56
  * begin_message:
60
57
  * 'Hey I am a virtual assistant calling from Retell Hospital.',
61
58
  * },
@@ -123,12 +120,6 @@ export interface LlmResponse {
123
120
  */
124
121
  llm_id: string;
125
122
 
126
- /**
127
- * The speaker who starts the conversation. Required. Must be either 'user' or
128
- * 'agent'.
129
- */
130
- start_speaker: 'user' | 'agent';
131
-
132
123
  /**
133
124
  * If set, the AI will begin the conversation after waiting for the user for the
134
125
  * duration (in milliseconds) specified by this attribute. This only applies if the
@@ -192,11 +183,15 @@ export interface LlmResponse {
192
183
  kb_config?: LlmResponse.KBConfig | null;
193
184
 
194
185
  /**
195
- * A list of knowledge base ids to use for this resource. Set to null to remove all
196
- * knowledge bases.
186
+ * A list of knowledge base ids to use for this resource.
197
187
  */
198
188
  knowledge_base_ids?: Array<string> | null;
199
189
 
190
+ /**
191
+ * A list of MCPs to use for this LLM.
192
+ */
193
+ mcps?: Array<LlmResponse.Mcp> | null;
194
+
200
195
  /**
201
196
  * Select the underlying text LLM. If not set, would default to gpt-4.1.
202
197
  */
@@ -238,6 +233,12 @@ export interface LlmResponse {
238
233
  */
239
234
  s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | null;
240
235
 
236
+ /**
237
+ * The speaker who starts the conversation. Required. Must be either 'user' or
238
+ * 'agent'.
239
+ */
240
+ start_speaker?: 'user' | 'agent';
241
+
241
242
  /**
242
243
  * Name of the starting state. Required if states is not empty.
243
244
  */
@@ -261,9 +262,9 @@ export interface LlmResponse {
261
262
  tool_call_strict_mode?: boolean;
262
263
 
263
264
  /**
264
- * Version of the Retell LLM.
265
+ * The version of the LLM.
265
266
  */
266
- version?: unknown;
267
+ version?: number | null;
267
268
  }
268
269
 
269
270
  export namespace LlmResponse {
@@ -949,6 +950,31 @@ export namespace LlmResponse {
949
950
  top_k?: number;
950
951
  }
951
952
 
953
+ export interface Mcp {
954
+ name: string;
955
+
956
+ /**
957
+ * The URL of the MCP server.
958
+ */
959
+ url: string;
960
+
961
+ /**
962
+ * Headers to add to the MCP connection request.
963
+ */
964
+ headers?: { [key: string]: string };
965
+
966
+ /**
967
+ * Query parameters to append to the MCP connection request URL.
968
+ */
969
+ query_params?: { [key: string]: string };
970
+
971
+ /**
972
+ * Maximum time to wait for a connection to be established (in milliseconds).
973
+ * Default to 120,000 ms (2 minutes).
974
+ */
975
+ timeout_ms?: number;
976
+ }
977
+
952
978
  export interface State {
953
979
  /**
954
980
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -1720,12 +1746,6 @@ export namespace LlmResponse {
1720
1746
  export type LlmListResponse = Array<LlmResponse>;
1721
1747
 
1722
1748
  export interface LlmCreateParams {
1723
- /**
1724
- * The speaker who starts the conversation. Required. Must be either 'user' or
1725
- * 'agent'.
1726
- */
1727
- start_speaker: 'user' | 'agent';
1728
-
1729
1749
  /**
1730
1750
  * If set, the AI will begin the conversation after waiting for the user for the
1731
1751
  * duration (in milliseconds) specified by this attribute. This only applies if the
@@ -1784,11 +1804,15 @@ export interface LlmCreateParams {
1784
1804
  kb_config?: LlmCreateParams.KBConfig | null;
1785
1805
 
1786
1806
  /**
1787
- * A list of knowledge base ids to use for this resource. Set to null to remove all
1788
- * knowledge bases.
1807
+ * A list of knowledge base ids to use for this resource.
1789
1808
  */
1790
1809
  knowledge_base_ids?: Array<string> | null;
1791
1810
 
1811
+ /**
1812
+ * A list of MCPs to use for this LLM.
1813
+ */
1814
+ mcps?: Array<LlmCreateParams.Mcp> | null;
1815
+
1792
1816
  /**
1793
1817
  * Select the underlying text LLM. If not set, would default to gpt-4.1.
1794
1818
  */
@@ -1830,6 +1854,12 @@ export interface LlmCreateParams {
1830
1854
  */
1831
1855
  s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | null;
1832
1856
 
1857
+ /**
1858
+ * The speaker who starts the conversation. Required. Must be either 'user' or
1859
+ * 'agent'.
1860
+ */
1861
+ start_speaker?: 'user' | 'agent';
1862
+
1833
1863
  /**
1834
1864
  * Name of the starting state. Required if states is not empty.
1835
1865
  */
@@ -1853,7 +1883,7 @@ export interface LlmCreateParams {
1853
1883
  tool_call_strict_mode?: boolean;
1854
1884
 
1855
1885
  /**
1856
- * Version of the Retell LLM.
1886
+ * The version of the LLM.
1857
1887
  */
1858
1888
  version?: number | null;
1859
1889
  }
@@ -2541,6 +2571,31 @@ export namespace LlmCreateParams {
2541
2571
  top_k?: number;
2542
2572
  }
2543
2573
 
2574
+ export interface Mcp {
2575
+ name: string;
2576
+
2577
+ /**
2578
+ * The URL of the MCP server.
2579
+ */
2580
+ url: string;
2581
+
2582
+ /**
2583
+ * Headers to add to the MCP connection request.
2584
+ */
2585
+ headers?: { [key: string]: string };
2586
+
2587
+ /**
2588
+ * Query parameters to append to the MCP connection request URL.
2589
+ */
2590
+ query_params?: { [key: string]: string };
2591
+
2592
+ /**
2593
+ * Maximum time to wait for a connection to be established (in milliseconds).
2594
+ * Default to 120,000 ms (2 minutes).
2595
+ */
2596
+ timeout_ms?: number;
2597
+ }
2598
+
2544
2599
  export interface State {
2545
2600
  /**
2546
2601
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -3317,12 +3372,6 @@ export interface LlmRetrieveParams {
3317
3372
  }
3318
3373
 
3319
3374
  export interface LlmUpdateParams {
3320
- /**
3321
- * Body param: The speaker who starts the conversation. Required. Must be either
3322
- * 'user' or 'agent'.
3323
- */
3324
- start_speaker: 'user' | 'agent';
3325
-
3326
3375
  /**
3327
3376
  * Query param: Optional version of the API to use for this request. Default to
3328
3377
  * latest version.
@@ -3390,11 +3439,15 @@ export interface LlmUpdateParams {
3390
3439
  kb_config?: LlmUpdateParams.KBConfig | null;
3391
3440
 
3392
3441
  /**
3393
- * Body param: A list of knowledge base ids to use for this resource. Set to null
3394
- * to remove all knowledge bases.
3442
+ * Body param: A list of knowledge base ids to use for this resource.
3395
3443
  */
3396
3444
  knowledge_base_ids?: Array<string> | null;
3397
3445
 
3446
+ /**
3447
+ * Body param: A list of MCPs to use for this LLM.
3448
+ */
3449
+ mcps?: Array<LlmUpdateParams.Mcp> | null;
3450
+
3398
3451
  /**
3399
3452
  * Body param: Select the underlying text LLM. If not set, would default to
3400
3453
  * gpt-4.1.
@@ -3437,6 +3490,12 @@ export interface LlmUpdateParams {
3437
3490
  */
3438
3491
  s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | null;
3439
3492
 
3493
+ /**
3494
+ * Body param: The speaker who starts the conversation. Required. Must be either
3495
+ * 'user' or 'agent'.
3496
+ */
3497
+ start_speaker?: 'user' | 'agent';
3498
+
3440
3499
  /**
3441
3500
  * Body param: Name of the starting state. Required if states is not empty.
3442
3501
  */
@@ -3460,7 +3519,7 @@ export interface LlmUpdateParams {
3460
3519
  tool_call_strict_mode?: boolean;
3461
3520
 
3462
3521
  /**
3463
- * Body param: Version of the Retell LLM.
3522
+ * Body param: The version of the LLM.
3464
3523
  */
3465
3524
  body_version?: number | null;
3466
3525
  }
@@ -4148,6 +4207,31 @@ export namespace LlmUpdateParams {
4148
4207
  top_k?: number;
4149
4208
  }
4150
4209
 
4210
+ export interface Mcp {
4211
+ name: string;
4212
+
4213
+ /**
4214
+ * The URL of the MCP server.
4215
+ */
4216
+ url: string;
4217
+
4218
+ /**
4219
+ * Headers to add to the MCP connection request.
4220
+ */
4221
+ headers?: { [key: string]: string };
4222
+
4223
+ /**
4224
+ * Query parameters to append to the MCP connection request URL.
4225
+ */
4226
+ query_params?: { [key: string]: string };
4227
+
4228
+ /**
4229
+ * Maximum time to wait for a connection to be established (in milliseconds).
4230
+ * Default to 120,000 ms (2 minutes).
4231
+ */
4232
+ timeout_ms?: number;
4233
+ }
4234
+
4151
4235
  export interface State {
4152
4236
  /**
4153
4237
  * Name of the state, must be unique for each state. Must be consisted of a-z, A-Z,
@@ -0,0 +1,168 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import * as Core from '../core';
5
+
6
+ export class Tests extends APIResource {
7
+ /**
8
+ * Create a batch test to run multiple test cases
9
+ */
10
+ createBatchTest(
11
+ body: TestCreateBatchTestParams,
12
+ options?: Core.RequestOptions,
13
+ ): Core.APIPromise<BatchTestResponse> {
14
+ return this._client.post('/create-batch-test', { body, ...options });
15
+ }
16
+ }
17
+
18
+ export interface BatchTestResponse {
19
+ /**
20
+ * Timestamp when the batch job was created (milliseconds since epoch)
21
+ */
22
+ creation_timestamp: number;
23
+
24
+ /**
25
+ * Number of test cases that encountered errors
26
+ */
27
+ error_count: number;
28
+
29
+ /**
30
+ * Number of test cases that failed
31
+ */
32
+ fail_count: number;
33
+
34
+ /**
35
+ * Number of test cases that passed
36
+ */
37
+ pass_count: number;
38
+
39
+ response_engine:
40
+ | BatchTestResponse.ResponseEngineRetellLm
41
+ | BatchTestResponse.ResponseEngineCustomLm
42
+ | BatchTestResponse.ResponseEngineConversationFlow;
43
+
44
+ /**
45
+ * Status of the batch job
46
+ */
47
+ status: 'in_progress' | 'complete';
48
+
49
+ /**
50
+ * Unique identifier for the test case batch job
51
+ */
52
+ test_case_batch_job_id: string;
53
+
54
+ /**
55
+ * Total number of test cases in the batch
56
+ */
57
+ total_count: number;
58
+
59
+ /**
60
+ * Timestamp when the batch job was last modified (milliseconds since epoch)
61
+ */
62
+ user_modified_timestamp: number;
63
+ }
64
+
65
+ export namespace BatchTestResponse {
66
+ export interface ResponseEngineRetellLm {
67
+ /**
68
+ * id of the Retell LLM Response Engine.
69
+ */
70
+ llm_id: string;
71
+
72
+ /**
73
+ * type of the Response Engine.
74
+ */
75
+ type: 'retell-llm';
76
+
77
+ /**
78
+ * Version of the Retell LLM Response Engine.
79
+ */
80
+ version?: number | null;
81
+ }
82
+
83
+ export interface ResponseEngineCustomLm {
84
+ /**
85
+ * LLM websocket url of the custom LLM.
86
+ */
87
+ llm_websocket_url: string;
88
+
89
+ /**
90
+ * type of the Response Engine.
91
+ */
92
+ type: 'custom-llm';
93
+ }
94
+
95
+ export interface ResponseEngineConversationFlow {
96
+ /**
97
+ * ID of the Conversation Flow Response Engine.
98
+ */
99
+ conversation_flow_id: string;
100
+
101
+ /**
102
+ * type of the Response Engine.
103
+ */
104
+ type: 'conversation-flow';
105
+
106
+ /**
107
+ * Version of the Conversation Flow Response Engine.
108
+ */
109
+ version?: number | null;
110
+ }
111
+ }
112
+
113
+ export interface TestCreateBatchTestParams {
114
+ /**
115
+ * Response engine to use for the test cases. Custom LLM is not supported.
116
+ */
117
+ response_engine:
118
+ | TestCreateBatchTestParams.ResponseEngineRetellLm
119
+ | TestCreateBatchTestParams.ResponseEngineConversationFlow;
120
+
121
+ /**
122
+ * Array of test case definition IDs to run
123
+ */
124
+ test_case_definition_ids: Array<string>;
125
+ }
126
+
127
+ export namespace TestCreateBatchTestParams {
128
+ export interface ResponseEngineRetellLm {
129
+ /**
130
+ * id of the Retell LLM Response Engine.
131
+ */
132
+ llm_id: string;
133
+
134
+ /**
135
+ * type of the Response Engine.
136
+ */
137
+ type: 'retell-llm';
138
+
139
+ /**
140
+ * Version of the Retell LLM Response Engine.
141
+ */
142
+ version?: number | null;
143
+ }
144
+
145
+ export interface ResponseEngineConversationFlow {
146
+ /**
147
+ * ID of the Conversation Flow Response Engine.
148
+ */
149
+ conversation_flow_id: string;
150
+
151
+ /**
152
+ * type of the Response Engine.
153
+ */
154
+ type: 'conversation-flow';
155
+
156
+ /**
157
+ * Version of the Conversation Flow Response Engine.
158
+ */
159
+ version?: number | null;
160
+ }
161
+ }
162
+
163
+ export declare namespace Tests {
164
+ export {
165
+ type BatchTestResponse as BatchTestResponse,
166
+ type TestCreateBatchTestParams as TestCreateBatchTestParams,
167
+ };
168
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '4.56.0'; // x-release-please-version
1
+ export const VERSION = '4.58.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.56.0";
1
+ export declare const VERSION = "4.58.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '4.56.0'; // x-release-please-version
4
+ exports.VERSION = '4.58.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '4.56.0'; // x-release-please-version
1
+ export const VERSION = '4.58.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map