@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
|
@@ -32,183 +32,6 @@ export type Settings<Options = ChatOptionsInput> = ProviderPackage.Settings & Op
|
|
|
32
32
|
readonly baseURL?: string;
|
|
33
33
|
};
|
|
34
34
|
export declare const routes: (Route<{
|
|
35
|
-
readonly model: string;
|
|
36
|
-
readonly input: readonly ({
|
|
37
|
-
readonly type: "compaction";
|
|
38
|
-
readonly id?: string | null | undefined;
|
|
39
|
-
readonly encrypted_content: string;
|
|
40
|
-
} | {
|
|
41
|
-
readonly type: "configuration_update";
|
|
42
|
-
readonly reasoning: {
|
|
43
|
-
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
44
|
-
};
|
|
45
|
-
} | {
|
|
46
|
-
readonly type: "message";
|
|
47
|
-
readonly role: "system";
|
|
48
|
-
readonly content: string;
|
|
49
|
-
} | {
|
|
50
|
-
readonly type: "message";
|
|
51
|
-
readonly role: "developer";
|
|
52
|
-
readonly content: string;
|
|
53
|
-
} | {
|
|
54
|
-
readonly type: "message";
|
|
55
|
-
readonly role: "user";
|
|
56
|
-
readonly content: readonly ({
|
|
57
|
-
readonly type: "input_image";
|
|
58
|
-
readonly image_url: string;
|
|
59
|
-
readonly detail?: string | undefined;
|
|
60
|
-
} | {
|
|
61
|
-
readonly type: "input_file";
|
|
62
|
-
readonly filename: string;
|
|
63
|
-
readonly detail?: string | undefined;
|
|
64
|
-
readonly file_data?: string | undefined;
|
|
65
|
-
readonly file_url?: string | undefined;
|
|
66
|
-
} | {
|
|
67
|
-
readonly type: "input_text";
|
|
68
|
-
readonly text: string;
|
|
69
|
-
})[];
|
|
70
|
-
readonly id?: string | undefined;
|
|
71
|
-
readonly status?: string | undefined;
|
|
72
|
-
} | {
|
|
73
|
-
readonly type: "message";
|
|
74
|
-
readonly id?: string | undefined;
|
|
75
|
-
readonly role: "assistant";
|
|
76
|
-
readonly content: readonly {
|
|
77
|
-
readonly type: "output_text";
|
|
78
|
-
readonly text: string;
|
|
79
|
-
}[];
|
|
80
|
-
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
81
|
-
readonly status?: string | undefined;
|
|
82
|
-
} | {
|
|
83
|
-
readonly type: "reasoning";
|
|
84
|
-
readonly id?: string | undefined;
|
|
85
|
-
readonly summary: readonly {
|
|
86
|
-
readonly type: "summary_text";
|
|
87
|
-
readonly text: string;
|
|
88
|
-
}[];
|
|
89
|
-
readonly encrypted_content?: string | null | undefined;
|
|
90
|
-
} | {
|
|
91
|
-
readonly type: "function_call";
|
|
92
|
-
readonly id?: string | undefined;
|
|
93
|
-
readonly call_id: string;
|
|
94
|
-
readonly name: string;
|
|
95
|
-
readonly namespace?: string | undefined;
|
|
96
|
-
readonly arguments: string;
|
|
97
|
-
} | {
|
|
98
|
-
readonly type: "function_call_output";
|
|
99
|
-
readonly call_id: string;
|
|
100
|
-
readonly output: string | readonly ({
|
|
101
|
-
readonly type: "input_image";
|
|
102
|
-
readonly image_url: string;
|
|
103
|
-
readonly detail?: string | undefined;
|
|
104
|
-
} | {
|
|
105
|
-
readonly type: "input_file";
|
|
106
|
-
readonly filename: string;
|
|
107
|
-
readonly detail?: string | undefined;
|
|
108
|
-
readonly file_data?: string | undefined;
|
|
109
|
-
readonly file_url?: string | undefined;
|
|
110
|
-
} | {
|
|
111
|
-
readonly type: "input_text";
|
|
112
|
-
readonly text: string;
|
|
113
|
-
} | {
|
|
114
|
-
readonly type: "input_video";
|
|
115
|
-
readonly video_url: string;
|
|
116
|
-
})[];
|
|
117
|
-
} | {
|
|
118
|
-
readonly [x: string]: unknown;
|
|
119
|
-
readonly type: "web_search_call";
|
|
120
|
-
readonly id: string;
|
|
121
|
-
readonly status?: string | undefined;
|
|
122
|
-
readonly action?: {
|
|
123
|
-
readonly [x: string]: unknown;
|
|
124
|
-
} | null | undefined;
|
|
125
|
-
} | {
|
|
126
|
-
readonly [x: string]: unknown;
|
|
127
|
-
readonly type: "file_search_call";
|
|
128
|
-
readonly id: string;
|
|
129
|
-
readonly status?: string | undefined;
|
|
130
|
-
readonly queries?: readonly string[] | undefined;
|
|
131
|
-
readonly results?: readonly {
|
|
132
|
-
readonly [x: string]: unknown;
|
|
133
|
-
}[] | null | undefined;
|
|
134
|
-
} | {
|
|
135
|
-
readonly [x: string]: unknown;
|
|
136
|
-
readonly type: "code_interpreter_call";
|
|
137
|
-
readonly id: string;
|
|
138
|
-
readonly status?: string | undefined;
|
|
139
|
-
readonly code?: string | null | undefined;
|
|
140
|
-
readonly container_id?: string | null | undefined;
|
|
141
|
-
readonly outputs?: readonly {
|
|
142
|
-
readonly [x: string]: unknown;
|
|
143
|
-
}[] | null | undefined;
|
|
144
|
-
} | {
|
|
145
|
-
readonly [x: string]: unknown;
|
|
146
|
-
readonly type: "mcp_call";
|
|
147
|
-
readonly id: string;
|
|
148
|
-
readonly status?: string | undefined;
|
|
149
|
-
readonly server_label?: string | undefined;
|
|
150
|
-
readonly name?: string | undefined;
|
|
151
|
-
readonly arguments?: string | undefined;
|
|
152
|
-
readonly output?: string | null | undefined;
|
|
153
|
-
readonly error?: unknown;
|
|
154
|
-
} | {
|
|
155
|
-
readonly [x: string]: unknown;
|
|
156
|
-
readonly type: string;
|
|
157
|
-
readonly id: string;
|
|
158
|
-
})[];
|
|
159
|
-
readonly instructions?: string | undefined;
|
|
160
|
-
readonly tools?: readonly ({
|
|
161
|
-
readonly type: "function";
|
|
162
|
-
readonly name: string;
|
|
163
|
-
readonly description: string;
|
|
164
|
-
readonly parameters: {
|
|
165
|
-
readonly [x: string]: unknown;
|
|
166
|
-
};
|
|
167
|
-
readonly strict?: boolean | undefined;
|
|
168
|
-
} | {
|
|
169
|
-
readonly [x: string]: unknown;
|
|
170
|
-
readonly type: string;
|
|
171
|
-
})[] | undefined;
|
|
172
|
-
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
173
|
-
readonly type: "function";
|
|
174
|
-
readonly name: string;
|
|
175
|
-
} | {
|
|
176
|
-
readonly type: "allowed_tools";
|
|
177
|
-
readonly mode: "auto" | "none" | "required";
|
|
178
|
-
readonly tools: readonly {
|
|
179
|
-
readonly type: "function";
|
|
180
|
-
readonly name: string;
|
|
181
|
-
}[];
|
|
182
|
-
} | undefined;
|
|
183
|
-
readonly store?: boolean | undefined;
|
|
184
|
-
readonly metadata?: {
|
|
185
|
-
readonly [x: string]: string;
|
|
186
|
-
} | undefined;
|
|
187
|
-
readonly safety_identifier?: string | undefined;
|
|
188
|
-
readonly stream_options?: {
|
|
189
|
-
readonly include_obfuscation?: boolean | undefined;
|
|
190
|
-
} | undefined;
|
|
191
|
-
readonly top_logprobs?: number | undefined;
|
|
192
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
193
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
194
|
-
readonly prompt_cache_key?: string | undefined;
|
|
195
|
-
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
196
|
-
readonly reasoning?: {
|
|
197
|
-
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
198
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
199
|
-
} | undefined;
|
|
200
|
-
readonly text?: {
|
|
201
|
-
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
202
|
-
} | undefined;
|
|
203
|
-
readonly max_output_tokens?: number | undefined;
|
|
204
|
-
readonly max_tool_calls?: number | undefined;
|
|
205
|
-
readonly parallel_tool_calls?: boolean | undefined;
|
|
206
|
-
readonly temperature?: number | undefined;
|
|
207
|
-
readonly top_p?: number | undefined;
|
|
208
|
-
readonly presence_penalty?: number | undefined;
|
|
209
|
-
readonly frequency_penalty?: number | undefined;
|
|
210
|
-
readonly stream: true;
|
|
211
|
-
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
212
35
|
readonly context_management?: {
|
|
213
36
|
readonly edits: readonly {
|
|
214
37
|
readonly type: "compact_20260112";
|
|
@@ -350,23 +173,15 @@ export declare const routes: (Route<{
|
|
|
350
173
|
} | {
|
|
351
174
|
readonly role: "assistant";
|
|
352
175
|
readonly content: readonly ({
|
|
176
|
+
readonly type: "compaction";
|
|
177
|
+
readonly content: string | null;
|
|
178
|
+
} | {
|
|
353
179
|
readonly type: "text";
|
|
354
180
|
readonly text: string;
|
|
355
181
|
readonly cache_control?: {
|
|
356
182
|
readonly type: "ephemeral";
|
|
357
183
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
358
184
|
} | undefined;
|
|
359
|
-
} | {
|
|
360
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
361
|
-
readonly tool_use_id: string;
|
|
362
|
-
readonly content: unknown;
|
|
363
|
-
readonly cache_control?: {
|
|
364
|
-
readonly type: "ephemeral";
|
|
365
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
366
|
-
} | undefined;
|
|
367
|
-
} | {
|
|
368
|
-
readonly type: "compaction";
|
|
369
|
-
readonly content: string | null;
|
|
370
185
|
} | {
|
|
371
186
|
readonly type: "thinking";
|
|
372
187
|
readonly thinking: string;
|
|
@@ -400,6 +215,14 @@ export declare const routes: (Route<{
|
|
|
400
215
|
readonly type: "ephemeral";
|
|
401
216
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
402
217
|
} | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
220
|
+
readonly tool_use_id: string;
|
|
221
|
+
readonly content: unknown;
|
|
222
|
+
readonly cache_control?: {
|
|
223
|
+
readonly type: "ephemeral";
|
|
224
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
225
|
+
} | undefined;
|
|
403
226
|
})[];
|
|
404
227
|
} | {
|
|
405
228
|
readonly role: "system";
|
|
@@ -441,6 +264,8 @@ export declare const routes: (Route<{
|
|
|
441
264
|
readonly top_k?: number | undefined;
|
|
442
265
|
readonly stop_sequences?: readonly string[] | undefined;
|
|
443
266
|
readonly thinking?: {
|
|
267
|
+
readonly type: "between_tools" | "disabled";
|
|
268
|
+
} | {
|
|
444
269
|
readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
|
|
445
270
|
readonly block_binding?: {
|
|
446
271
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
@@ -453,8 +278,6 @@ export declare const routes: (Route<{
|
|
|
453
278
|
readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
|
|
454
279
|
} | undefined;
|
|
455
280
|
readonly type: "adaptive";
|
|
456
|
-
} | {
|
|
457
|
-
readonly type: "between_tools" | "disabled";
|
|
458
281
|
} | undefined;
|
|
459
282
|
readonly output_config?: {
|
|
460
283
|
readonly effort?: string | undefined;
|
|
@@ -482,16 +305,186 @@ export declare const routes: (Route<{
|
|
|
482
305
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
483
306
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
484
307
|
readonly model: string;
|
|
485
|
-
readonly
|
|
308
|
+
readonly input: readonly ({
|
|
309
|
+
readonly type: "configuration_update";
|
|
310
|
+
readonly reasoning: {
|
|
311
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
312
|
+
};
|
|
313
|
+
} | {
|
|
314
|
+
readonly type: "message";
|
|
486
315
|
readonly role: "system";
|
|
487
|
-
readonly content: string
|
|
488
|
-
|
|
316
|
+
readonly content: string;
|
|
317
|
+
} | {
|
|
318
|
+
readonly type: "message";
|
|
319
|
+
readonly role: "developer";
|
|
320
|
+
readonly content: string;
|
|
321
|
+
} | {
|
|
322
|
+
readonly type: "function_call_output";
|
|
323
|
+
readonly call_id: string;
|
|
324
|
+
readonly output: string | readonly ({
|
|
325
|
+
readonly type: "input_text";
|
|
326
|
+
readonly text: string;
|
|
327
|
+
} | {
|
|
328
|
+
readonly type: "input_video";
|
|
329
|
+
readonly video_url: string;
|
|
330
|
+
} | {
|
|
331
|
+
readonly type: "input_image";
|
|
332
|
+
readonly image_url: string;
|
|
333
|
+
readonly detail?: string | undefined;
|
|
334
|
+
} | {
|
|
335
|
+
readonly type: "input_file";
|
|
336
|
+
readonly filename: string;
|
|
337
|
+
readonly detail?: string | undefined;
|
|
338
|
+
readonly file_data?: string | undefined;
|
|
339
|
+
readonly file_url?: string | undefined;
|
|
340
|
+
})[];
|
|
341
|
+
} | {
|
|
342
|
+
readonly type: "reasoning";
|
|
343
|
+
readonly id?: string | undefined;
|
|
344
|
+
readonly summary: readonly {
|
|
345
|
+
readonly type: "summary_text";
|
|
346
|
+
readonly text: string;
|
|
347
|
+
}[];
|
|
348
|
+
readonly encrypted_content?: string | null | undefined;
|
|
349
|
+
} | {
|
|
350
|
+
readonly type: "compaction";
|
|
351
|
+
readonly id?: string | null | undefined;
|
|
352
|
+
readonly encrypted_content: string;
|
|
353
|
+
} | {
|
|
354
|
+
readonly type: "message";
|
|
355
|
+
readonly role: "user";
|
|
356
|
+
readonly content: readonly ({
|
|
357
|
+
readonly type: "input_text";
|
|
489
358
|
readonly text: string;
|
|
490
|
-
readonly cache_control?: {
|
|
491
|
-
readonly type: "ephemeral";
|
|
492
|
-
readonly ttl?: string | undefined;
|
|
493
|
-
} | undefined;
|
|
494
359
|
} | {
|
|
360
|
+
readonly type: "input_image";
|
|
361
|
+
readonly image_url: string;
|
|
362
|
+
readonly detail?: string | undefined;
|
|
363
|
+
} | {
|
|
364
|
+
readonly type: "input_file";
|
|
365
|
+
readonly filename: string;
|
|
366
|
+
readonly detail?: string | undefined;
|
|
367
|
+
readonly file_data?: string | undefined;
|
|
368
|
+
readonly file_url?: string | undefined;
|
|
369
|
+
})[];
|
|
370
|
+
readonly id?: string | undefined;
|
|
371
|
+
readonly status?: string | undefined;
|
|
372
|
+
} | {
|
|
373
|
+
readonly type: "message";
|
|
374
|
+
readonly id?: string | undefined;
|
|
375
|
+
readonly role: "assistant";
|
|
376
|
+
readonly content: readonly {
|
|
377
|
+
readonly type: "output_text";
|
|
378
|
+
readonly text: string;
|
|
379
|
+
}[];
|
|
380
|
+
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
381
|
+
readonly status?: string | undefined;
|
|
382
|
+
} | {
|
|
383
|
+
readonly type: "function_call";
|
|
384
|
+
readonly id?: string | undefined;
|
|
385
|
+
readonly call_id: string;
|
|
386
|
+
readonly name: string;
|
|
387
|
+
readonly namespace?: string | undefined;
|
|
388
|
+
readonly arguments: string;
|
|
389
|
+
} | {
|
|
390
|
+
readonly [x: string]: unknown;
|
|
391
|
+
readonly type: "web_search_call";
|
|
392
|
+
readonly id: string;
|
|
393
|
+
readonly status?: string | undefined;
|
|
394
|
+
readonly action?: {
|
|
395
|
+
readonly [x: string]: unknown;
|
|
396
|
+
} | null | undefined;
|
|
397
|
+
} | {
|
|
398
|
+
readonly [x: string]: unknown;
|
|
399
|
+
readonly type: "file_search_call";
|
|
400
|
+
readonly id: string;
|
|
401
|
+
readonly status?: string | undefined;
|
|
402
|
+
readonly queries?: readonly string[] | undefined;
|
|
403
|
+
readonly results?: readonly {
|
|
404
|
+
readonly [x: string]: unknown;
|
|
405
|
+
}[] | null | undefined;
|
|
406
|
+
} | {
|
|
407
|
+
readonly [x: string]: unknown;
|
|
408
|
+
readonly type: "code_interpreter_call";
|
|
409
|
+
readonly id: string;
|
|
410
|
+
readonly status?: string | undefined;
|
|
411
|
+
readonly code?: string | null | undefined;
|
|
412
|
+
readonly container_id?: string | null | undefined;
|
|
413
|
+
readonly outputs?: readonly {
|
|
414
|
+
readonly [x: string]: unknown;
|
|
415
|
+
}[] | null | undefined;
|
|
416
|
+
} | {
|
|
417
|
+
readonly [x: string]: unknown;
|
|
418
|
+
readonly type: "mcp_call";
|
|
419
|
+
readonly id: string;
|
|
420
|
+
readonly status?: string | undefined;
|
|
421
|
+
readonly server_label?: string | undefined;
|
|
422
|
+
readonly name?: string | undefined;
|
|
423
|
+
readonly arguments?: string | undefined;
|
|
424
|
+
readonly output?: string | null | undefined;
|
|
425
|
+
readonly error?: unknown;
|
|
426
|
+
} | {
|
|
427
|
+
readonly [x: string]: unknown;
|
|
428
|
+
readonly type: string;
|
|
429
|
+
readonly id: string;
|
|
430
|
+
})[];
|
|
431
|
+
readonly instructions?: string | undefined;
|
|
432
|
+
readonly tools?: readonly ({
|
|
433
|
+
readonly type: "function";
|
|
434
|
+
readonly name: string;
|
|
435
|
+
readonly description: string;
|
|
436
|
+
readonly parameters: {
|
|
437
|
+
readonly [x: string]: unknown;
|
|
438
|
+
};
|
|
439
|
+
readonly strict?: boolean | undefined;
|
|
440
|
+
} | {
|
|
441
|
+
readonly [x: string]: unknown;
|
|
442
|
+
readonly type: string;
|
|
443
|
+
})[] | undefined;
|
|
444
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
445
|
+
readonly type: "function";
|
|
446
|
+
readonly name: string;
|
|
447
|
+
} | {
|
|
448
|
+
readonly type: "allowed_tools";
|
|
449
|
+
readonly mode: "auto" | "none" | "required";
|
|
450
|
+
readonly tools: readonly {
|
|
451
|
+
readonly type: "function";
|
|
452
|
+
readonly name: string;
|
|
453
|
+
}[];
|
|
454
|
+
} | undefined;
|
|
455
|
+
readonly store?: boolean | undefined;
|
|
456
|
+
readonly metadata?: {
|
|
457
|
+
readonly [x: string]: string;
|
|
458
|
+
} | undefined;
|
|
459
|
+
readonly safety_identifier?: string | undefined;
|
|
460
|
+
readonly stream_options?: {
|
|
461
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
462
|
+
} | undefined;
|
|
463
|
+
readonly top_logprobs?: number | undefined;
|
|
464
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
465
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
466
|
+
readonly prompt_cache_key?: string | undefined;
|
|
467
|
+
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;
|
|
468
|
+
readonly reasoning?: {
|
|
469
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
470
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
471
|
+
} | undefined;
|
|
472
|
+
readonly text?: {
|
|
473
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
readonly max_output_tokens?: number | undefined;
|
|
476
|
+
readonly max_tool_calls?: number | undefined;
|
|
477
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
478
|
+
readonly temperature?: number | undefined;
|
|
479
|
+
readonly top_p?: number | undefined;
|
|
480
|
+
readonly presence_penalty?: number | undefined;
|
|
481
|
+
readonly frequency_penalty?: number | undefined;
|
|
482
|
+
readonly stream: true;
|
|
483
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
484
|
+
readonly model: string;
|
|
485
|
+
readonly messages: readonly ({
|
|
486
|
+
readonly role: "system";
|
|
487
|
+
readonly content: string | readonly ({
|
|
495
488
|
readonly type: "image_url";
|
|
496
489
|
readonly image_url: {
|
|
497
490
|
readonly url: string;
|
|
@@ -502,17 +495,17 @@ export declare const routes: (Route<{
|
|
|
502
495
|
readonly filename: string;
|
|
503
496
|
readonly file_data: string;
|
|
504
497
|
};
|
|
505
|
-
}
|
|
506
|
-
} | {
|
|
507
|
-
readonly role: "user";
|
|
508
|
-
readonly content: string | readonly ({
|
|
498
|
+
} | {
|
|
509
499
|
readonly type: "text";
|
|
510
500
|
readonly text: string;
|
|
511
501
|
readonly cache_control?: {
|
|
512
502
|
readonly type: "ephemeral";
|
|
513
503
|
readonly ttl?: string | undefined;
|
|
514
504
|
} | undefined;
|
|
515
|
-
}
|
|
505
|
+
})[];
|
|
506
|
+
} | {
|
|
507
|
+
readonly role: "user";
|
|
508
|
+
readonly content: string | readonly ({
|
|
516
509
|
readonly type: "image_url";
|
|
517
510
|
readonly image_url: {
|
|
518
511
|
readonly url: string;
|
|
@@ -523,6 +516,13 @@ export declare const routes: (Route<{
|
|
|
523
516
|
readonly filename: string;
|
|
524
517
|
readonly file_data: string;
|
|
525
518
|
};
|
|
519
|
+
} | {
|
|
520
|
+
readonly type: "text";
|
|
521
|
+
readonly text: string;
|
|
522
|
+
readonly cache_control?: {
|
|
523
|
+
readonly type: "ephemeral";
|
|
524
|
+
readonly ttl?: string | undefined;
|
|
525
|
+
} | undefined;
|
|
526
526
|
})[];
|
|
527
527
|
} | {
|
|
528
528
|
readonly role: "tool";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -18,10 +18,6 @@ export type Settings = ProviderPackage.Settings & OpenResponsesProviderOptionsIn
|
|
|
18
18
|
export declare const routes: import("../route/client.js").Route<{
|
|
19
19
|
readonly model: string;
|
|
20
20
|
readonly input: readonly ({
|
|
21
|
-
readonly type: "compaction";
|
|
22
|
-
readonly id?: string | null | undefined;
|
|
23
|
-
readonly encrypted_content: string;
|
|
24
|
-
} | {
|
|
25
21
|
readonly type: "configuration_update";
|
|
26
22
|
readonly reasoning: {
|
|
27
23
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
@@ -34,10 +30,45 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
34
30
|
readonly type: "message";
|
|
35
31
|
readonly role: "developer";
|
|
36
32
|
readonly content: string;
|
|
33
|
+
} | {
|
|
34
|
+
readonly type: "function_call_output";
|
|
35
|
+
readonly call_id: string;
|
|
36
|
+
readonly output: string | readonly ({
|
|
37
|
+
readonly type: "input_text";
|
|
38
|
+
readonly text: string;
|
|
39
|
+
} | {
|
|
40
|
+
readonly type: "input_video";
|
|
41
|
+
readonly video_url: string;
|
|
42
|
+
} | {
|
|
43
|
+
readonly type: "input_image";
|
|
44
|
+
readonly image_url: string;
|
|
45
|
+
readonly detail?: string | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
readonly type: "input_file";
|
|
48
|
+
readonly filename: string;
|
|
49
|
+
readonly detail?: string | undefined;
|
|
50
|
+
readonly file_data?: string | undefined;
|
|
51
|
+
readonly file_url?: string | undefined;
|
|
52
|
+
})[];
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: "reasoning";
|
|
55
|
+
readonly id?: string | undefined;
|
|
56
|
+
readonly summary: readonly {
|
|
57
|
+
readonly type: "summary_text";
|
|
58
|
+
readonly text: string;
|
|
59
|
+
}[];
|
|
60
|
+
readonly encrypted_content?: string | null | undefined;
|
|
61
|
+
} | {
|
|
62
|
+
readonly type: "compaction";
|
|
63
|
+
readonly id?: string | null | undefined;
|
|
64
|
+
readonly encrypted_content: string;
|
|
37
65
|
} | {
|
|
38
66
|
readonly type: "message";
|
|
39
67
|
readonly role: "user";
|
|
40
68
|
readonly content: readonly ({
|
|
69
|
+
readonly type: "input_text";
|
|
70
|
+
readonly text: string;
|
|
71
|
+
} | {
|
|
41
72
|
readonly type: "input_image";
|
|
42
73
|
readonly image_url: string;
|
|
43
74
|
readonly detail?: string | undefined;
|
|
@@ -47,9 +78,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
47
78
|
readonly detail?: string | undefined;
|
|
48
79
|
readonly file_data?: string | undefined;
|
|
49
80
|
readonly file_url?: string | undefined;
|
|
50
|
-
} | {
|
|
51
|
-
readonly type: "input_text";
|
|
52
|
-
readonly text: string;
|
|
53
81
|
})[];
|
|
54
82
|
readonly id?: string | undefined;
|
|
55
83
|
readonly status?: string | undefined;
|
|
@@ -63,14 +91,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
63
91
|
}[];
|
|
64
92
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
65
93
|
readonly status?: string | undefined;
|
|
66
|
-
} | {
|
|
67
|
-
readonly type: "reasoning";
|
|
68
|
-
readonly id?: string | undefined;
|
|
69
|
-
readonly summary: readonly {
|
|
70
|
-
readonly type: "summary_text";
|
|
71
|
-
readonly text: string;
|
|
72
|
-
}[];
|
|
73
|
-
readonly encrypted_content?: string | null | undefined;
|
|
74
94
|
} | {
|
|
75
95
|
readonly type: "function_call";
|
|
76
96
|
readonly id?: string | undefined;
|
|
@@ -78,26 +98,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
78
98
|
readonly name: string;
|
|
79
99
|
readonly namespace?: string | undefined;
|
|
80
100
|
readonly arguments: string;
|
|
81
|
-
} | {
|
|
82
|
-
readonly type: "function_call_output";
|
|
83
|
-
readonly call_id: string;
|
|
84
|
-
readonly output: string | readonly ({
|
|
85
|
-
readonly type: "input_image";
|
|
86
|
-
readonly image_url: string;
|
|
87
|
-
readonly detail?: string | undefined;
|
|
88
|
-
} | {
|
|
89
|
-
readonly type: "input_file";
|
|
90
|
-
readonly filename: string;
|
|
91
|
-
readonly detail?: string | undefined;
|
|
92
|
-
readonly file_data?: string | undefined;
|
|
93
|
-
readonly file_url?: string | undefined;
|
|
94
|
-
} | {
|
|
95
|
-
readonly type: "input_text";
|
|
96
|
-
readonly text: string;
|
|
97
|
-
} | {
|
|
98
|
-
readonly type: "input_video";
|
|
99
|
-
readonly video_url: string;
|
|
100
|
-
})[];
|
|
101
101
|
} | {
|
|
102
102
|
readonly [x: string]: unknown;
|
|
103
103
|
readonly type: "web_search_call";
|
|
@@ -174,15 +174,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
174
174
|
} | undefined;
|
|
175
175
|
readonly top_logprobs?: number | undefined;
|
|
176
176
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
177
|
-
readonly service_tier?: import("../
|
|
177
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
178
178
|
readonly prompt_cache_key?: string | undefined;
|
|
179
|
-
readonly include?: readonly import("../
|
|
179
|
+
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;
|
|
180
180
|
readonly reasoning?: {
|
|
181
181
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
182
182
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
183
183
|
} | undefined;
|
|
184
184
|
readonly text?: {
|
|
185
|
-
readonly verbosity?: import("../
|
|
185
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
186
186
|
} | undefined;
|
|
187
187
|
readonly max_output_tokens?: number | undefined;
|
|
188
188
|
readonly max_tool_calls?: number | undefined;
|
|
@@ -19,13 +19,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
19
19
|
readonly messages: readonly ({
|
|
20
20
|
readonly role: "system";
|
|
21
21
|
readonly content: string | readonly ({
|
|
22
|
-
readonly type: "text";
|
|
23
|
-
readonly text: string;
|
|
24
|
-
readonly cache_control?: {
|
|
25
|
-
readonly type: "ephemeral";
|
|
26
|
-
readonly ttl?: string | undefined;
|
|
27
|
-
} | undefined;
|
|
28
|
-
} | {
|
|
29
22
|
readonly type: "image_url";
|
|
30
23
|
readonly image_url: {
|
|
31
24
|
readonly url: string;
|
|
@@ -36,17 +29,17 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
36
29
|
readonly filename: string;
|
|
37
30
|
readonly file_data: string;
|
|
38
31
|
};
|
|
39
|
-
}
|
|
40
|
-
} | {
|
|
41
|
-
readonly role: "user";
|
|
42
|
-
readonly content: string | readonly ({
|
|
32
|
+
} | {
|
|
43
33
|
readonly type: "text";
|
|
44
34
|
readonly text: string;
|
|
45
35
|
readonly cache_control?: {
|
|
46
36
|
readonly type: "ephemeral";
|
|
47
37
|
readonly ttl?: string | undefined;
|
|
48
38
|
} | undefined;
|
|
49
|
-
}
|
|
39
|
+
})[];
|
|
40
|
+
} | {
|
|
41
|
+
readonly role: "user";
|
|
42
|
+
readonly content: string | readonly ({
|
|
50
43
|
readonly type: "image_url";
|
|
51
44
|
readonly image_url: {
|
|
52
45
|
readonly url: string;
|
|
@@ -57,6 +50,13 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
57
50
|
readonly filename: string;
|
|
58
51
|
readonly file_data: string;
|
|
59
52
|
};
|
|
53
|
+
} | {
|
|
54
|
+
readonly type: "text";
|
|
55
|
+
readonly text: string;
|
|
56
|
+
readonly cache_control?: {
|
|
57
|
+
readonly type: "ephemeral";
|
|
58
|
+
readonly ttl?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
60
|
})[];
|
|
61
61
|
} | {
|
|
62
62
|
readonly role: "tool";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ProviderOptions } from "../schema/index.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type { Options } from "../protocols/utils/open-responses-options.js";
|
|
2
|
+
import type { Options, ResponseIncludable, ServiceTier } from "../protocols/utils/open-responses-options.js";
|
|
4
3
|
import type { ContextManagement } from "../protocols/openai-responses.js";
|
|
5
|
-
export type
|
|
4
|
+
export type OpenAIResponseIncludable = ResponseIncludable;
|
|
5
|
+
export type OpenAIServiceTier = ServiceTier | "scale" | "fast" | "ultrafast";
|
|
6
6
|
export type OpenAIOptionsInput = Omit<Options, "serviceTier"> & {
|
|
7
7
|
/** Advanced in-band compaction. The caller owns checkpoint persistence and recovery. */
|
|
8
8
|
readonly contextManagement?: ContextManagement;
|
|
@@ -17,4 +17,3 @@ export declare const withOpenAIOptions: <Options extends {
|
|
|
17
17
|
}>(modelID: string, options: Options) => Omit<Options, "providerOptions"> & {
|
|
18
18
|
readonly providerOptions?: ProviderOptions;
|
|
19
19
|
};
|
|
20
|
-
export * as OpenAIProviderOptions from "./openai-options.js";
|