@letta-ai/letta-client 1.7.8 → 1.7.9
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.
- package/CHANGELOG.md +36 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js +10 -3
- package/client.js.map +1 -1
- package/client.mjs +10 -3
- package/client.mjs.map +1 -1
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +48 -42
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +48 -42
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/messages.d.mts +271 -19
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +271 -19
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/conversations/conversations.d.mts +607 -6
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +607 -6
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js +13 -2
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs +13 -2
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/index.d.mts +1 -1
- package/resources/conversations/index.d.mts.map +1 -1
- package/resources/conversations/index.d.ts +1 -1
- package/resources/conversations/index.d.ts.map +1 -1
- package/resources/conversations/index.js.map +1 -1
- package/resources/conversations/index.mjs.map +1 -1
- package/resources/conversations/messages.d.mts +62 -29
- package/resources/conversations/messages.d.mts.map +1 -1
- package/resources/conversations/messages.d.ts +62 -29
- package/resources/conversations/messages.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/models/models.d.mts +40 -6
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +40 -6
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/runs/runs.d.mts +1 -1
- package/resources/runs/runs.d.mts.map +1 -1
- package/resources/runs/runs.d.ts +1 -1
- package/resources/runs/runs.d.ts.map +1 -1
- package/resources/runs/runs.js.map +1 -1
- package/resources/runs/runs.mjs.map +1 -1
- package/resources/templates/index.d.mts +1 -1
- package/resources/templates/index.d.mts.map +1 -1
- package/resources/templates/index.d.ts +1 -1
- package/resources/templates/index.d.ts.map +1 -1
- package/resources/templates/index.js.map +1 -1
- package/resources/templates/index.mjs.map +1 -1
- package/resources/templates/templates.d.mts +77 -1
- package/resources/templates/templates.d.mts.map +1 -1
- package/resources/templates/templates.d.ts +77 -1
- package/resources/templates/templates.d.ts.map +1 -1
- package/resources/templates/templates.js +14 -0
- package/resources/templates/templates.js.map +1 -1
- package/resources/templates/templates.mjs +14 -0
- package/resources/templates/templates.mjs.map +1 -1
- package/src/client.ts +27 -5
- package/src/core/streaming.ts +2 -2
- package/src/resources/agents/agents.ts +53 -45
- package/src/resources/agents/messages.ts +322 -20
- package/src/resources/conversations/conversations.ts +831 -5
- package/src/resources/conversations/index.ts +1 -0
- package/src/resources/conversations/messages.ts +71 -31
- package/src/resources/index.ts +5 -0
- package/src/resources/models/models.ts +46 -6
- package/src/resources/runs/runs.ts +1 -0
- package/src/resources/templates/index.ts +4 -0
- package/src/resources/templates/templates.ts +111 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AgentsAPI from '../agents/agents';
|
|
4
5
|
import * as MessagesAPI from './messages';
|
|
5
6
|
import {
|
|
6
7
|
CompactionRequest,
|
|
@@ -46,12 +47,27 @@ export class Conversations extends APIResource {
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
|
-
* List all conversations for an agent
|
|
50
|
+
* List all conversations for an agent (or all conversations if agent_id not
|
|
51
|
+
* provided).
|
|
50
52
|
*/
|
|
51
|
-
list(
|
|
53
|
+
list(
|
|
54
|
+
query: ConversationListParams | null | undefined = {},
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<ConversationListResponse> {
|
|
52
57
|
return this._client.get('/v1/conversations/', { query, ...options });
|
|
53
58
|
}
|
|
54
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Delete a conversation (soft delete).
|
|
62
|
+
*
|
|
63
|
+
* This marks the conversation as deleted but does not permanently remove it from
|
|
64
|
+
* the database. The conversation will no longer appear in list operations. Any
|
|
65
|
+
* isolated blocks associated with the conversation will be permanently deleted.
|
|
66
|
+
*/
|
|
67
|
+
delete(conversationID: string, options?: RequestOptions): APIPromise<unknown> {
|
|
68
|
+
return this._client.delete(path`/v1/conversations/${conversationID}`, options);
|
|
69
|
+
}
|
|
70
|
+
|
|
55
71
|
/**
|
|
56
72
|
* Cancel runs associated with a conversation.
|
|
57
73
|
*
|
|
@@ -102,6 +118,31 @@ export interface Conversation {
|
|
|
102
118
|
*/
|
|
103
119
|
last_updated_by_id?: string | null;
|
|
104
120
|
|
|
121
|
+
/**
|
|
122
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
123
|
+
* provider/model-name.
|
|
124
|
+
*/
|
|
125
|
+
model?: string | null;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
129
|
+
*/
|
|
130
|
+
model_settings?:
|
|
131
|
+
| AgentsAPI.OpenAIModelSettings
|
|
132
|
+
| AgentsAPI.AnthropicModelSettings
|
|
133
|
+
| AgentsAPI.GoogleAIModelSettings
|
|
134
|
+
| AgentsAPI.GoogleVertexModelSettings
|
|
135
|
+
| AgentsAPI.AzureModelSettings
|
|
136
|
+
| AgentsAPI.XaiModelSettings
|
|
137
|
+
| Conversation.ZaiModelSettings
|
|
138
|
+
| AgentsAPI.GroqModelSettings
|
|
139
|
+
| AgentsAPI.DeepseekModelSettings
|
|
140
|
+
| AgentsAPI.TogetherModelSettings
|
|
141
|
+
| AgentsAPI.BedrockModelSettings
|
|
142
|
+
| Conversation.OpenRouterModelSettings
|
|
143
|
+
| Conversation.ChatGptoAuthModelSettings
|
|
144
|
+
| null;
|
|
145
|
+
|
|
105
146
|
/**
|
|
106
147
|
* A summary of the conversation.
|
|
107
148
|
*/
|
|
@@ -113,6 +154,140 @@ export interface Conversation {
|
|
|
113
154
|
updated_at?: string | null;
|
|
114
155
|
}
|
|
115
156
|
|
|
157
|
+
export namespace Conversation {
|
|
158
|
+
/**
|
|
159
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
160
|
+
*/
|
|
161
|
+
export interface ZaiModelSettings {
|
|
162
|
+
/**
|
|
163
|
+
* The maximum number of tokens the model can generate.
|
|
164
|
+
*/
|
|
165
|
+
max_output_tokens?: number;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Whether to enable parallel tool calling.
|
|
169
|
+
*/
|
|
170
|
+
parallel_tool_calls?: boolean;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The type of the provider.
|
|
174
|
+
*/
|
|
175
|
+
provider_type?: 'zai';
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The response format for the model.
|
|
179
|
+
*/
|
|
180
|
+
response_format?:
|
|
181
|
+
| AgentsAPI.TextResponseFormat
|
|
182
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
183
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
184
|
+
| null;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The temperature of the model.
|
|
188
|
+
*/
|
|
189
|
+
temperature?: number;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
193
|
+
*/
|
|
194
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export namespace ZaiModelSettings {
|
|
198
|
+
/**
|
|
199
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
200
|
+
*/
|
|
201
|
+
export interface Thinking {
|
|
202
|
+
/**
|
|
203
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
204
|
+
*/
|
|
205
|
+
clear_thinking?: boolean;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Whether thinking is enabled or disabled.
|
|
209
|
+
*/
|
|
210
|
+
type?: 'enabled' | 'disabled';
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
216
|
+
*/
|
|
217
|
+
export interface OpenRouterModelSettings {
|
|
218
|
+
/**
|
|
219
|
+
* The maximum number of tokens the model can generate.
|
|
220
|
+
*/
|
|
221
|
+
max_output_tokens?: number;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Whether to enable parallel tool calling.
|
|
225
|
+
*/
|
|
226
|
+
parallel_tool_calls?: boolean;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The type of the provider.
|
|
230
|
+
*/
|
|
231
|
+
provider_type?: 'openrouter';
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The response format for the model.
|
|
235
|
+
*/
|
|
236
|
+
response_format?:
|
|
237
|
+
| AgentsAPI.TextResponseFormat
|
|
238
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
239
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
240
|
+
| null;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The temperature of the model.
|
|
244
|
+
*/
|
|
245
|
+
temperature?: number;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
250
|
+
*/
|
|
251
|
+
export interface ChatGptoAuthModelSettings {
|
|
252
|
+
/**
|
|
253
|
+
* The maximum number of tokens the model can generate.
|
|
254
|
+
*/
|
|
255
|
+
max_output_tokens?: number;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Whether to enable parallel tool calling.
|
|
259
|
+
*/
|
|
260
|
+
parallel_tool_calls?: boolean;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The type of the provider.
|
|
264
|
+
*/
|
|
265
|
+
provider_type?: 'chatgpt_oauth';
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The reasoning configuration for the model.
|
|
269
|
+
*/
|
|
270
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* The temperature of the model.
|
|
274
|
+
*/
|
|
275
|
+
temperature?: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export namespace ChatGptoAuthModelSettings {
|
|
279
|
+
/**
|
|
280
|
+
* The reasoning configuration for the model.
|
|
281
|
+
*/
|
|
282
|
+
export interface Reasoning {
|
|
283
|
+
/**
|
|
284
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
285
|
+
*/
|
|
286
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
116
291
|
/**
|
|
117
292
|
* Request model for creating a new conversation.
|
|
118
293
|
*/
|
|
@@ -124,24 +299,344 @@ export interface CreateConversation {
|
|
|
124
299
|
*/
|
|
125
300
|
isolated_block_labels?: Array<string> | null;
|
|
126
301
|
|
|
302
|
+
/**
|
|
303
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
304
|
+
* provider/model-name.
|
|
305
|
+
*/
|
|
306
|
+
model?: string | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
310
|
+
*/
|
|
311
|
+
model_settings?:
|
|
312
|
+
| AgentsAPI.OpenAIModelSettings
|
|
313
|
+
| AgentsAPI.AnthropicModelSettings
|
|
314
|
+
| AgentsAPI.GoogleAIModelSettings
|
|
315
|
+
| AgentsAPI.GoogleVertexModelSettings
|
|
316
|
+
| AgentsAPI.AzureModelSettings
|
|
317
|
+
| AgentsAPI.XaiModelSettings
|
|
318
|
+
| CreateConversation.ZaiModelSettings
|
|
319
|
+
| AgentsAPI.GroqModelSettings
|
|
320
|
+
| AgentsAPI.DeepseekModelSettings
|
|
321
|
+
| AgentsAPI.TogetherModelSettings
|
|
322
|
+
| AgentsAPI.BedrockModelSettings
|
|
323
|
+
| CreateConversation.OpenRouterModelSettings
|
|
324
|
+
| CreateConversation.ChatGptoAuthModelSettings
|
|
325
|
+
| null;
|
|
326
|
+
|
|
127
327
|
/**
|
|
128
328
|
* A summary of the conversation.
|
|
129
329
|
*/
|
|
130
330
|
summary?: string | null;
|
|
131
331
|
}
|
|
132
332
|
|
|
333
|
+
export namespace CreateConversation {
|
|
334
|
+
/**
|
|
335
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
336
|
+
*/
|
|
337
|
+
export interface ZaiModelSettings {
|
|
338
|
+
/**
|
|
339
|
+
* The maximum number of tokens the model can generate.
|
|
340
|
+
*/
|
|
341
|
+
max_output_tokens?: number;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Whether to enable parallel tool calling.
|
|
345
|
+
*/
|
|
346
|
+
parallel_tool_calls?: boolean;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* The type of the provider.
|
|
350
|
+
*/
|
|
351
|
+
provider_type?: 'zai';
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* The response format for the model.
|
|
355
|
+
*/
|
|
356
|
+
response_format?:
|
|
357
|
+
| AgentsAPI.TextResponseFormat
|
|
358
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
359
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
360
|
+
| null;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* The temperature of the model.
|
|
364
|
+
*/
|
|
365
|
+
temperature?: number;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
369
|
+
*/
|
|
370
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export namespace ZaiModelSettings {
|
|
374
|
+
/**
|
|
375
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
376
|
+
*/
|
|
377
|
+
export interface Thinking {
|
|
378
|
+
/**
|
|
379
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
380
|
+
*/
|
|
381
|
+
clear_thinking?: boolean;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Whether thinking is enabled or disabled.
|
|
385
|
+
*/
|
|
386
|
+
type?: 'enabled' | 'disabled';
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
392
|
+
*/
|
|
393
|
+
export interface OpenRouterModelSettings {
|
|
394
|
+
/**
|
|
395
|
+
* The maximum number of tokens the model can generate.
|
|
396
|
+
*/
|
|
397
|
+
max_output_tokens?: number;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Whether to enable parallel tool calling.
|
|
401
|
+
*/
|
|
402
|
+
parallel_tool_calls?: boolean;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The type of the provider.
|
|
406
|
+
*/
|
|
407
|
+
provider_type?: 'openrouter';
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* The response format for the model.
|
|
411
|
+
*/
|
|
412
|
+
response_format?:
|
|
413
|
+
| AgentsAPI.TextResponseFormat
|
|
414
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
415
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
416
|
+
| null;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* The temperature of the model.
|
|
420
|
+
*/
|
|
421
|
+
temperature?: number;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
426
|
+
*/
|
|
427
|
+
export interface ChatGptoAuthModelSettings {
|
|
428
|
+
/**
|
|
429
|
+
* The maximum number of tokens the model can generate.
|
|
430
|
+
*/
|
|
431
|
+
max_output_tokens?: number;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Whether to enable parallel tool calling.
|
|
435
|
+
*/
|
|
436
|
+
parallel_tool_calls?: boolean;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* The type of the provider.
|
|
440
|
+
*/
|
|
441
|
+
provider_type?: 'chatgpt_oauth';
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* The reasoning configuration for the model.
|
|
445
|
+
*/
|
|
446
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* The temperature of the model.
|
|
450
|
+
*/
|
|
451
|
+
temperature?: number;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export namespace ChatGptoAuthModelSettings {
|
|
455
|
+
/**
|
|
456
|
+
* The reasoning configuration for the model.
|
|
457
|
+
*/
|
|
458
|
+
export interface Reasoning {
|
|
459
|
+
/**
|
|
460
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
461
|
+
*/
|
|
462
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
133
467
|
/**
|
|
134
468
|
* Request model for updating a conversation.
|
|
135
469
|
*/
|
|
136
470
|
export interface UpdateConversation {
|
|
471
|
+
/**
|
|
472
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
473
|
+
* provider/model-name.
|
|
474
|
+
*/
|
|
475
|
+
model?: string | null;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
479
|
+
*/
|
|
480
|
+
model_settings?:
|
|
481
|
+
| AgentsAPI.OpenAIModelSettings
|
|
482
|
+
| AgentsAPI.AnthropicModelSettings
|
|
483
|
+
| AgentsAPI.GoogleAIModelSettings
|
|
484
|
+
| AgentsAPI.GoogleVertexModelSettings
|
|
485
|
+
| AgentsAPI.AzureModelSettings
|
|
486
|
+
| AgentsAPI.XaiModelSettings
|
|
487
|
+
| UpdateConversation.ZaiModelSettings
|
|
488
|
+
| AgentsAPI.GroqModelSettings
|
|
489
|
+
| AgentsAPI.DeepseekModelSettings
|
|
490
|
+
| AgentsAPI.TogetherModelSettings
|
|
491
|
+
| AgentsAPI.BedrockModelSettings
|
|
492
|
+
| UpdateConversation.OpenRouterModelSettings
|
|
493
|
+
| UpdateConversation.ChatGptoAuthModelSettings
|
|
494
|
+
| null;
|
|
495
|
+
|
|
137
496
|
/**
|
|
138
497
|
* A summary of the conversation.
|
|
139
498
|
*/
|
|
140
499
|
summary?: string | null;
|
|
141
500
|
}
|
|
142
501
|
|
|
502
|
+
export namespace UpdateConversation {
|
|
503
|
+
/**
|
|
504
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
505
|
+
*/
|
|
506
|
+
export interface ZaiModelSettings {
|
|
507
|
+
/**
|
|
508
|
+
* The maximum number of tokens the model can generate.
|
|
509
|
+
*/
|
|
510
|
+
max_output_tokens?: number;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Whether to enable parallel tool calling.
|
|
514
|
+
*/
|
|
515
|
+
parallel_tool_calls?: boolean;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* The type of the provider.
|
|
519
|
+
*/
|
|
520
|
+
provider_type?: 'zai';
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* The response format for the model.
|
|
524
|
+
*/
|
|
525
|
+
response_format?:
|
|
526
|
+
| AgentsAPI.TextResponseFormat
|
|
527
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
528
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
529
|
+
| null;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The temperature of the model.
|
|
533
|
+
*/
|
|
534
|
+
temperature?: number;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
538
|
+
*/
|
|
539
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export namespace ZaiModelSettings {
|
|
543
|
+
/**
|
|
544
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
545
|
+
*/
|
|
546
|
+
export interface Thinking {
|
|
547
|
+
/**
|
|
548
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
549
|
+
*/
|
|
550
|
+
clear_thinking?: boolean;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Whether thinking is enabled or disabled.
|
|
554
|
+
*/
|
|
555
|
+
type?: 'enabled' | 'disabled';
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
561
|
+
*/
|
|
562
|
+
export interface OpenRouterModelSettings {
|
|
563
|
+
/**
|
|
564
|
+
* The maximum number of tokens the model can generate.
|
|
565
|
+
*/
|
|
566
|
+
max_output_tokens?: number;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Whether to enable parallel tool calling.
|
|
570
|
+
*/
|
|
571
|
+
parallel_tool_calls?: boolean;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The type of the provider.
|
|
575
|
+
*/
|
|
576
|
+
provider_type?: 'openrouter';
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The response format for the model.
|
|
580
|
+
*/
|
|
581
|
+
response_format?:
|
|
582
|
+
| AgentsAPI.TextResponseFormat
|
|
583
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
584
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
585
|
+
| null;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The temperature of the model.
|
|
589
|
+
*/
|
|
590
|
+
temperature?: number;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
595
|
+
*/
|
|
596
|
+
export interface ChatGptoAuthModelSettings {
|
|
597
|
+
/**
|
|
598
|
+
* The maximum number of tokens the model can generate.
|
|
599
|
+
*/
|
|
600
|
+
max_output_tokens?: number;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Whether to enable parallel tool calling.
|
|
604
|
+
*/
|
|
605
|
+
parallel_tool_calls?: boolean;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* The type of the provider.
|
|
609
|
+
*/
|
|
610
|
+
provider_type?: 'chatgpt_oauth';
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* The reasoning configuration for the model.
|
|
614
|
+
*/
|
|
615
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* The temperature of the model.
|
|
619
|
+
*/
|
|
620
|
+
temperature?: number;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export namespace ChatGptoAuthModelSettings {
|
|
624
|
+
/**
|
|
625
|
+
* The reasoning configuration for the model.
|
|
626
|
+
*/
|
|
627
|
+
export interface Reasoning {
|
|
628
|
+
/**
|
|
629
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
630
|
+
*/
|
|
631
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
|
|
143
636
|
export type ConversationListResponse = Array<Conversation>;
|
|
144
637
|
|
|
638
|
+
export type ConversationDeleteResponse = unknown;
|
|
639
|
+
|
|
145
640
|
export type ConversationCancelResponse = { [key: string]: unknown };
|
|
146
641
|
|
|
147
642
|
export interface ConversationCreateParams {
|
|
@@ -157,35 +652,365 @@ export interface ConversationCreateParams {
|
|
|
157
652
|
*/
|
|
158
653
|
isolated_block_labels?: Array<string> | null;
|
|
159
654
|
|
|
655
|
+
/**
|
|
656
|
+
* Body param: The model handle for this conversation (overrides agent's model).
|
|
657
|
+
* Format: provider/model-name.
|
|
658
|
+
*/
|
|
659
|
+
model?: string | null;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Body param: The model settings for this conversation (overrides agent's model
|
|
663
|
+
* settings).
|
|
664
|
+
*/
|
|
665
|
+
model_settings?:
|
|
666
|
+
| AgentsAPI.OpenAIModelSettings
|
|
667
|
+
| AgentsAPI.AnthropicModelSettings
|
|
668
|
+
| AgentsAPI.GoogleAIModelSettings
|
|
669
|
+
| AgentsAPI.GoogleVertexModelSettings
|
|
670
|
+
| AgentsAPI.AzureModelSettings
|
|
671
|
+
| AgentsAPI.XaiModelSettings
|
|
672
|
+
| ConversationCreateParams.ZaiModelSettings
|
|
673
|
+
| AgentsAPI.GroqModelSettings
|
|
674
|
+
| AgentsAPI.DeepseekModelSettings
|
|
675
|
+
| AgentsAPI.TogetherModelSettings
|
|
676
|
+
| AgentsAPI.BedrockModelSettings
|
|
677
|
+
| ConversationCreateParams.OpenRouterModelSettings
|
|
678
|
+
| ConversationCreateParams.ChatGptoAuthModelSettings
|
|
679
|
+
| null;
|
|
680
|
+
|
|
160
681
|
/**
|
|
161
682
|
* Body param: A summary of the conversation.
|
|
162
683
|
*/
|
|
163
684
|
summary?: string | null;
|
|
164
685
|
}
|
|
165
686
|
|
|
687
|
+
export namespace ConversationCreateParams {
|
|
688
|
+
/**
|
|
689
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
690
|
+
*/
|
|
691
|
+
export interface ZaiModelSettings {
|
|
692
|
+
/**
|
|
693
|
+
* The maximum number of tokens the model can generate.
|
|
694
|
+
*/
|
|
695
|
+
max_output_tokens?: number;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Whether to enable parallel tool calling.
|
|
699
|
+
*/
|
|
700
|
+
parallel_tool_calls?: boolean;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* The type of the provider.
|
|
704
|
+
*/
|
|
705
|
+
provider_type?: 'zai';
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* The response format for the model.
|
|
709
|
+
*/
|
|
710
|
+
response_format?:
|
|
711
|
+
| AgentsAPI.TextResponseFormat
|
|
712
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
713
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
714
|
+
| null;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* The temperature of the model.
|
|
718
|
+
*/
|
|
719
|
+
temperature?: number;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
723
|
+
*/
|
|
724
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export namespace ZaiModelSettings {
|
|
728
|
+
/**
|
|
729
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
730
|
+
*/
|
|
731
|
+
export interface Thinking {
|
|
732
|
+
/**
|
|
733
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
734
|
+
*/
|
|
735
|
+
clear_thinking?: boolean;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Whether thinking is enabled or disabled.
|
|
739
|
+
*/
|
|
740
|
+
type?: 'enabled' | 'disabled';
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
746
|
+
*/
|
|
747
|
+
export interface OpenRouterModelSettings {
|
|
748
|
+
/**
|
|
749
|
+
* The maximum number of tokens the model can generate.
|
|
750
|
+
*/
|
|
751
|
+
max_output_tokens?: number;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Whether to enable parallel tool calling.
|
|
755
|
+
*/
|
|
756
|
+
parallel_tool_calls?: boolean;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* The type of the provider.
|
|
760
|
+
*/
|
|
761
|
+
provider_type?: 'openrouter';
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* The response format for the model.
|
|
765
|
+
*/
|
|
766
|
+
response_format?:
|
|
767
|
+
| AgentsAPI.TextResponseFormat
|
|
768
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
769
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
770
|
+
| null;
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* The temperature of the model.
|
|
774
|
+
*/
|
|
775
|
+
temperature?: number;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
780
|
+
*/
|
|
781
|
+
export interface ChatGptoAuthModelSettings {
|
|
782
|
+
/**
|
|
783
|
+
* The maximum number of tokens the model can generate.
|
|
784
|
+
*/
|
|
785
|
+
max_output_tokens?: number;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Whether to enable parallel tool calling.
|
|
789
|
+
*/
|
|
790
|
+
parallel_tool_calls?: boolean;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* The type of the provider.
|
|
794
|
+
*/
|
|
795
|
+
provider_type?: 'chatgpt_oauth';
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* The reasoning configuration for the model.
|
|
799
|
+
*/
|
|
800
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* The temperature of the model.
|
|
804
|
+
*/
|
|
805
|
+
temperature?: number;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export namespace ChatGptoAuthModelSettings {
|
|
809
|
+
/**
|
|
810
|
+
* The reasoning configuration for the model.
|
|
811
|
+
*/
|
|
812
|
+
export interface Reasoning {
|
|
813
|
+
/**
|
|
814
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
815
|
+
*/
|
|
816
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
166
821
|
export interface ConversationUpdateParams {
|
|
822
|
+
/**
|
|
823
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
824
|
+
* provider/model-name.
|
|
825
|
+
*/
|
|
826
|
+
model?: string | null;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
830
|
+
*/
|
|
831
|
+
model_settings?:
|
|
832
|
+
| AgentsAPI.OpenAIModelSettings
|
|
833
|
+
| AgentsAPI.AnthropicModelSettings
|
|
834
|
+
| AgentsAPI.GoogleAIModelSettings
|
|
835
|
+
| AgentsAPI.GoogleVertexModelSettings
|
|
836
|
+
| AgentsAPI.AzureModelSettings
|
|
837
|
+
| AgentsAPI.XaiModelSettings
|
|
838
|
+
| ConversationUpdateParams.ZaiModelSettings
|
|
839
|
+
| AgentsAPI.GroqModelSettings
|
|
840
|
+
| AgentsAPI.DeepseekModelSettings
|
|
841
|
+
| AgentsAPI.TogetherModelSettings
|
|
842
|
+
| AgentsAPI.BedrockModelSettings
|
|
843
|
+
| ConversationUpdateParams.OpenRouterModelSettings
|
|
844
|
+
| ConversationUpdateParams.ChatGptoAuthModelSettings
|
|
845
|
+
| null;
|
|
846
|
+
|
|
167
847
|
/**
|
|
168
848
|
* A summary of the conversation.
|
|
169
849
|
*/
|
|
170
850
|
summary?: string | null;
|
|
171
851
|
}
|
|
172
852
|
|
|
173
|
-
export
|
|
853
|
+
export namespace ConversationUpdateParams {
|
|
174
854
|
/**
|
|
175
|
-
*
|
|
855
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
176
856
|
*/
|
|
177
|
-
|
|
857
|
+
export interface ZaiModelSettings {
|
|
858
|
+
/**
|
|
859
|
+
* The maximum number of tokens the model can generate.
|
|
860
|
+
*/
|
|
861
|
+
max_output_tokens?: number;
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Whether to enable parallel tool calling.
|
|
865
|
+
*/
|
|
866
|
+
parallel_tool_calls?: boolean;
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* The type of the provider.
|
|
870
|
+
*/
|
|
871
|
+
provider_type?: 'zai';
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* The response format for the model.
|
|
875
|
+
*/
|
|
876
|
+
response_format?:
|
|
877
|
+
| AgentsAPI.TextResponseFormat
|
|
878
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
879
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
880
|
+
| null;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* The temperature of the model.
|
|
884
|
+
*/
|
|
885
|
+
temperature?: number;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
889
|
+
*/
|
|
890
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
export namespace ZaiModelSettings {
|
|
894
|
+
/**
|
|
895
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
896
|
+
*/
|
|
897
|
+
export interface Thinking {
|
|
898
|
+
/**
|
|
899
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
900
|
+
*/
|
|
901
|
+
clear_thinking?: boolean;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Whether thinking is enabled or disabled.
|
|
905
|
+
*/
|
|
906
|
+
type?: 'enabled' | 'disabled';
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
912
|
+
*/
|
|
913
|
+
export interface OpenRouterModelSettings {
|
|
914
|
+
/**
|
|
915
|
+
* The maximum number of tokens the model can generate.
|
|
916
|
+
*/
|
|
917
|
+
max_output_tokens?: number;
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Whether to enable parallel tool calling.
|
|
921
|
+
*/
|
|
922
|
+
parallel_tool_calls?: boolean;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* The type of the provider.
|
|
926
|
+
*/
|
|
927
|
+
provider_type?: 'openrouter';
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* The response format for the model.
|
|
931
|
+
*/
|
|
932
|
+
response_format?:
|
|
933
|
+
| AgentsAPI.TextResponseFormat
|
|
934
|
+
| AgentsAPI.JsonSchemaResponseFormat
|
|
935
|
+
| AgentsAPI.JsonObjectResponseFormat
|
|
936
|
+
| null;
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* The temperature of the model.
|
|
940
|
+
*/
|
|
941
|
+
temperature?: number;
|
|
942
|
+
}
|
|
178
943
|
|
|
944
|
+
/**
|
|
945
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
946
|
+
*/
|
|
947
|
+
export interface ChatGptoAuthModelSettings {
|
|
948
|
+
/**
|
|
949
|
+
* The maximum number of tokens the model can generate.
|
|
950
|
+
*/
|
|
951
|
+
max_output_tokens?: number;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Whether to enable parallel tool calling.
|
|
955
|
+
*/
|
|
956
|
+
parallel_tool_calls?: boolean;
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* The type of the provider.
|
|
960
|
+
*/
|
|
961
|
+
provider_type?: 'chatgpt_oauth';
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* The reasoning configuration for the model.
|
|
965
|
+
*/
|
|
966
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* The temperature of the model.
|
|
970
|
+
*/
|
|
971
|
+
temperature?: number;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
export namespace ChatGptoAuthModelSettings {
|
|
975
|
+
/**
|
|
976
|
+
* The reasoning configuration for the model.
|
|
977
|
+
*/
|
|
978
|
+
export interface Reasoning {
|
|
979
|
+
/**
|
|
980
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
981
|
+
*/
|
|
982
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
export interface ConversationListParams {
|
|
179
988
|
/**
|
|
180
989
|
* Cursor for pagination (conversation ID)
|
|
181
990
|
*/
|
|
182
991
|
after?: string | null;
|
|
183
992
|
|
|
993
|
+
/**
|
|
994
|
+
* The agent ID to list conversations for (optional - returns all conversations if
|
|
995
|
+
* not provided)
|
|
996
|
+
*/
|
|
997
|
+
agent_id?: string | null;
|
|
998
|
+
|
|
184
999
|
/**
|
|
185
1000
|
* Maximum number of conversations to return
|
|
186
1001
|
*/
|
|
187
1002
|
limit?: number;
|
|
188
1003
|
|
|
1004
|
+
/**
|
|
1005
|
+
* Sort order for conversations. 'asc' for oldest first, 'desc' for newest first
|
|
1006
|
+
*/
|
|
1007
|
+
order?: 'asc' | 'desc';
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Field to sort by
|
|
1011
|
+
*/
|
|
1012
|
+
order_by?: 'created_at' | 'last_run_completion';
|
|
1013
|
+
|
|
189
1014
|
/**
|
|
190
1015
|
* Search for text within conversation summaries
|
|
191
1016
|
*/
|
|
@@ -200,6 +1025,7 @@ export declare namespace Conversations {
|
|
|
200
1025
|
type CreateConversation as CreateConversation,
|
|
201
1026
|
type UpdateConversation as UpdateConversation,
|
|
202
1027
|
type ConversationListResponse as ConversationListResponse,
|
|
1028
|
+
type ConversationDeleteResponse as ConversationDeleteResponse,
|
|
203
1029
|
type ConversationCancelResponse as ConversationCancelResponse,
|
|
204
1030
|
type ConversationCreateParams as ConversationCreateParams,
|
|
205
1031
|
type ConversationUpdateParams as ConversationUpdateParams,
|