@opencode/ai 0.0.0-beta-19500 → 0.0.0-dev-19274

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 (114) hide show
  1. package/README.md +0 -200
  2. package/dist/protocols/anthropic-messages.d.ts +1 -24
  3. package/dist/protocols/anthropic-messages.js +12 -58
  4. package/dist/protocols/meta-messages.d.ts +0 -6
  5. package/dist/protocols/open-responses-channel.d.ts +0 -2
  6. package/dist/protocols/open-responses-channel.js +2 -2
  7. package/dist/protocols/open-responses-continuation.d.ts +3 -7
  8. package/dist/protocols/open-responses-continuation.js +7 -16
  9. package/dist/protocols/open-responses.d.ts +9 -141
  10. package/dist/protocols/open-responses.js +7 -29
  11. package/dist/provider-package.d.ts +0 -4
  12. package/dist/providers/amazon-bedrock-mantle.d.ts +62 -4
  13. package/dist/providers/amazon-bedrock-mantle.js +20 -23
  14. package/dist/providers/amazon-bedrock.js +3 -3
  15. package/dist/providers/anthropic-compatible.d.ts +2 -7
  16. package/dist/providers/anthropic-compatible.js +12 -18
  17. package/dist/providers/anthropic.d.ts +2 -7
  18. package/dist/providers/anthropic.js +9 -12
  19. package/dist/providers/azure.d.ts +2 -1
  20. package/dist/providers/azure.js +14 -14
  21. package/dist/providers/baseten.d.ts +3 -2
  22. package/dist/providers/baseten.js +6 -6
  23. package/dist/providers/cerebras.d.ts +3 -2
  24. package/dist/providers/cerebras.js +6 -6
  25. package/dist/providers/cloudflare-ai-gateway.d.ts +2 -1
  26. package/dist/providers/cloudflare-ai-gateway.js +10 -16
  27. package/dist/providers/cloudflare-workers-ai.d.ts +2 -1
  28. package/dist/providers/cloudflare-workers-ai.js +9 -15
  29. package/dist/providers/deepinfra.d.ts +3 -2
  30. package/dist/providers/deepinfra.js +6 -6
  31. package/dist/providers/deepseek.d.ts +3 -2
  32. package/dist/providers/deepseek.js +6 -6
  33. package/dist/providers/fireworks.d.ts +3 -2
  34. package/dist/providers/fireworks.js +6 -6
  35. package/dist/providers/google-vertex-chat.d.ts +3 -2
  36. package/dist/providers/google-vertex-chat.js +12 -12
  37. package/dist/providers/google-vertex-messages.d.ts +3 -8
  38. package/dist/providers/google-vertex-messages.js +12 -12
  39. package/dist/providers/google-vertex-responses.d.ts +3 -2
  40. package/dist/providers/google-vertex-responses.js +12 -12
  41. package/dist/providers/google-vertex-shared.js +3 -14
  42. package/dist/providers/google-vertex.d.ts +2 -1
  43. package/dist/providers/google-vertex.js +12 -18
  44. package/dist/providers/google.d.ts +3 -2
  45. package/dist/providers/google.js +6 -6
  46. package/dist/providers/groq.d.ts +3 -2
  47. package/dist/providers/groq.js +6 -6
  48. package/dist/providers/index.d.ts +0 -3
  49. package/dist/providers/index.js +0 -3
  50. package/dist/providers/meta.d.ts +3 -8
  51. package/dist/providers/meta.js +6 -6
  52. package/dist/providers/minimax/chat.js +6 -6
  53. package/dist/providers/minimax/responses.js +6 -6
  54. package/dist/providers/minimax.d.ts +3 -8
  55. package/dist/providers/minimax.js +6 -6
  56. package/dist/providers/mistral.d.ts +3 -2
  57. package/dist/providers/mistral.js +6 -6
  58. package/dist/providers/openai-compatible-responses.d.ts +3 -2
  59. package/dist/providers/openai-compatible-responses.js +7 -7
  60. package/dist/providers/openai-compatible.d.ts +3 -2
  61. package/dist/providers/openai-compatible.js +7 -7
  62. package/dist/providers/openai.d.ts +3 -2
  63. package/dist/providers/openai.js +9 -9
  64. package/dist/providers/openrouter.d.ts +3 -2
  65. package/dist/providers/openrouter.js +6 -6
  66. package/dist/providers/togetherai.d.ts +3 -2
  67. package/dist/providers/togetherai.js +6 -6
  68. package/dist/providers/xai.d.ts +3 -2
  69. package/dist/providers/xai.js +6 -10
  70. package/dist/providers/zai.d.ts +8 -133
  71. package/dist/providers/zai.js +0 -32
  72. package/dist/route/client.js +2 -5
  73. package/dist/route/transport/websocket.js +2 -6
  74. package/dist/schema/errors.d.ts +0 -12
  75. package/dist/schema/errors.js +0 -11
  76. package/dist/schema/options.d.ts +0 -2
  77. package/dist/schema/options.js +0 -2
  78. package/package.json +3 -3
  79. package/dist/protocols/alibaba-chat.d.ts +0 -225
  80. package/dist/protocols/alibaba-chat.js +0 -75
  81. package/dist/protocols/alibaba-messages.d.ts +0 -350
  82. package/dist/protocols/alibaba-messages.js +0 -40
  83. package/dist/protocols/alibaba-responses.d.ts +0 -255
  84. package/dist/protocols/alibaba-responses.js +0 -80
  85. package/dist/protocols/zai-chat.d.ts +0 -202
  86. package/dist/protocols/zai-chat.js +0 -49
  87. package/dist/protocols/zai-messages.d.ts +0 -344
  88. package/dist/protocols/zai-messages.js +0 -27
  89. package/dist/providers/alibaba/chat.d.ts +0 -1
  90. package/dist/providers/alibaba/chat.js +0 -1
  91. package/dist/providers/alibaba/messages.d.ts +0 -3
  92. package/dist/providers/alibaba/messages.js +0 -1
  93. package/dist/providers/alibaba/responses.d.ts +0 -3
  94. package/dist/providers/alibaba/responses.js +0 -1
  95. package/dist/providers/alibaba.d.ts +0 -711
  96. package/dist/providers/alibaba.js +0 -94
  97. package/dist/providers/moonshot/chat.d.ts +0 -1
  98. package/dist/providers/moonshot/chat.js +0 -1
  99. package/dist/providers/moonshot/messages.d.ts +0 -4
  100. package/dist/providers/moonshot/messages.js +0 -8
  101. package/dist/providers/moonshot/responses.d.ts +0 -4
  102. package/dist/providers/moonshot/responses.js +0 -8
  103. package/dist/providers/moonshot.d.ts +0 -596
  104. package/dist/providers/moonshot.js +0 -90
  105. package/dist/providers/zai/chat.d.ts +0 -1
  106. package/dist/providers/zai/chat.js +0 -1
  107. package/dist/providers/zai-coding-plan/chat.d.ts +0 -1
  108. package/dist/providers/zai-coding-plan/chat.js +0 -1
  109. package/dist/providers/zai-coding-plan/messages.d.ts +0 -4
  110. package/dist/providers/zai-coding-plan/messages.js +0 -8
  111. package/dist/providers/zai-coding-plan/responses.d.ts +0 -4
  112. package/dist/providers/zai-coding-plan/responses.js +0 -8
  113. package/dist/providers/zai-coding-plan.d.ts +0 -577
  114. package/dist/providers/zai-coding-plan.js +0 -63
