@opencode/ai 2.1.2 → 2.1.4
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/dist/cache-policy.js +6 -5
- package/dist/experimental/evaluation.d.ts +7 -6
- package/dist/experimental/evaluation.js +3 -11
- package/dist/experimental/realtime.d.ts +59 -0
- package/dist/experimental/realtime.js +21 -13
- package/dist/experimental.d.ts +1 -1
- package/dist/generation.js +1 -1
- package/dist/image-client.d.ts +11 -9
- package/dist/image.d.ts +158 -150
- package/dist/image.js +2 -2
- package/dist/llm.d.ts +2 -4
- package/dist/llm.js +2 -2
- package/dist/media-model.d.ts +2 -2
- package/dist/media-model.js +1 -1
- package/dist/promise.d.ts +121 -121
- package/dist/promise.js +3 -5
- package/dist/protocols/alibaba-chat.d.ts +18 -18
- package/dist/protocols/alibaba-chat.js +3 -3
- package/dist/protocols/alibaba-messages.d.ts +12 -12
- package/dist/protocols/alibaba-messages.js +1 -1
- package/dist/protocols/alibaba-responses.d.ts +38 -38
- package/dist/protocols/anthropic-messages.d.ts +40 -44
- package/dist/protocols/anthropic-messages.js +13 -15
- package/dist/protocols/bedrock-converse.d.ts +36 -85
- package/dist/protocols/bedrock-converse.js +6 -6
- package/dist/protocols/bedrock-event-stream.d.ts +6 -1
- package/dist/protocols/bedrock-event-stream.js +9 -8
- package/dist/protocols/cartesia-speech.d.ts +32 -32
- package/dist/protocols/cohere-chat.d.ts +13 -10
- package/dist/protocols/cohere-chat.js +2 -2
- package/dist/protocols/deepgram-speech.d.ts +32 -32
- package/dist/protocols/elevenlabs-speech.d.ts +32 -32
- package/dist/protocols/gemini.d.ts +46 -36
- package/dist/protocols/gemini.js +12 -15
- package/dist/protocols/google-interactions.d.ts +14 -13
- package/dist/protocols/google-interactions.js +16 -11
- package/dist/protocols/google-speech.d.ts +32 -32
- package/dist/protocols/google-transcription.d.ts +32 -32
- package/dist/protocols/meta-messages.d.ts +23 -23
- package/dist/protocols/meta-responses.d.ts +84 -84
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +3 -5
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +419 -419
- package/dist/protocols/open-responses.js +11 -10
- package/dist/protocols/openai-chat.d.ts +68 -67
- package/dist/protocols/openai-chat.js +7 -8
- package/dist/protocols/openai-compatible-chat.d.ts +13 -14
- package/dist/protocols/openai-compatible-responses.d.ts +39 -40
- package/dist/protocols/openai-images.d.ts +32 -32
- package/dist/protocols/openai-responses.d.ts +253 -253
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +32 -32
- package/dist/protocols/openai-transcription.d.ts +32 -32
- package/dist/protocols/openai-transcription.js +12 -7
- package/dist/protocols/utils/open-responses-options.d.ts +8 -8
- package/dist/protocols/utils/open-responses-options.js +4 -6
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/protocols/utils/partial-json.js +5 -4
- package/dist/protocols/utils/tool-schema.d.ts +0 -3
- package/dist/protocols/utils/tool-schema.js +0 -4
- package/dist/protocols/utils/tool-stream.d.ts +1 -1
- package/dist/protocols/venice-chat.d.ts +52 -53
- package/dist/protocols/venice-chat.js +6 -5
- package/dist/protocols/xai-images.js +3 -4
- package/dist/protocols/xai-responses.d.ts +81 -81
- package/dist/protocols/zai-chat.d.ts +33 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-messages.d.ts +21 -19
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/provider-error.js +8 -7
- package/dist/providers/alibaba.d.ts +74 -74
- package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
- package/dist/providers/amazon-bedrock.d.ts +16 -13
- package/dist/providers/anthropic-compatible.d.ts +13 -13
- package/dist/providers/anthropic.d.ts +13 -13
- package/dist/providers/azure.d.ts +112 -112
- package/dist/providers/baseten.d.ts +24 -24
- package/dist/providers/cerebras.d.ts +24 -24
- package/dist/providers/cloudflare-ai-gateway.d.ts +237 -234
- package/dist/providers/cloudflare-ai-gateway.js +3 -6
- package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
- package/dist/providers/cohere.d.ts +78 -74
- package/dist/providers/deepinfra.d.ts +24 -24
- package/dist/providers/deepseek.d.ts +24 -24
- package/dist/providers/digitalocean.d.ts +36 -36
- package/dist/providers/fireworks.d.ts +24 -24
- package/dist/providers/google-vertex-chat.d.ts +12 -12
- package/dist/providers/google-vertex-interactions.d.ts +3 -3
- package/dist/providers/google-vertex-messages.d.ts +20 -20
- package/dist/providers/google-vertex-mistral.d.ts +14 -14
- package/dist/providers/google-vertex-responses.d.ts +38 -38
- package/dist/providers/google-vertex.d.ts +17 -17
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/google.d.ts +79 -79
- package/dist/providers/groq.d.ts +24 -24
- package/dist/providers/meta.d.ts +189 -189
- package/dist/providers/minimax.d.ts +202 -202
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +202 -202
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +38 -38
- package/dist/providers/openai-compatible.d.ts +12 -12
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai-options.d.ts +3 -4
- package/dist/providers/openai-options.js +0 -1
- package/dist/providers/openai.d.ts +103 -103
- package/dist/providers/openrouter.d.ts +171 -112
- package/dist/providers/openrouter.js +40 -33
- package/dist/providers/togetherai.d.ts +24 -24
- package/dist/providers/venice.d.ts +195 -20
- package/dist/providers/xai.d.ts +12 -12
- package/dist/providers/zai-coding-plan.d.ts +152 -72
- package/dist/providers/zai.d.ts +84 -19
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +0 -218
- package/dist/route/client.js +3 -7
- package/dist/route/executor-service.js +1 -1
- package/dist/route/transport/http.js +5 -8
- package/dist/schema/errors.d.ts +1 -1
- package/dist/schema/errors.js +1 -1
- package/dist/schema/messages.js +4 -7
- package/dist/speech-client.d.ts +11 -9
- package/dist/speech.d.ts +158 -150
- package/dist/speech.js +2 -2
- package/dist/transcription-client.d.ts +11 -9
- package/dist/transcription.d.ts +158 -150
- package/dist/transcription.js +2 -2
- package/dist/video-client.d.ts +11 -9
- package/dist/video.d.ts +124 -116
- package/dist/video.js +2 -2
- package/package.json +7 -6
- package/dist/protocols/utils/openai-options.d.ts +0 -16
- package/dist/protocols/utils/openai-options.js +0 -15
|
@@ -31,183 +31,6 @@ export type Settings<Options = OpenAIProviderOptionsInput> = ProviderPackage.Set
|
|
|
31
31
|
};
|
|
32
32
|
export type MessagesSettings = Settings<AnthropicMessages.ProviderOptionsInput>;
|
|
33
33
|
export declare const routes: (Route<{
|
|
34
|
-
readonly model: string;
|
|
35
|
-
readonly input: readonly ({
|
|
36
|
-
readonly [x: string]: unknown;
|
|
37
|
-
readonly type: "web_search_call";
|
|
38
|
-
readonly id: string;
|
|
39
|
-
readonly status?: string | undefined;
|
|
40
|
-
readonly action?: {
|
|
41
|
-
readonly [x: string]: unknown;
|
|
42
|
-
} | null | undefined;
|
|
43
|
-
} | {
|
|
44
|
-
readonly [x: string]: unknown;
|
|
45
|
-
readonly type: "file_search_call";
|
|
46
|
-
readonly id: string;
|
|
47
|
-
readonly status?: string | undefined;
|
|
48
|
-
readonly queries?: readonly string[] | undefined;
|
|
49
|
-
readonly results?: readonly {
|
|
50
|
-
readonly [x: string]: unknown;
|
|
51
|
-
}[] | null | undefined;
|
|
52
|
-
} | {
|
|
53
|
-
readonly [x: string]: unknown;
|
|
54
|
-
readonly type: "code_interpreter_call";
|
|
55
|
-
readonly id: string;
|
|
56
|
-
readonly status?: string | undefined;
|
|
57
|
-
readonly code?: string | null | undefined;
|
|
58
|
-
readonly container_id?: string | null | undefined;
|
|
59
|
-
readonly outputs?: readonly {
|
|
60
|
-
readonly [x: string]: unknown;
|
|
61
|
-
}[] | null | undefined;
|
|
62
|
-
} | {
|
|
63
|
-
readonly [x: string]: unknown;
|
|
64
|
-
readonly type: "mcp_call";
|
|
65
|
-
readonly id: string;
|
|
66
|
-
readonly status?: string | undefined;
|
|
67
|
-
readonly server_label?: string | undefined;
|
|
68
|
-
readonly name?: string | undefined;
|
|
69
|
-
readonly arguments?: string | undefined;
|
|
70
|
-
readonly output?: string | null | undefined;
|
|
71
|
-
readonly error?: unknown;
|
|
72
|
-
} | {
|
|
73
|
-
readonly type: "configuration_update";
|
|
74
|
-
readonly reasoning: {
|
|
75
|
-
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
76
|
-
};
|
|
77
|
-
} | {
|
|
78
|
-
readonly [x: string]: unknown;
|
|
79
|
-
readonly type: string;
|
|
80
|
-
readonly id: string;
|
|
81
|
-
} | {
|
|
82
|
-
readonly type: "compaction";
|
|
83
|
-
readonly id?: string | null | undefined;
|
|
84
|
-
readonly encrypted_content: string;
|
|
85
|
-
} | {
|
|
86
|
-
readonly type: "message";
|
|
87
|
-
readonly role: "system";
|
|
88
|
-
readonly content: string;
|
|
89
|
-
} | {
|
|
90
|
-
readonly type: "message";
|
|
91
|
-
readonly role: "developer";
|
|
92
|
-
readonly content: string;
|
|
93
|
-
} | {
|
|
94
|
-
readonly type: "message";
|
|
95
|
-
readonly role: "user";
|
|
96
|
-
readonly content: readonly ({
|
|
97
|
-
readonly type: "input_image";
|
|
98
|
-
readonly image_url: string;
|
|
99
|
-
readonly detail?: string | undefined;
|
|
100
|
-
} | {
|
|
101
|
-
readonly type: "input_file";
|
|
102
|
-
readonly filename: string;
|
|
103
|
-
readonly detail?: string | undefined;
|
|
104
|
-
readonly file_data?: string | undefined;
|
|
105
|
-
readonly file_url?: string | undefined;
|
|
106
|
-
} | {
|
|
107
|
-
readonly type: "input_text";
|
|
108
|
-
readonly text: string;
|
|
109
|
-
})[];
|
|
110
|
-
readonly id?: string | undefined;
|
|
111
|
-
readonly status?: string | undefined;
|
|
112
|
-
} | {
|
|
113
|
-
readonly type: "message";
|
|
114
|
-
readonly id?: string | undefined;
|
|
115
|
-
readonly role: "assistant";
|
|
116
|
-
readonly content: readonly {
|
|
117
|
-
readonly type: "output_text";
|
|
118
|
-
readonly text: string;
|
|
119
|
-
}[];
|
|
120
|
-
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
121
|
-
readonly status?: string | undefined;
|
|
122
|
-
} | {
|
|
123
|
-
readonly type: "reasoning";
|
|
124
|
-
readonly id?: string | undefined;
|
|
125
|
-
readonly summary: readonly {
|
|
126
|
-
readonly type: "summary_text";
|
|
127
|
-
readonly text: string;
|
|
128
|
-
}[];
|
|
129
|
-
readonly encrypted_content?: string | null | undefined;
|
|
130
|
-
} | {
|
|
131
|
-
readonly type: "function_call";
|
|
132
|
-
readonly id?: string | undefined;
|
|
133
|
-
readonly call_id: string;
|
|
134
|
-
readonly name: string;
|
|
135
|
-
readonly namespace?: string | undefined;
|
|
136
|
-
readonly arguments: string;
|
|
137
|
-
} | {
|
|
138
|
-
readonly type: "function_call_output";
|
|
139
|
-
readonly call_id: string;
|
|
140
|
-
readonly output: string | readonly ({
|
|
141
|
-
readonly type: "input_image";
|
|
142
|
-
readonly image_url: string;
|
|
143
|
-
readonly detail?: string | undefined;
|
|
144
|
-
} | {
|
|
145
|
-
readonly type: "input_file";
|
|
146
|
-
readonly filename: string;
|
|
147
|
-
readonly detail?: string | undefined;
|
|
148
|
-
readonly file_data?: string | undefined;
|
|
149
|
-
readonly file_url?: string | undefined;
|
|
150
|
-
} | {
|
|
151
|
-
readonly type: "input_text";
|
|
152
|
-
readonly text: string;
|
|
153
|
-
} | {
|
|
154
|
-
readonly type: "input_video";
|
|
155
|
-
readonly video_url: string;
|
|
156
|
-
})[];
|
|
157
|
-
})[];
|
|
158
|
-
readonly instructions?: string | undefined;
|
|
159
|
-
readonly tools?: readonly ({
|
|
160
|
-
readonly [x: string]: unknown;
|
|
161
|
-
readonly type: string;
|
|
162
|
-
} | {
|
|
163
|
-
readonly type: "function";
|
|
164
|
-
readonly name: string;
|
|
165
|
-
readonly description: string;
|
|
166
|
-
readonly parameters: {
|
|
167
|
-
readonly [x: string]: unknown;
|
|
168
|
-
};
|
|
169
|
-
readonly strict?: boolean | undefined;
|
|
170
|
-
})[] | undefined;
|
|
171
|
-
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
172
|
-
readonly type: "function";
|
|
173
|
-
readonly name: string;
|
|
174
|
-
} | {
|
|
175
|
-
readonly type: "allowed_tools";
|
|
176
|
-
readonly mode: "auto" | "none" | "required";
|
|
177
|
-
readonly tools: readonly {
|
|
178
|
-
readonly type: "function";
|
|
179
|
-
readonly name: string;
|
|
180
|
-
}[];
|
|
181
|
-
} | undefined;
|
|
182
|
-
readonly store?: boolean | undefined;
|
|
183
|
-
readonly metadata?: {
|
|
184
|
-
readonly [x: string]: string;
|
|
185
|
-
} | undefined;
|
|
186
|
-
readonly safety_identifier?: string | undefined;
|
|
187
|
-
readonly stream_options?: {
|
|
188
|
-
readonly include_obfuscation?: boolean | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
readonly top_logprobs?: number | undefined;
|
|
191
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
192
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
193
|
-
readonly prompt_cache_key?: string | undefined;
|
|
194
|
-
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
195
|
-
readonly reasoning?: {
|
|
196
|
-
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
197
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
198
|
-
} | undefined;
|
|
199
|
-
readonly text?: {
|
|
200
|
-
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
201
|
-
} | undefined;
|
|
202
|
-
readonly max_output_tokens?: number | undefined;
|
|
203
|
-
readonly max_tool_calls?: number | undefined;
|
|
204
|
-
readonly parallel_tool_calls?: boolean | undefined;
|
|
205
|
-
readonly temperature?: number | undefined;
|
|
206
|
-
readonly top_p?: number | undefined;
|
|
207
|
-
readonly presence_penalty?: number | undefined;
|
|
208
|
-
readonly frequency_penalty?: number | undefined;
|
|
209
|
-
readonly stream: true;
|
|
210
|
-
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
211
34
|
readonly context_management?: {
|
|
212
35
|
readonly edits: readonly {
|
|
213
36
|
readonly type: "compact_20260112";
|
|
@@ -349,23 +172,15 @@ export declare const routes: (Route<{
|
|
|
349
172
|
} | {
|
|
350
173
|
readonly role: "assistant";
|
|
351
174
|
readonly content: readonly ({
|
|
175
|
+
readonly type: "compaction";
|
|
176
|
+
readonly content: string | null;
|
|
177
|
+
} | {
|
|
352
178
|
readonly type: "text";
|
|
353
179
|
readonly text: string;
|
|
354
180
|
readonly cache_control?: {
|
|
355
181
|
readonly type: "ephemeral";
|
|
356
182
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
357
183
|
} | undefined;
|
|
358
|
-
} | {
|
|
359
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
360
|
-
readonly tool_use_id: string;
|
|
361
|
-
readonly content: unknown;
|
|
362
|
-
readonly cache_control?: {
|
|
363
|
-
readonly type: "ephemeral";
|
|
364
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
365
|
-
} | undefined;
|
|
366
|
-
} | {
|
|
367
|
-
readonly type: "compaction";
|
|
368
|
-
readonly content: string | null;
|
|
369
184
|
} | {
|
|
370
185
|
readonly type: "thinking";
|
|
371
186
|
readonly thinking: string;
|
|
@@ -399,6 +214,14 @@ export declare const routes: (Route<{
|
|
|
399
214
|
readonly type: "ephemeral";
|
|
400
215
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
401
216
|
} | undefined;
|
|
217
|
+
} | {
|
|
218
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
219
|
+
readonly tool_use_id: string;
|
|
220
|
+
readonly content: unknown;
|
|
221
|
+
readonly cache_control?: {
|
|
222
|
+
readonly type: "ephemeral";
|
|
223
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
224
|
+
} | undefined;
|
|
402
225
|
})[];
|
|
403
226
|
} | {
|
|
404
227
|
readonly role: "system";
|
|
@@ -440,6 +263,8 @@ export declare const routes: (Route<{
|
|
|
440
263
|
readonly top_k?: number | undefined;
|
|
441
264
|
readonly stop_sequences?: readonly string[] | undefined;
|
|
442
265
|
readonly thinking?: {
|
|
266
|
+
readonly type: "between_tools" | "disabled";
|
|
267
|
+
} | {
|
|
443
268
|
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
444
269
|
readonly block_binding?: {
|
|
445
270
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
@@ -452,8 +277,6 @@ export declare const routes: (Route<{
|
|
|
452
277
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
453
278
|
} | undefined;
|
|
454
279
|
readonly type: "adaptive";
|
|
455
|
-
} | {
|
|
456
|
-
readonly type: "between_tools" | "disabled";
|
|
457
280
|
} | undefined;
|
|
458
281
|
readonly output_config?: {
|
|
459
282
|
readonly effort?: string | undefined;
|
|
@@ -484,13 +307,6 @@ export declare const routes: (Route<{
|
|
|
484
307
|
readonly messages: readonly ({
|
|
485
308
|
readonly role: "system";
|
|
486
309
|
readonly content: string | readonly ({
|
|
487
|
-
readonly type: "text";
|
|
488
|
-
readonly text: string;
|
|
489
|
-
readonly cache_control?: {
|
|
490
|
-
readonly type: "ephemeral";
|
|
491
|
-
readonly ttl?: string | undefined;
|
|
492
|
-
} | undefined;
|
|
493
|
-
} | {
|
|
494
310
|
readonly type: "image_url";
|
|
495
311
|
readonly image_url: {
|
|
496
312
|
readonly url: string;
|
|
@@ -501,17 +317,17 @@ export declare const routes: (Route<{
|
|
|
501
317
|
readonly filename: string;
|
|
502
318
|
readonly file_data: string;
|
|
503
319
|
};
|
|
504
|
-
}
|
|
505
|
-
} | {
|
|
506
|
-
readonly role: "user";
|
|
507
|
-
readonly content: string | readonly ({
|
|
320
|
+
} | {
|
|
508
321
|
readonly type: "text";
|
|
509
322
|
readonly text: string;
|
|
510
323
|
readonly cache_control?: {
|
|
511
324
|
readonly type: "ephemeral";
|
|
512
325
|
readonly ttl?: string | undefined;
|
|
513
326
|
} | undefined;
|
|
514
|
-
}
|
|
327
|
+
})[];
|
|
328
|
+
} | {
|
|
329
|
+
readonly role: "user";
|
|
330
|
+
readonly content: string | readonly ({
|
|
515
331
|
readonly type: "image_url";
|
|
516
332
|
readonly image_url: {
|
|
517
333
|
readonly url: string;
|
|
@@ -522,6 +338,13 @@ export declare const routes: (Route<{
|
|
|
522
338
|
readonly filename: string;
|
|
523
339
|
readonly file_data: string;
|
|
524
340
|
};
|
|
341
|
+
} | {
|
|
342
|
+
readonly type: "text";
|
|
343
|
+
readonly text: string;
|
|
344
|
+
readonly cache_control?: {
|
|
345
|
+
readonly type: "ephemeral";
|
|
346
|
+
readonly ttl?: string | undefined;
|
|
347
|
+
} | undefined;
|
|
525
348
|
})[];
|
|
526
349
|
} | {
|
|
527
350
|
readonly role: "tool";
|
|
@@ -600,6 +423,183 @@ export declare const routes: (Route<{
|
|
|
600
423
|
readonly presence_penalty?: number | undefined;
|
|
601
424
|
readonly seed?: number | undefined;
|
|
602
425
|
readonly stop?: readonly string[] | undefined;
|
|
426
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
427
|
+
readonly model: string;
|
|
428
|
+
readonly input: readonly ({
|
|
429
|
+
readonly type: "configuration_update";
|
|
430
|
+
readonly reasoning: {
|
|
431
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
432
|
+
};
|
|
433
|
+
} | {
|
|
434
|
+
readonly type: "message";
|
|
435
|
+
readonly role: "system";
|
|
436
|
+
readonly content: string;
|
|
437
|
+
} | {
|
|
438
|
+
readonly type: "message";
|
|
439
|
+
readonly role: "developer";
|
|
440
|
+
readonly content: string;
|
|
441
|
+
} | {
|
|
442
|
+
readonly type: "function_call_output";
|
|
443
|
+
readonly call_id: string;
|
|
444
|
+
readonly output: string | readonly ({
|
|
445
|
+
readonly type: "input_text";
|
|
446
|
+
readonly text: string;
|
|
447
|
+
} | {
|
|
448
|
+
readonly type: "input_video";
|
|
449
|
+
readonly video_url: string;
|
|
450
|
+
} | {
|
|
451
|
+
readonly type: "input_image";
|
|
452
|
+
readonly image_url: string;
|
|
453
|
+
readonly detail?: string | undefined;
|
|
454
|
+
} | {
|
|
455
|
+
readonly type: "input_file";
|
|
456
|
+
readonly filename: string;
|
|
457
|
+
readonly detail?: string | undefined;
|
|
458
|
+
readonly file_data?: string | undefined;
|
|
459
|
+
readonly file_url?: string | undefined;
|
|
460
|
+
})[];
|
|
461
|
+
} | {
|
|
462
|
+
readonly type: "reasoning";
|
|
463
|
+
readonly id?: string | undefined;
|
|
464
|
+
readonly summary: readonly {
|
|
465
|
+
readonly type: "summary_text";
|
|
466
|
+
readonly text: string;
|
|
467
|
+
}[];
|
|
468
|
+
readonly encrypted_content?: string | null | undefined;
|
|
469
|
+
} | {
|
|
470
|
+
readonly type: "compaction";
|
|
471
|
+
readonly id?: string | null | undefined;
|
|
472
|
+
readonly encrypted_content: string;
|
|
473
|
+
} | {
|
|
474
|
+
readonly type: "message";
|
|
475
|
+
readonly role: "user";
|
|
476
|
+
readonly content: readonly ({
|
|
477
|
+
readonly type: "input_text";
|
|
478
|
+
readonly text: string;
|
|
479
|
+
} | {
|
|
480
|
+
readonly type: "input_image";
|
|
481
|
+
readonly image_url: string;
|
|
482
|
+
readonly detail?: string | undefined;
|
|
483
|
+
} | {
|
|
484
|
+
readonly type: "input_file";
|
|
485
|
+
readonly filename: string;
|
|
486
|
+
readonly detail?: string | undefined;
|
|
487
|
+
readonly file_data?: string | undefined;
|
|
488
|
+
readonly file_url?: string | undefined;
|
|
489
|
+
})[];
|
|
490
|
+
readonly id?: string | undefined;
|
|
491
|
+
readonly status?: string | undefined;
|
|
492
|
+
} | {
|
|
493
|
+
readonly type: "message";
|
|
494
|
+
readonly id?: string | undefined;
|
|
495
|
+
readonly role: "assistant";
|
|
496
|
+
readonly content: readonly {
|
|
497
|
+
readonly type: "output_text";
|
|
498
|
+
readonly text: string;
|
|
499
|
+
}[];
|
|
500
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
501
|
+
readonly status?: string | undefined;
|
|
502
|
+
} | {
|
|
503
|
+
readonly type: "function_call";
|
|
504
|
+
readonly id?: string | undefined;
|
|
505
|
+
readonly call_id: string;
|
|
506
|
+
readonly name: string;
|
|
507
|
+
readonly namespace?: string | undefined;
|
|
508
|
+
readonly arguments: string;
|
|
509
|
+
} | {
|
|
510
|
+
readonly [x: string]: unknown;
|
|
511
|
+
readonly type: "web_search_call";
|
|
512
|
+
readonly id: string;
|
|
513
|
+
readonly status?: string | undefined;
|
|
514
|
+
readonly action?: {
|
|
515
|
+
readonly [x: string]: unknown;
|
|
516
|
+
} | null | undefined;
|
|
517
|
+
} | {
|
|
518
|
+
readonly [x: string]: unknown;
|
|
519
|
+
readonly type: "file_search_call";
|
|
520
|
+
readonly id: string;
|
|
521
|
+
readonly status?: string | undefined;
|
|
522
|
+
readonly queries?: readonly string[] | undefined;
|
|
523
|
+
readonly results?: readonly {
|
|
524
|
+
readonly [x: string]: unknown;
|
|
525
|
+
}[] | null | undefined;
|
|
526
|
+
} | {
|
|
527
|
+
readonly [x: string]: unknown;
|
|
528
|
+
readonly type: "code_interpreter_call";
|
|
529
|
+
readonly id: string;
|
|
530
|
+
readonly status?: string | undefined;
|
|
531
|
+
readonly code?: string | null | undefined;
|
|
532
|
+
readonly container_id?: string | null | undefined;
|
|
533
|
+
readonly outputs?: readonly {
|
|
534
|
+
readonly [x: string]: unknown;
|
|
535
|
+
}[] | null | undefined;
|
|
536
|
+
} | {
|
|
537
|
+
readonly [x: string]: unknown;
|
|
538
|
+
readonly type: "mcp_call";
|
|
539
|
+
readonly id: string;
|
|
540
|
+
readonly status?: string | undefined;
|
|
541
|
+
readonly server_label?: string | undefined;
|
|
542
|
+
readonly name?: string | undefined;
|
|
543
|
+
readonly arguments?: string | undefined;
|
|
544
|
+
readonly output?: string | null | undefined;
|
|
545
|
+
readonly error?: unknown;
|
|
546
|
+
} | {
|
|
547
|
+
readonly [x: string]: unknown;
|
|
548
|
+
readonly type: string;
|
|
549
|
+
readonly id: string;
|
|
550
|
+
})[];
|
|
551
|
+
readonly instructions?: string | undefined;
|
|
552
|
+
readonly tools?: readonly ({
|
|
553
|
+
readonly type: "function";
|
|
554
|
+
readonly name: string;
|
|
555
|
+
readonly description: string;
|
|
556
|
+
readonly parameters: {
|
|
557
|
+
readonly [x: string]: unknown;
|
|
558
|
+
};
|
|
559
|
+
readonly strict?: boolean | undefined;
|
|
560
|
+
} | {
|
|
561
|
+
readonly [x: string]: unknown;
|
|
562
|
+
readonly type: string;
|
|
563
|
+
})[] | undefined;
|
|
564
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
565
|
+
readonly type: "function";
|
|
566
|
+
readonly name: string;
|
|
567
|
+
} | {
|
|
568
|
+
readonly type: "allowed_tools";
|
|
569
|
+
readonly mode: "auto" | "none" | "required";
|
|
570
|
+
readonly tools: readonly {
|
|
571
|
+
readonly type: "function";
|
|
572
|
+
readonly name: string;
|
|
573
|
+
}[];
|
|
574
|
+
} | undefined;
|
|
575
|
+
readonly store?: boolean | undefined;
|
|
576
|
+
readonly metadata?: {
|
|
577
|
+
readonly [x: string]: string;
|
|
578
|
+
} | undefined;
|
|
579
|
+
readonly safety_identifier?: string | undefined;
|
|
580
|
+
readonly stream_options?: {
|
|
581
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
582
|
+
} | undefined;
|
|
583
|
+
readonly top_logprobs?: number | undefined;
|
|
584
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
585
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
586
|
+
readonly prompt_cache_key?: string | undefined;
|
|
587
|
+
readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
|
|
588
|
+
readonly reasoning?: {
|
|
589
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
590
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
591
|
+
} | undefined;
|
|
592
|
+
readonly text?: {
|
|
593
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
594
|
+
} | undefined;
|
|
595
|
+
readonly max_output_tokens?: number | undefined;
|
|
596
|
+
readonly max_tool_calls?: number | undefined;
|
|
597
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
598
|
+
readonly temperature?: number | undefined;
|
|
599
|
+
readonly top_p?: number | undefined;
|
|
600
|
+
readonly presence_penalty?: number | undefined;
|
|
601
|
+
readonly frequency_penalty?: number | undefined;
|
|
602
|
+
readonly stream: true;
|
|
603
603
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
|
|
604
604
|
export declare const configure: (input?: Config) => {
|
|
605
605
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -34,8 +34,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
34
34
|
readonly messages: readonly ({
|
|
35
35
|
readonly role: "user";
|
|
36
36
|
readonly content: readonly ({
|
|
37
|
-
readonly text: string;
|
|
38
|
-
} | {
|
|
39
37
|
readonly cachePoint: {
|
|
40
38
|
readonly type: "default";
|
|
41
39
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
@@ -55,6 +53,8 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
55
53
|
readonly bytes: string;
|
|
56
54
|
};
|
|
57
55
|
};
|
|
56
|
+
} | {
|
|
57
|
+
readonly text: string;
|
|
58
58
|
} | {
|
|
59
59
|
readonly toolResult: {
|
|
60
60
|
readonly toolUseId: string;
|
|
@@ -84,12 +84,18 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
84
84
|
} | {
|
|
85
85
|
readonly role: "assistant";
|
|
86
86
|
readonly content: readonly ({
|
|
87
|
-
readonly text: string;
|
|
88
|
-
} | {
|
|
89
87
|
readonly cachePoint: {
|
|
90
88
|
readonly type: "default";
|
|
91
89
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
92
90
|
};
|
|
91
|
+
} | {
|
|
92
|
+
readonly text: string;
|
|
93
|
+
} | {
|
|
94
|
+
readonly toolUse: {
|
|
95
|
+
readonly toolUseId: string;
|
|
96
|
+
readonly name: string;
|
|
97
|
+
readonly input: unknown;
|
|
98
|
+
};
|
|
93
99
|
} | {
|
|
94
100
|
readonly reasoningContent: {
|
|
95
101
|
readonly reasoningText: {
|
|
@@ -99,21 +105,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
99
105
|
} | {
|
|
100
106
|
readonly redactedContent: string;
|
|
101
107
|
};
|
|
102
|
-
} | {
|
|
103
|
-
readonly toolUse: {
|
|
104
|
-
readonly toolUseId: string;
|
|
105
|
-
readonly name: string;
|
|
106
|
-
readonly input: unknown;
|
|
107
|
-
};
|
|
108
108
|
})[];
|
|
109
109
|
})[];
|
|
110
110
|
readonly system?: readonly ({
|
|
111
|
-
readonly text: string;
|
|
112
|
-
} | {
|
|
113
111
|
readonly cachePoint: {
|
|
114
112
|
readonly type: "default";
|
|
115
113
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
116
114
|
};
|
|
115
|
+
} | {
|
|
116
|
+
readonly text: string;
|
|
117
117
|
})[] | undefined;
|
|
118
118
|
readonly inferenceConfig?: {
|
|
119
119
|
readonly maxTokens?: number | undefined;
|
|
@@ -151,7 +151,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
151
151
|
readonly additionalModelRequestFields?: {
|
|
152
152
|
readonly [x: string]: unknown;
|
|
153
153
|
} | undefined;
|
|
154
|
-
}, import("../route/transport/http.js").HttpPrepared<
|
|
154
|
+
}, import("../route/transport/http.js").HttpPrepared<{
|
|
155
|
+
readonly [x: string]: unknown;
|
|
156
|
+
readonly rawBody: string;
|
|
157
|
+
}>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
155
158
|
export declare const configure: (input?: Config) => {
|
|
156
159
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
157
160
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
@@ -164,23 +164,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
164
164
|
} | {
|
|
165
165
|
readonly role: "assistant";
|
|
166
166
|
readonly content: readonly ({
|
|
167
|
+
readonly type: "compaction";
|
|
168
|
+
readonly content: string | null;
|
|
169
|
+
} | {
|
|
167
170
|
readonly type: "text";
|
|
168
171
|
readonly text: string;
|
|
169
172
|
readonly cache_control?: {
|
|
170
173
|
readonly type: "ephemeral";
|
|
171
174
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
172
175
|
} | undefined;
|
|
173
|
-
} | {
|
|
174
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
175
|
-
readonly tool_use_id: string;
|
|
176
|
-
readonly content: unknown;
|
|
177
|
-
readonly cache_control?: {
|
|
178
|
-
readonly type: "ephemeral";
|
|
179
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
180
|
-
} | undefined;
|
|
181
|
-
} | {
|
|
182
|
-
readonly type: "compaction";
|
|
183
|
-
readonly content: string | null;
|
|
184
176
|
} | {
|
|
185
177
|
readonly type: "thinking";
|
|
186
178
|
readonly thinking: string;
|
|
@@ -214,6 +206,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
214
206
|
readonly type: "ephemeral";
|
|
215
207
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
216
208
|
} | undefined;
|
|
209
|
+
} | {
|
|
210
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
211
|
+
readonly tool_use_id: string;
|
|
212
|
+
readonly content: unknown;
|
|
213
|
+
readonly cache_control?: {
|
|
214
|
+
readonly type: "ephemeral";
|
|
215
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
216
|
+
} | undefined;
|
|
217
217
|
})[];
|
|
218
218
|
} | {
|
|
219
219
|
readonly role: "system";
|
|
@@ -255,6 +255,8 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
255
255
|
readonly top_k?: number | undefined;
|
|
256
256
|
readonly stop_sequences?: readonly string[] | undefined;
|
|
257
257
|
readonly thinking?: {
|
|
258
|
+
readonly type: "between_tools" | "disabled";
|
|
259
|
+
} | {
|
|
258
260
|
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
259
261
|
readonly block_binding?: {
|
|
260
262
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
@@ -267,8 +269,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
267
269
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
268
270
|
} | undefined;
|
|
269
271
|
readonly type: "adaptive";
|
|
270
|
-
} | {
|
|
271
|
-
readonly type: "between_tools" | "disabled";
|
|
272
272
|
} | undefined;
|
|
273
273
|
readonly output_config?: {
|
|
274
274
|
readonly effort?: string | undefined;
|
|
@@ -149,23 +149,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
149
149
|
} | {
|
|
150
150
|
readonly role: "assistant";
|
|
151
151
|
readonly content: readonly ({
|
|
152
|
+
readonly type: "compaction";
|
|
153
|
+
readonly content: string | null;
|
|
154
|
+
} | {
|
|
152
155
|
readonly type: "text";
|
|
153
156
|
readonly text: string;
|
|
154
157
|
readonly cache_control?: {
|
|
155
158
|
readonly type: "ephemeral";
|
|
156
159
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
157
160
|
} | undefined;
|
|
158
|
-
} | {
|
|
159
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
160
|
-
readonly tool_use_id: string;
|
|
161
|
-
readonly content: unknown;
|
|
162
|
-
readonly cache_control?: {
|
|
163
|
-
readonly type: "ephemeral";
|
|
164
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
165
|
-
} | undefined;
|
|
166
|
-
} | {
|
|
167
|
-
readonly type: "compaction";
|
|
168
|
-
readonly content: string | null;
|
|
169
161
|
} | {
|
|
170
162
|
readonly type: "thinking";
|
|
171
163
|
readonly thinking: string;
|
|
@@ -199,6 +191,14 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
199
191
|
readonly type: "ephemeral";
|
|
200
192
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
201
193
|
} | undefined;
|
|
194
|
+
} | {
|
|
195
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
196
|
+
readonly tool_use_id: string;
|
|
197
|
+
readonly content: unknown;
|
|
198
|
+
readonly cache_control?: {
|
|
199
|
+
readonly type: "ephemeral";
|
|
200
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
201
|
+
} | undefined;
|
|
202
202
|
})[];
|
|
203
203
|
} | {
|
|
204
204
|
readonly role: "system";
|
|
@@ -240,6 +240,8 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
240
240
|
readonly top_k?: number | undefined;
|
|
241
241
|
readonly stop_sequences?: readonly string[] | undefined;
|
|
242
242
|
readonly thinking?: {
|
|
243
|
+
readonly type: "between_tools" | "disabled";
|
|
244
|
+
} | {
|
|
243
245
|
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
244
246
|
readonly block_binding?: {
|
|
245
247
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
@@ -252,8 +254,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
252
254
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
253
255
|
} | undefined;
|
|
254
256
|
readonly type: "adaptive";
|
|
255
|
-
} | {
|
|
256
|
-
readonly type: "between_tools" | "disabled";
|
|
257
257
|
} | undefined;
|
|
258
258
|
readonly output_config?: {
|
|
259
259
|
readonly effort?: string | undefined;
|