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