@@ -1,711 +0,0 @@
1
- import type { ProviderPackage } from "../provider-package.js";
2
- import { AlibabaChat } from "../protocols/alibaba-chat.js";
3
- import { AlibabaMessages } from "../protocols/alibaba-messages.js";
4
- import { AlibabaResponses } from "../protocols/alibaba-responses.js";
5
- import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options.js";
6
- import { Route, type RouteDefaultsInput } from "../route/client.js";
7
- import { ToolDefinition, type ModelID } from "../schema/index.js";
8
- export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
9
- export type Region = "ap-southeast-1" | "cn-beijing" | "cn-hongkong" | "us-east-1" | "eu-central-1" | "ap-northeast-1" | (string & {});
10
- export type ChatOptionsInput = AlibabaChat.OptionsInput;
11
- export type MessagesOptionsInput = AlibabaMessages.OptionsInput;
12
- export type ResponsesOptionsInput = AlibabaResponses.OptionsInput;
13
- type Location = AtLeastOne<{
14
- readonly region: Region;
15
- /** Overrides the selected API's complete base URL, including its version prefix. */
16
- readonly baseURL: string;
17
- }> & {
18
- readonly workspaceID?: string;
19
- };
20
- export type Config = Location & Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
21
- readonly providerOptions?: ChatOptionsInput | MessagesOptionsInput | ResponsesOptionsInput;
22
- };
23
- export type Settings<Options = ChatOptionsInput> = Location & ProviderPackage.Settings & Options & {
24
- readonly apiKey?: string;
25
- };
26
- export declare const routes: (Route<{
27
- readonly model: string;
28
- readonly messages: readonly ({
29
- readonly role: "system";
30
- readonly content: string | readonly ({
31
- readonly type: "text";
32
- readonly text: string;
33
- readonly cache_control?: {
34
- readonly type: "ephemeral";
35
- readonly ttl?: string | undefined;
36
- } | undefined;
37
- } | {
38
- readonly type: "image_url";
39
- readonly image_url: {
40
- readonly url: string;
41
- };
42
- })[];
43
- } | {
44
- readonly role: "user";
45
- readonly content: string | readonly ({
46
- readonly type: "text";
47
- readonly text: string;
48
- readonly cache_control?: {
49
- readonly type: "ephemeral";
50
- readonly ttl?: string | undefined;
51
- } | undefined;
52
- } | {
53
- readonly type: "image_url";
54
- readonly image_url: {
55
- readonly url: string;
56
- };
57
- })[];
58
- } | {
59
- readonly [x: string]: unknown;
60
- readonly content: string | null;
61
- readonly role: "assistant";
62
- readonly reasoning?: string | undefined;
63
- readonly reasoning_content?: string | undefined;
64
- readonly reasoning_text?: string | undefined;
65
- readonly cache_control?: {
66
- readonly type: "ephemeral";
67
- readonly ttl?: string | undefined;
68
- } | undefined;
69
- readonly tool_calls?: readonly {
70
- readonly id: string;
71
- readonly type: "function";
72
- readonly function: {
73
- readonly name: string;
74
- readonly arguments: string;
75
- };
76
- }[] | undefined;
77
- readonly reasoning_details?: unknown;
78
- } | {
79
- readonly content: string;
80
- readonly role: "tool";
81
- readonly tool_call_id: string;
82
- readonly cache_control?: {
83
- readonly type: "ephemeral";
84
- readonly ttl?: string | undefined;
85
- } | undefined;
86
- })[];
87
- readonly stream: true;
88
- readonly max_completion_tokens?: number | undefined;
89
- readonly max_tokens?: number | undefined;
90
- readonly tools?: readonly {
91
- readonly function: {
92
- readonly description: string;
93
- readonly name: string;
94
- readonly parameters: {
95
- readonly [x: string]: unknown;
96
- };
97
- readonly strict?: boolean | undefined;
98
- };
99
- readonly type: "function";
100
- readonly cache_control?: {
101
- readonly type: "ephemeral";
102
- readonly ttl?: string | undefined;
103
- } | undefined;
104
- }[] | undefined;
105
- readonly stop?: readonly string[] | undefined;
106
- readonly temperature?: number | undefined;
107
- readonly seed?: number | undefined;
108
- readonly thinking?: {
109
- readonly type: "disabled" | (string & {}) | "adaptive";
110
- } | undefined;
111
- readonly tool_choice?: "required" | "auto" | "none" | {
112
- readonly type: "function";
113
- readonly function: {
114
- readonly name: string;
115
- };
116
- } | undefined;
117
- readonly top_p?: number | undefined;
118
- readonly top_k?: number | undefined;
119
- readonly frequency_penalty?: number | undefined;
120
- readonly presence_penalty?: number | undefined;
121
- readonly prompt_cache_key?: string | undefined;
122
- readonly parallel_tool_calls?: boolean | undefined;
123
- readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
124
- readonly store?: boolean | undefined;
125
- readonly stream_options?: {
126
- readonly include_usage: boolean;
127
- } | undefined;
128
- readonly tool_stream?: boolean | undefined;
129
- readonly enable_thinking?: boolean | undefined;
130
- readonly thinking_budget?: number | undefined;
131
- readonly preserve_thinking?: boolean | undefined;
132
- readonly clear_thinking?: boolean | undefined;
133
- readonly repetition_penalty?: number | undefined;
134
- readonly response_format?: {
135
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
136
- readonly json_schema?: {
137
- readonly [x: string]: unknown;
138
- } | undefined;
139
- } | undefined;
140
- readonly enable_search?: boolean | undefined;
141
- readonly search_options?: {
142
- readonly forced_search?: boolean | undefined;
143
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
144
- readonly enable_search_extension?: boolean | undefined;
145
- } | undefined;
146
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
147
- readonly max_tokens: number;
148
- readonly model: string;
149
- readonly messages: readonly ({
150
- readonly role: "user";
151
- readonly content: readonly ({
152
- readonly type: "text";
153
- readonly text: string;
154
- readonly cache_control?: {
155
- readonly type: "ephemeral";
156
- readonly ttl?: "1h" | "5m" | undefined;
157
- } | undefined;
158
- } | {
159
- readonly type: "image";
160
- readonly source: {
161
- readonly type: "base64";
162
- readonly media_type: string;
163
- readonly data: string;
164
- } | {
165
- readonly type: "url";
166
- readonly url: string;
167
- } | {
168
- readonly type: "file";
169
- readonly file_id: string;
170
- };
171
- readonly cache_control?: {
172
- readonly type: "ephemeral";
173
- readonly ttl?: "1h" | "5m" | undefined;
174
- } | undefined;
175
- readonly transformations?: {
176
- readonly oversized_image?: "error" | "downsize" | undefined;
177
- } | undefined;
178
- } | {
179
- readonly type: "document";
180
- readonly source: {
181
- readonly type: "base64";
182
- readonly media_type: "application/pdf";
183
- readonly data: string;
184
- } | {
185
- readonly type: "text";
186
- readonly media_type: "text/plain";
187
- readonly data: string;
188
- } | {
189
- readonly type: "url";
190
- readonly url: string;
191
- } | {
192
- readonly type: "file";
193
- readonly file_id: string;
194
- };
195
- readonly title?: string | undefined;
196
- readonly context?: string | undefined;
197
- readonly cache_control?: {
198
- readonly type: "ephemeral";
199
- readonly ttl?: "1h" | "5m" | undefined;
200
- } | undefined;
201
- readonly citations?: {
202
- readonly enabled: boolean;
203
- } | undefined;
204
- } | {
205
- readonly type: "tool_result";
206
- readonly content: string | readonly ({
207
- readonly type: "text";
208
- readonly text: string;
209
- readonly cache_control?: {
210
- readonly type: "ephemeral";
211
- readonly ttl?: "1h" | "5m" | undefined;
212
- } | undefined;
213
- } | {
214
- readonly type: "image";
215
- readonly source: {
216
- readonly type: "base64";
217
- readonly media_type: string;
218
- readonly data: string;
219
- } | {
220
- readonly type: "url";
221
- readonly url: string;
222
- } | {
223
- readonly type: "file";
224
- readonly file_id: string;
225
- };
226
- readonly cache_control?: {
227
- readonly type: "ephemeral";
228
- readonly ttl?: "1h" | "5m" | undefined;
229
- } | undefined;
230
- readonly transformations?: {
231
- readonly oversized_image?: "error" | "downsize" | undefined;
232
- } | undefined;
233
- } | {
234
- readonly type: "document";
235
- readonly source: {
236
- readonly type: "base64";
237
- readonly media_type: "application/pdf";
238
- readonly data: string;
239
- } | {
240
- readonly type: "text";
241
- readonly media_type: "text/plain";
242
- readonly data: string;
243
- } | {
244
- readonly type: "url";
245
- readonly url: string;
246
- } | {
247
- readonly type: "file";
248
- readonly file_id: string;
249
- };
250
- readonly title?: string | undefined;
251
- readonly context?: string | undefined;
252
- readonly cache_control?: {
253
- readonly type: "ephemeral";
254
- readonly ttl?: "1h" | "5m" | undefined;
255
- } | undefined;
256
- readonly citations?: {
257
- readonly enabled: boolean;
258
- } | undefined;
259
- })[];
260
- readonly tool_use_id: string;
261
- readonly cache_control?: {
262
- readonly type: "ephemeral";
263
- readonly ttl?: "1h" | "5m" | undefined;
264
- } | undefined;
265
- readonly is_error?: boolean | undefined;
266
- })[];
267
- } | {
268
- readonly role: "assistant";
269
- readonly content: readonly ({
270
- readonly type: "text";
271
- readonly text: string;
272
- readonly cache_control?: {
273
- readonly type: "ephemeral";
274
- readonly ttl?: "1h" | "5m" | undefined;
275
- } | undefined;
276
- } | {
277
- readonly id: string;
278
- readonly type: "tool_use";
279
- readonly name: string;
280
- readonly input: unknown;
281
- readonly cache_control?: {
282
- readonly type: "ephemeral";
283
- readonly ttl?: "1h" | "5m" | undefined;
284
- } | undefined;
285
- } | {
286
- readonly id: string;
287
- readonly type: "server_tool_use";
288
- readonly name: string;
289
- readonly input: unknown;
290
- readonly cache_control?: {
291
- readonly type: "ephemeral";
292
- readonly ttl?: "1h" | "5m" | undefined;
293
- } | undefined;
294
- } | {
295
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
296
- readonly content: unknown;
297
- readonly tool_use_id: string;
298
- readonly cache_control?: {
299
- readonly type: "ephemeral";
300
- readonly ttl?: "1h" | "5m" | undefined;
301
- } | undefined;
302
- } | {
303
- readonly type: "thinking";
304
- readonly thinking: string;
305
- readonly signature: string;
306
- readonly cache_control?: {
307
- readonly type: "ephemeral";
308
- readonly ttl?: "1h" | "5m" | undefined;
309
- } | undefined;
310
- } | {
311
- readonly data: string;
312
- readonly type: "redacted_thinking";
313
- readonly cache_control?: {
314
- readonly type: "ephemeral";
315
- readonly ttl?: "1h" | "5m" | undefined;
316
- } | undefined;
317
- } | {
318
- readonly type: "compaction";
319
- readonly content: string | null;
320
- })[];
321
- } | {
322
- readonly role: "system";
323
- readonly content: readonly {
324
- readonly type: "text";
325
- readonly text: string;
326
- readonly cache_control?: {
327
- readonly type: "ephemeral";
328
- readonly ttl?: "1h" | "5m" | undefined;
329
- } | undefined;
330
- }[];
331
- })[];
332
- readonly stream: true;
333
- readonly metadata?: {
334
- readonly user_id?: string | null | undefined;
335
- } | undefined;
336
- readonly tools?: readonly {
337
- readonly description: string;
338
- readonly name: string;
339
- readonly input_schema: {
340
- readonly [x: string]: unknown;
341
- };
342
- readonly cache_control?: {
343
- readonly type: "ephemeral";
344
- readonly ttl?: "1h" | "5m" | undefined;
345
- } | undefined;
346
- }[] | undefined;
347
- readonly system?: readonly {
348
- readonly type: "text";
349
- readonly text: string;
350
- readonly cache_control?: {
351
- readonly type: "ephemeral";
352
- readonly ttl?: "1h" | "5m" | undefined;
353
- } | undefined;
354
- }[] | undefined;
355
- readonly temperature?: number | undefined;
356
- readonly thinking?: {
357
- readonly type: string;
358
- readonly budget_tokens?: number | undefined;
359
- } | undefined;
360
- readonly service_tier?: "auto" | "standard_only" | undefined;
361
- readonly container?: string | {
362
- readonly id?: string | null | undefined;
363
- readonly skills?: readonly {
364
- readonly [x: string]: unknown;
365
- }[] | null | undefined;
366
- } | null | undefined;
367
- readonly inference_geo?: string | null | undefined;
368
- readonly cache_control?: {
369
- readonly type: "ephemeral";
370
- readonly ttl?: "1h" | "5m" | undefined;
371
- } | undefined;
372
- readonly output_config?: {
373
- readonly format?: {
374
- readonly type: "json_schema";
375
- readonly schema: {
376
- readonly [x: string]: unknown;
377
- };
378
- } | null | undefined;
379
- readonly effort?: string | undefined;
380
- } | undefined;
381
- readonly context_management?: {
382
- readonly edits: readonly {
383
- readonly type: "compact_20260112";
384
- readonly instructions?: string | undefined;
385
- readonly trigger?: {
386
- readonly type: "input_tokens";
387
- readonly value: number;
388
- } | undefined;
389
- readonly pause_after_compaction?: boolean | undefined;
390
- }[];
391
- } | undefined;
392
- readonly tool_choice?: {
393
- readonly type: "auto" | "none" | "any";
394
- readonly disable_parallel_tool_use?: boolean | undefined;
395
- } | {
396
- readonly type: "tool";
397
- readonly name: string;
398
- readonly disable_parallel_tool_use?: boolean | undefined;
399
- } | undefined;
400
- readonly top_p?: number | undefined;
401
- readonly top_k?: number | undefined;
402
- readonly stop_sequences?: readonly string[] | undefined;
403
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
404
- readonly input: readonly ({
405
- readonly [x: string]: unknown;
406
- readonly id: string;
407
- readonly type: "web_search_call";
408
- readonly status?: string | undefined;
409
- readonly action?: {
410
- readonly [x: string]: unknown;
411
- } | null | undefined;
412
- } | {
413
- readonly [x: string]: unknown;
414
- readonly id: string;
415
- readonly type: "file_search_call";
416
- readonly status?: string | undefined;
417
- readonly queries?: readonly string[] | undefined;
418
- readonly results?: readonly {
419
- readonly [x: string]: unknown;
420
- }[] | null | undefined;
421
- } | {
422
- readonly [x: string]: unknown;
423
- readonly id: string;
424
- readonly type: "code_interpreter_call";
425
- readonly status?: string | undefined;
426
- readonly code?: string | null | undefined;
427
- readonly container_id?: string | null | undefined;
428
- readonly outputs?: readonly {
429
- readonly [x: string]: unknown;
430
- }[] | null | undefined;
431
- } | {
432
- readonly [x: string]: unknown;
433
- readonly id: string;
434
- readonly type: "mcp_call";
435
- readonly status?: string | undefined;
436
- readonly name?: string | undefined;
437
- readonly output?: string | null | undefined;
438
- readonly error?: unknown;
439
- readonly arguments?: string | undefined;
440
- readonly server_label?: string | undefined;
441
- } | {
442
- readonly type: "reasoning";
443
- readonly summary: readonly {
444
- readonly type: "summary_text";
445
- readonly text: string;
446
- }[];
447
- readonly id?: string | undefined;
448
- readonly encrypted_content?: string | null | undefined;
449
- } | {
450
- readonly type: "compaction";
451
- readonly encrypted_content: string;
452
- readonly id?: string | null | undefined;
453
- } | {
454
- readonly role: "system";
455
- readonly content: string;
456
- } | {
457
- readonly role: "developer";
458
- readonly content: string;
459
- } | {
460
- readonly content: readonly ({
461
- readonly type: "input_image";
462
- readonly image_url: string;
463
- readonly detail?: string | undefined;
464
- } | {
465
- readonly type: "input_file";
466
- readonly filename: string;
467
- readonly detail?: string | undefined;
468
- readonly file_data?: string | undefined;
469
- readonly file_url?: string | undefined;
470
- } | {
471
- readonly type: "input_text";
472
- readonly text: string;
473
- })[];
474
- readonly role: "user";
475
- readonly id?: string | undefined;
476
- readonly type?: "message" | undefined;
477
- readonly status?: string | undefined;
478
- } | {
479
- readonly type: "message";
480
- readonly content: readonly {
481
- readonly type: "output_text";
482
- readonly text: string;
483
- }[];
484
- readonly role: "assistant";
485
- readonly id?: string | undefined;
486
- readonly status?: string | undefined;
487
- readonly phase?: "commentary" | "final_answer" | null | undefined;
488
- } | {
489
- readonly type: "function_call";
490
- readonly name: string;
491
- readonly arguments: string;
492
- readonly call_id: string;
493
- readonly id?: string | undefined;
494
- readonly namespace?: string | undefined;
495
- } | {
496
- readonly type: "function_call_output";
497
- readonly call_id: string;
498
- readonly output: string | readonly ({
499
- readonly type: "input_image";
500
- readonly image_url: string;
501
- readonly detail?: string | undefined;
502
- } | {
503
- readonly type: "input_file";
504
- readonly filename: string;
505
- readonly detail?: string | undefined;
506
- readonly file_data?: string | undefined;
507
- readonly file_url?: string | undefined;
508
- } | {
509
- readonly type: "input_text";
510
- readonly text: string;
511
- } | {
512
- readonly type: "input_video";
513
- readonly video_url: string;
514
- })[];
515
- } | {
516
- readonly [x: string]: unknown;
517
- readonly id: string;
518
- readonly type: "web_extractor_call";
519
- readonly urls?: readonly string[] | undefined;
520
- readonly goal?: string | undefined;
521
- })[];
522
- readonly model: string;
523
- readonly stream: true;
524
- readonly metadata?: {
525
- readonly [x: string]: string;
526
- } | undefined;
527
- readonly instructions?: string | undefined;
528
- readonly reasoning?: {
529
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
530
- readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
531
- } | undefined;
532
- readonly tools?: readonly ({
533
- readonly type: "function";
534
- readonly description: string;
535
- readonly name: string;
536
- readonly parameters: {
537
- readonly [x: string]: unknown;
538
- };
539
- readonly strict?: boolean | undefined;
540
- } | {
541
- readonly type: "web_search" | "code_interpreter" | "web_extractor";
542
- })[] | undefined;
543
- readonly text?: {
544
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
545
- } | undefined;
546
- readonly temperature?: number | undefined;
547
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
548
- readonly tool_choice?: "required" | "auto" | "none" | {
549
- readonly type: "function";
550
- readonly name: string;
551
- } | {
552
- readonly type: "allowed_tools";
553
- readonly mode: "required" | "auto" | "none";
554
- readonly tools: readonly {
555
- readonly type: "function";
556
- readonly name: string;
557
- }[];
558
- } | undefined;
559
- readonly top_p?: number | undefined;
560
- readonly frequency_penalty?: number | undefined;
561
- readonly presence_penalty?: number | undefined;
562
- readonly prompt_cache_key?: string | undefined;
563
- readonly parallel_tool_calls?: boolean | undefined;
564
- readonly store?: boolean | undefined;
565
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
566
- readonly truncation?: "auto" | "disabled" | undefined;
567
- readonly stream_options?: {
568
- readonly include_obfuscation?: boolean | undefined;
569
- } | undefined;
570
- readonly safety_identifier?: string | undefined;
571
- readonly top_logprobs?: number | undefined;
572
- readonly max_output_tokens?: number | undefined;
573
- readonly max_tool_calls?: number | undefined;
574
- readonly previous_response_id?: string | undefined;
575
- readonly conversation?: string | undefined;
576
- readonly enable_thinking?: boolean | undefined;
577
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
578
- export declare const configure: (input: Config) => {
579
- id: string & import("effect/Brand").Brand<"AI.ProviderID">;
580
- model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
581
- readonly thinking?: {
582
- readonly type: "disabled" | (string & {}) | "adaptive";
583
- } | undefined;
584
- readonly thinkingBudget?: number | undefined;
585
- readonly parallelToolCalls?: boolean | undefined;
586
- readonly reasoningEffort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
587
- readonly enableThinking?: boolean | undefined;
588
- readonly preserveThinking?: boolean | undefined;
589
- readonly clearThinking?: boolean | undefined;
590
- readonly toolStream?: boolean | undefined;
591
- readonly repetitionPenalty?: number | undefined;
592
- readonly responseFormat?: {
593
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
594
- readonly json_schema?: {
595
- readonly [x: string]: unknown;
596
- } | undefined;
597
- } | undefined;
598
- readonly enableSearch?: boolean | undefined;
599
- readonly searchOptions?: {
600
- readonly forced_search?: boolean | undefined;
601
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
602
- readonly enable_search_extension?: boolean | undefined;
603
- } | undefined;
604
- }, import("../route/client.js").CompactionOperations | undefined>;
605
- chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
606
- readonly thinking?: {
607
- readonly type: "disabled" | (string & {}) | "adaptive";
608
- } | undefined;
609
- readonly thinkingBudget?: number | undefined;
610
- readonly parallelToolCalls?: boolean | undefined;
611
- readonly reasoningEffort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
612
- readonly enableThinking?: boolean | undefined;
613
- readonly preserveThinking?: boolean | undefined;
614
- readonly clearThinking?: boolean | undefined;
615
- readonly toolStream?: boolean | undefined;
616
- readonly repetitionPenalty?: number | undefined;
617
- readonly responseFormat?: {
618
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
619
- readonly json_schema?: {
620
- readonly [x: string]: unknown;
621
- } | undefined;
622
- } | undefined;
623
- readonly enableSearch?: boolean | undefined;
624
- readonly searchOptions?: {
625
- readonly forced_search?: boolean | undefined;
626
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
627
- readonly enable_search_extension?: boolean | undefined;
628
- } | undefined;
629
- }, import("../route/client.js").CompactionOperations | undefined>;
630
- messages: (id: string | ModelID) => import("../schema/options.js").LanguageModel<AlibabaMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
631
- responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
632
- readonly reasoningEffort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
633
- readonly store?: boolean | undefined;
634
- readonly conversation?: string | undefined;
635
- readonly enableThinking?: boolean | undefined;
636
- readonly previousResponseId?: string | undefined;
637
- }, import("../route/client.js").CompactionOperations | undefined>;
638
- configure: (input: Config) => /*elided*/ any;
639
- };
640
- export declare const provider: {
641
- id: string & import("effect/Brand").Brand<"AI.ProviderID">;
642
- configure: (input: Config) => {
643
- id: string & import("effect/Brand").Brand<"AI.ProviderID">;
644
- model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
645
- readonly thinking?: {
646
- readonly type: "disabled" | (string & {}) | "adaptive";
647
- } | undefined;
648
- readonly thinkingBudget?: number | undefined;
649
- readonly parallelToolCalls?: boolean | undefined;
650
- readonly reasoningEffort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
651
- readonly enableThinking?: boolean | undefined;
652
- readonly preserveThinking?: boolean | undefined;
653
- readonly clearThinking?: boolean | undefined;
654
- readonly toolStream?: boolean | undefined;
655
- readonly repetitionPenalty?: number | undefined;
656
- readonly responseFormat?: {
657
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
658
- readonly json_schema?: {
659
- readonly [x: string]: unknown;
660
- } | undefined;
661
- } | undefined;
662
- readonly enableSearch?: boolean | undefined;
663
- readonly searchOptions?: {
664
- readonly forced_search?: boolean | undefined;
665
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
666
- readonly enable_search_extension?: boolean | undefined;
667
- } | undefined;
668
- }, import("../route/client.js").CompactionOperations | undefined>;
669
- chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
670
- readonly thinking?: {
671
- readonly type: "disabled" | (string & {}) | "adaptive";
672
- } | undefined;
673
- readonly thinkingBudget?: number | undefined;
674
- readonly parallelToolCalls?: boolean | undefined;
675
- readonly reasoningEffort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
676
- readonly enableThinking?: boolean | undefined;
677
- readonly preserveThinking?: boolean | undefined;
678
- readonly clearThinking?: boolean | undefined;
679
- readonly toolStream?: boolean | undefined;
680
- readonly repetitionPenalty?: number | undefined;
681
- readonly responseFormat?: {
682
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
683
- readonly json_schema?: {
684
- readonly [x: string]: unknown;
685
- } | undefined;
686
- } | undefined;
687
- readonly enableSearch?: boolean | undefined;
688
- readonly searchOptions?: {
689
- readonly forced_search?: boolean | undefined;
690
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
691
- readonly enable_search_extension?: boolean | undefined;
692
- } | undefined;
693
- }, import("../route/client.js").CompactionOperations | undefined>;
694
- messages: (id: string | ModelID) => import("../schema/options.js").LanguageModel<AlibabaMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
695
- responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
696
- readonly reasoningEffort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
697
- readonly store?: boolean | undefined;
698
- readonly conversation?: string | undefined;
699
- readonly enableThinking?: boolean | undefined;
700
- readonly previousResponseId?: string | undefined;
701
- }, import("../route/client.js").CompactionOperations | undefined>;
702
- configure: /*elided*/ any;
703
- };
704
- };
705
- export declare const model: ProviderPackage.Definition<Settings, ChatOptionsInput>["model"];
706
- export declare const messagesModel: ProviderPackage.Definition<Settings<MessagesOptionsInput>, MessagesOptionsInput>["model"];
707
- export declare const responsesModel: ProviderPackage.Definition<Settings<ResponsesOptionsInput>, ResponsesOptionsInput>["model"];
708
- export declare const webSearch: () => ToolDefinition;
709
- export declare const webExtractor: () => ToolDefinition;
710
- export declare const codeInterpreter: () => ToolDefinition;
711
- export * as Alibaba from "./alibaba.js";