@opencode/ai 2.0.31 → 2.1.0
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/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +47 -0
- package/dist/experimental/realtime.js +99 -0
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.js +1 -0
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/gemini.js +11 -1
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -49,11 +49,47 @@ interface State {
|
|
|
49
49
|
}
|
|
50
50
|
export declare const compatibility: {
|
|
51
51
|
maxTokensField: "max_completion_tokens";
|
|
52
|
-
supportsStore: false;
|
|
53
52
|
supportsPromptCacheKey: true;
|
|
54
53
|
};
|
|
55
54
|
export declare const protocol: Protocol<{
|
|
56
55
|
readonly model: string;
|
|
56
|
+
readonly tools?: readonly {
|
|
57
|
+
readonly type: "function";
|
|
58
|
+
readonly function: {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly description: string;
|
|
61
|
+
readonly parameters: {
|
|
62
|
+
readonly [x: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
readonly strict?: boolean | undefined;
|
|
65
|
+
};
|
|
66
|
+
readonly cache_control?: {
|
|
67
|
+
readonly type: "ephemeral";
|
|
68
|
+
readonly ttl?: string | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
readonly function: {
|
|
74
|
+
readonly name: string;
|
|
75
|
+
};
|
|
76
|
+
} | undefined;
|
|
77
|
+
readonly stream: true;
|
|
78
|
+
readonly stream_options?: {
|
|
79
|
+
readonly include_usage: boolean;
|
|
80
|
+
} | undefined;
|
|
81
|
+
readonly store?: boolean | undefined;
|
|
82
|
+
readonly prompt_cache_key?: string | undefined;
|
|
83
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
84
|
+
readonly tool_stream?: boolean | undefined;
|
|
85
|
+
readonly max_completion_tokens?: number | undefined;
|
|
86
|
+
readonly max_tokens?: number | undefined;
|
|
87
|
+
readonly temperature?: number | undefined;
|
|
88
|
+
readonly top_p?: number | undefined;
|
|
89
|
+
readonly frequency_penalty?: number | undefined;
|
|
90
|
+
readonly presence_penalty?: number | undefined;
|
|
91
|
+
readonly seed?: number | undefined;
|
|
92
|
+
readonly stop?: readonly string[] | undefined;
|
|
57
93
|
readonly messages: readonly ({
|
|
58
94
|
readonly role: "system";
|
|
59
95
|
readonly content: string | readonly ({
|
|
@@ -109,6 +145,7 @@ export declare const protocol: Protocol<{
|
|
|
109
145
|
}[];
|
|
110
146
|
} | {
|
|
111
147
|
readonly [x: string]: unknown;
|
|
148
|
+
readonly role: "assistant";
|
|
112
149
|
readonly content: string | readonly {
|
|
113
150
|
readonly type: "text";
|
|
114
151
|
readonly text: string;
|
|
@@ -117,161 +154,123 @@ export declare const protocol: Protocol<{
|
|
|
117
154
|
readonly ttl?: string | undefined;
|
|
118
155
|
} | undefined;
|
|
119
156
|
}[] | null;
|
|
120
|
-
readonly role: "assistant";
|
|
121
|
-
readonly reasoning?: string | undefined;
|
|
122
157
|
readonly reasoning_content?: string | undefined;
|
|
158
|
+
readonly reasoning?: string | undefined;
|
|
123
159
|
readonly reasoning_text?: string | undefined;
|
|
160
|
+
readonly reasoning_details?: unknown;
|
|
124
161
|
readonly tool_calls?: readonly {
|
|
162
|
+
readonly id: string;
|
|
163
|
+
readonly type: "function";
|
|
125
164
|
readonly function: {
|
|
126
165
|
readonly name: string;
|
|
127
166
|
readonly arguments: string;
|
|
128
167
|
};
|
|
129
|
-
readonly id: string;
|
|
130
|
-
readonly type: "function";
|
|
131
|
-
readonly thought_signature?: string | undefined;
|
|
132
168
|
readonly extra_content?: {
|
|
133
169
|
readonly google: {
|
|
134
170
|
readonly thought_signature: string;
|
|
135
171
|
};
|
|
136
172
|
} | undefined;
|
|
173
|
+
readonly thought_signature?: string | undefined;
|
|
137
174
|
}[] | undefined;
|
|
138
175
|
readonly thought_signature?: string | undefined;
|
|
139
|
-
readonly reasoning_details?: unknown;
|
|
140
176
|
})[];
|
|
141
|
-
readonly stream: true;
|
|
142
|
-
readonly venice_parameters: {
|
|
143
|
-
readonly [x: string]: string | boolean;
|
|
144
|
-
};
|
|
145
177
|
readonly reasoning?: {
|
|
178
|
+
readonly effort?: string | undefined;
|
|
146
179
|
readonly enabled?: boolean | undefined;
|
|
147
180
|
readonly summary?: string | undefined;
|
|
148
|
-
readonly effort?: string | undefined;
|
|
149
181
|
} | undefined;
|
|
150
|
-
readonly
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
readonly tools?: readonly {
|
|
154
|
-
readonly function: {
|
|
155
|
-
readonly description: string;
|
|
156
|
-
readonly name: string;
|
|
157
|
-
readonly parameters: {
|
|
158
|
-
readonly [x: string]: unknown;
|
|
159
|
-
};
|
|
160
|
-
readonly strict?: boolean | undefined;
|
|
161
|
-
};
|
|
162
|
-
readonly type: "function";
|
|
163
|
-
readonly cache_control?: {
|
|
164
|
-
readonly type: "ephemeral";
|
|
165
|
-
readonly ttl?: string | undefined;
|
|
166
|
-
} | undefined;
|
|
167
|
-
}[] | undefined;
|
|
168
|
-
readonly stop?: readonly string[] | undefined;
|
|
169
|
-
readonly user?: string | undefined;
|
|
170
|
-
readonly seed?: number | undefined;
|
|
171
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
172
|
-
readonly type: "function";
|
|
173
|
-
readonly function: {
|
|
174
|
-
readonly name: string;
|
|
175
|
-
};
|
|
176
|
-
} | undefined;
|
|
177
|
-
readonly top_p?: number | undefined;
|
|
178
|
-
readonly top_k?: number | undefined;
|
|
179
|
-
readonly frequency_penalty?: number | undefined;
|
|
180
|
-
readonly presence_penalty?: number | undefined;
|
|
181
|
-
readonly store?: boolean | undefined;
|
|
182
|
-
readonly prompt_cache_key?: string | undefined;
|
|
183
|
-
readonly parallel_tool_calls?: boolean | undefined;
|
|
184
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
185
|
-
readonly stream_options?: {
|
|
186
|
-
readonly include_usage: boolean;
|
|
187
|
-
} | undefined;
|
|
188
|
-
readonly tool_stream?: boolean | undefined;
|
|
189
|
-
readonly top_logprobs?: number | undefined;
|
|
182
|
+
readonly venice_parameters: {
|
|
183
|
+
readonly [x: string]: string | boolean;
|
|
184
|
+
};
|
|
190
185
|
readonly prompt_cache_retention?: string | undefined;
|
|
191
|
-
readonly
|
|
192
|
-
readonly response_format?: {
|
|
193
|
-
readonly [x: string]: unknown;
|
|
194
|
-
} | undefined;
|
|
195
|
-
readonly logprobs?: boolean | undefined;
|
|
186
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
196
187
|
readonly min_p?: number | undefined;
|
|
188
|
+
readonly top_k?: number | undefined;
|
|
189
|
+
readonly repetition_penalty?: number | undefined;
|
|
197
190
|
readonly stop_token_ids?: readonly number[] | undefined;
|
|
191
|
+
readonly logprobs?: boolean | undefined;
|
|
192
|
+
readonly top_logprobs?: number | undefined;
|
|
198
193
|
readonly max_temp?: number | undefined;
|
|
199
194
|
readonly min_temp?: number | undefined;
|
|
195
|
+
readonly response_format?: {
|
|
196
|
+
readonly [x: string]: unknown;
|
|
197
|
+
} | undefined;
|
|
198
|
+
readonly user?: string | undefined;
|
|
200
199
|
}, string, "[DONE]" | {
|
|
201
200
|
readonly [x: string]: unknown;
|
|
202
|
-
readonly
|
|
203
|
-
readonly [x: string]: unknown;
|
|
204
|
-
readonly message: string;
|
|
205
|
-
readonly code?: string | number | null | undefined;
|
|
206
|
-
} | null | undefined;
|
|
207
|
-
readonly usage?: {
|
|
201
|
+
readonly choices?: readonly {
|
|
208
202
|
readonly [x: string]: unknown;
|
|
209
|
-
readonly
|
|
210
|
-
readonly
|
|
211
|
-
readonly
|
|
212
|
-
readonly prompt_tokens?: number | null | undefined;
|
|
213
|
-
readonly completion_tokens?: number | null | undefined;
|
|
214
|
-
readonly prompt_tokens_details?: {
|
|
203
|
+
readonly finish_reason?: string | null | undefined;
|
|
204
|
+
readonly native_finish_reason?: string | null | undefined;
|
|
205
|
+
readonly usage?: {
|
|
215
206
|
readonly [x: string]: unknown;
|
|
216
|
-
readonly
|
|
207
|
+
readonly prompt_tokens?: number | null | undefined;
|
|
208
|
+
readonly completion_tokens?: number | null | undefined;
|
|
209
|
+
readonly total_tokens?: number | null | undefined;
|
|
217
210
|
readonly cached_tokens?: number | null | undefined;
|
|
218
|
-
readonly
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
readonly
|
|
211
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
212
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
213
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
214
|
+
readonly prompt_tokens_details?: {
|
|
215
|
+
readonly [x: string]: unknown;
|
|
216
|
+
readonly cached_tokens?: number | null | undefined;
|
|
217
|
+
readonly cache_write_tokens?: number | null | undefined;
|
|
218
|
+
} | null | undefined;
|
|
219
|
+
readonly completion_tokens_details?: {
|
|
220
|
+
readonly [x: string]: unknown;
|
|
221
|
+
readonly reasoning_tokens?: number | null | undefined;
|
|
222
|
+
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
223
|
+
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
224
|
+
} | null | undefined;
|
|
227
225
|
} | null | undefined;
|
|
228
|
-
} | null | undefined;
|
|
229
|
-
readonly choices?: readonly {
|
|
230
|
-
readonly [x: string]: unknown;
|
|
231
226
|
readonly delta?: {
|
|
232
227
|
readonly [x: string]: unknown;
|
|
233
|
-
readonly reasoning?: string | null | undefined;
|
|
234
|
-
readonly reasoning_content?: string | null | undefined;
|
|
235
|
-
readonly reasoning_text?: string | null | undefined;
|
|
236
228
|
readonly content?: string | null | undefined;
|
|
237
229
|
readonly refusal?: string | null | undefined;
|
|
230
|
+
readonly reasoning_content?: string | null | undefined;
|
|
231
|
+
readonly reasoning?: string | null | undefined;
|
|
232
|
+
readonly reasoning_text?: string | null | undefined;
|
|
233
|
+
readonly reasoning_details?: unknown;
|
|
238
234
|
readonly tool_calls?: readonly {
|
|
235
|
+
readonly index?: number | null | undefined;
|
|
236
|
+
readonly id?: string | null | undefined;
|
|
239
237
|
readonly function?: {
|
|
240
238
|
readonly name?: string | null | undefined;
|
|
241
239
|
readonly arguments?: string | null | undefined;
|
|
242
240
|
} | null | undefined;
|
|
243
|
-
readonly id?: string | null | undefined;
|
|
244
|
-
readonly index?: number | null | undefined;
|
|
245
|
-
readonly thought_signature?: string | null | undefined;
|
|
246
241
|
readonly extra_content?: unknown;
|
|
242
|
+
readonly thought_signature?: string | null | undefined;
|
|
247
243
|
}[] | null | undefined;
|
|
248
244
|
readonly thought_signature?: string | null | undefined;
|
|
249
|
-
readonly reasoning_details?: unknown;
|
|
250
245
|
} | null | undefined;
|
|
251
|
-
|
|
246
|
+
}[] | null | undefined;
|
|
247
|
+
readonly usage?: {
|
|
248
|
+
readonly [x: string]: unknown;
|
|
249
|
+
readonly prompt_tokens?: number | null | undefined;
|
|
250
|
+
readonly completion_tokens?: number | null | undefined;
|
|
251
|
+
readonly total_tokens?: number | null | undefined;
|
|
252
|
+
readonly cached_tokens?: number | null | undefined;
|
|
253
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
254
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
255
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
256
|
+
readonly completion_tokens_details?: {
|
|
257
|
+
readonly [x: string]: unknown;
|
|
258
|
+
readonly reasoning_tokens?: number | null | undefined;
|
|
259
|
+
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
260
|
+
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
261
|
+
} | null | undefined;
|
|
262
|
+
readonly prompt_tokens_details?: {
|
|
252
263
|
readonly [x: string]: unknown;
|
|
253
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
254
264
|
readonly cached_tokens?: number | null | undefined;
|
|
255
|
-
readonly
|
|
256
|
-
readonly
|
|
257
|
-
readonly completion_tokens?: number | null | undefined;
|
|
258
|
-
readonly prompt_tokens_details?: {
|
|
259
|
-
readonly [x: string]: unknown;
|
|
260
|
-
readonly cached_tokens?: number | null | undefined;
|
|
261
|
-
readonly cache_write_tokens?: number | null | undefined;
|
|
262
|
-
} | null | undefined;
|
|
263
|
-
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
264
|
-
readonly cache_created_input_tokens?: number | null | undefined;
|
|
265
|
-
readonly completion_tokens_details?: {
|
|
266
|
-
readonly [x: string]: unknown;
|
|
267
|
-
readonly reasoning_tokens?: number | null | undefined;
|
|
268
|
-
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
269
|
-
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
270
|
-
} | null | undefined;
|
|
265
|
+
readonly cache_write_tokens?: number | null | undefined;
|
|
266
|
+
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
271
267
|
} | null | undefined;
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
268
|
+
} | null | undefined;
|
|
269
|
+
readonly error?: string | {
|
|
270
|
+
readonly [x: string]: unknown;
|
|
271
|
+
readonly code?: string | number | null | undefined;
|
|
272
|
+
readonly message: string;
|
|
273
|
+
} | null | undefined;
|
|
275
274
|
readonly issues?: readonly {
|
|
276
275
|
readonly message: string;
|
|
277
276
|
readonly path?: readonly (string | number)[] | undefined;
|
|
@@ -260,7 +260,6 @@ const onHalt = Effect.fn("VeniceChat.onHalt")(function* (state) {
|
|
|
260
260
|
});
|
|
261
261
|
export const compatibility = {
|
|
262
262
|
maxTokensField: "max_completion_tokens",
|
|
263
|
-
supportsStore: false,
|
|
264
263
|
supportsPromptCacheKey: true,
|
|
265
264
|
};
|
|
266
265
|
export const protocol = Protocol.make({
|
|
@@ -16,5 +16,5 @@ export declare const protocol: MediaProtocol.Inline<Request, ImageResponse>;
|
|
|
16
16
|
export declare const model: (input: MediaRoute.ModelInput) => ImageModel<XAIImageOptions>;
|
|
17
17
|
export declare const XAIImages: {
|
|
18
18
|
readonly protocol: MediaProtocol.Inline<Request, ImageResponse>;
|
|
19
|
-
readonly model:
|
|
19
|
+
readonly model: typeof model;
|
|
20
20
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { Protocol } from "../route/protocol.js";
|
|
2
2
|
import { OpenResponses } from "./open-responses.js";
|
|
3
3
|
export declare const protocol: Protocol<{
|
|
4
|
+
readonly model: string;
|
|
4
5
|
readonly input: readonly ({
|
|
5
6
|
readonly [x: string]: unknown;
|
|
6
|
-
readonly id: string;
|
|
7
7
|
readonly type: "web_search_call";
|
|
8
|
+
readonly id: string;
|
|
8
9
|
readonly status?: string | undefined;
|
|
9
10
|
readonly action?: {
|
|
10
11
|
readonly [x: string]: unknown;
|
|
11
12
|
} | null | undefined;
|
|
12
13
|
} | {
|
|
13
14
|
readonly [x: string]: unknown;
|
|
14
|
-
readonly id: string;
|
|
15
15
|
readonly type: "file_search_call";
|
|
16
|
+
readonly id: string;
|
|
16
17
|
readonly status?: string | undefined;
|
|
17
18
|
readonly queries?: readonly string[] | undefined;
|
|
18
19
|
readonly results?: readonly {
|
|
@@ -20,8 +21,8 @@ export declare const protocol: Protocol<{
|
|
|
20
21
|
}[] | null | undefined;
|
|
21
22
|
} | {
|
|
22
23
|
readonly [x: string]: unknown;
|
|
23
|
-
readonly id: string;
|
|
24
24
|
readonly type: "code_interpreter_call";
|
|
25
|
+
readonly id: string;
|
|
25
26
|
readonly status?: string | undefined;
|
|
26
27
|
readonly code?: string | null | undefined;
|
|
27
28
|
readonly container_id?: string | null | undefined;
|
|
@@ -30,14 +31,14 @@ export declare const protocol: Protocol<{
|
|
|
30
31
|
}[] | null | undefined;
|
|
31
32
|
} | {
|
|
32
33
|
readonly [x: string]: unknown;
|
|
33
|
-
readonly id: string;
|
|
34
34
|
readonly type: "mcp_call";
|
|
35
|
+
readonly id: string;
|
|
35
36
|
readonly status?: string | undefined;
|
|
37
|
+
readonly server_label?: string | undefined;
|
|
36
38
|
readonly name?: string | undefined;
|
|
39
|
+
readonly arguments?: string | undefined;
|
|
37
40
|
readonly output?: string | null | undefined;
|
|
38
41
|
readonly error?: unknown;
|
|
39
|
-
readonly arguments?: string | undefined;
|
|
40
|
-
readonly server_label?: string | undefined;
|
|
41
42
|
} | {
|
|
42
43
|
readonly type: "configuration_update";
|
|
43
44
|
readonly reasoning: {
|
|
@@ -47,18 +48,10 @@ export declare const protocol: Protocol<{
|
|
|
47
48
|
readonly [x: string]: unknown;
|
|
48
49
|
readonly type: string;
|
|
49
50
|
readonly id: string;
|
|
50
|
-
} | {
|
|
51
|
-
readonly type: "reasoning";
|
|
52
|
-
readonly summary: readonly {
|
|
53
|
-
readonly type: "summary_text";
|
|
54
|
-
readonly text: string;
|
|
55
|
-
}[];
|
|
56
|
-
readonly id?: string | undefined;
|
|
57
|
-
readonly encrypted_content?: string | null | undefined;
|
|
58
51
|
} | {
|
|
59
52
|
readonly type: "compaction";
|
|
60
|
-
readonly encrypted_content: string;
|
|
61
53
|
readonly id?: string | null | undefined;
|
|
54
|
+
readonly encrypted_content: string;
|
|
62
55
|
} | {
|
|
63
56
|
readonly type: "message";
|
|
64
57
|
readonly role: "system";
|
|
@@ -69,6 +62,7 @@ export declare const protocol: Protocol<{
|
|
|
69
62
|
readonly content: string;
|
|
70
63
|
} | {
|
|
71
64
|
readonly type: "message";
|
|
65
|
+
readonly role: "user";
|
|
72
66
|
readonly content: readonly ({
|
|
73
67
|
readonly type: "input_image";
|
|
74
68
|
readonly image_url: string;
|
|
@@ -83,26 +77,33 @@ export declare const protocol: Protocol<{
|
|
|
83
77
|
readonly type: "input_text";
|
|
84
78
|
readonly text: string;
|
|
85
79
|
})[];
|
|
86
|
-
readonly role: "user";
|
|
87
80
|
readonly id?: string | undefined;
|
|
88
81
|
readonly status?: string | undefined;
|
|
89
82
|
} | {
|
|
90
83
|
readonly type: "message";
|
|
84
|
+
readonly id?: string | undefined;
|
|
85
|
+
readonly role: "assistant";
|
|
91
86
|
readonly content: readonly {
|
|
92
87
|
readonly type: "output_text";
|
|
93
88
|
readonly text: string;
|
|
94
89
|
}[];
|
|
95
|
-
readonly role: "assistant";
|
|
96
|
-
readonly id?: string | undefined;
|
|
97
|
-
readonly status?: string | undefined;
|
|
98
90
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
91
|
+
readonly status?: string | undefined;
|
|
92
|
+
} | {
|
|
93
|
+
readonly type: "reasoning";
|
|
94
|
+
readonly id?: string | undefined;
|
|
95
|
+
readonly summary: readonly {
|
|
96
|
+
readonly type: "summary_text";
|
|
97
|
+
readonly text: string;
|
|
98
|
+
}[];
|
|
99
|
+
readonly encrypted_content?: string | null | undefined;
|
|
99
100
|
} | {
|
|
100
101
|
readonly type: "function_call";
|
|
101
|
-
readonly name: string;
|
|
102
|
-
readonly arguments: string;
|
|
103
|
-
readonly call_id: string;
|
|
104
102
|
readonly id?: string | undefined;
|
|
103
|
+
readonly call_id: string;
|
|
104
|
+
readonly name: string;
|
|
105
105
|
readonly namespace?: string | undefined;
|
|
106
|
+
readonly arguments: string;
|
|
106
107
|
} | {
|
|
107
108
|
readonly type: "function_call_output";
|
|
108
109
|
readonly call_id: string;
|
|
@@ -124,116 +125,115 @@ export declare const protocol: Protocol<{
|
|
|
124
125
|
readonly video_url: string;
|
|
125
126
|
})[];
|
|
126
127
|
})[];
|
|
127
|
-
readonly model: string;
|
|
128
|
-
readonly stream: true;
|
|
129
|
-
readonly metadata?: {
|
|
130
|
-
readonly [x: string]: string;
|
|
131
|
-
} | undefined;
|
|
132
128
|
readonly instructions?: string | undefined;
|
|
133
|
-
readonly reasoning?: {
|
|
134
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
135
|
-
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
136
|
-
} | undefined;
|
|
137
|
-
readonly temperature?: number | undefined;
|
|
138
129
|
readonly tools?: readonly ({
|
|
139
130
|
readonly [x: string]: unknown;
|
|
140
131
|
readonly type: string;
|
|
141
132
|
} | {
|
|
142
133
|
readonly type: "function";
|
|
143
|
-
readonly description: string;
|
|
144
134
|
readonly name: string;
|
|
135
|
+
readonly description: string;
|
|
145
136
|
readonly parameters: {
|
|
146
137
|
readonly [x: string]: unknown;
|
|
147
138
|
};
|
|
148
139
|
readonly strict?: boolean | undefined;
|
|
149
140
|
})[] | undefined;
|
|
150
|
-
readonly
|
|
151
|
-
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
152
|
-
} | undefined;
|
|
153
|
-
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
154
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
141
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
155
142
|
readonly type: "function";
|
|
156
143
|
readonly name: string;
|
|
157
144
|
} | {
|
|
158
145
|
readonly type: "allowed_tools";
|
|
159
|
-
readonly mode: "
|
|
146
|
+
readonly mode: "auto" | "none" | "required";
|
|
160
147
|
readonly tools: readonly {
|
|
161
148
|
readonly type: "function";
|
|
162
149
|
readonly name: string;
|
|
163
150
|
}[];
|
|
164
151
|
} | undefined;
|
|
165
|
-
readonly top_p?: number | undefined;
|
|
166
|
-
readonly frequency_penalty?: number | undefined;
|
|
167
|
-
readonly presence_penalty?: number | undefined;
|
|
168
152
|
readonly store?: boolean | undefined;
|
|
169
|
-
readonly
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
readonly
|
|
173
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
153
|
+
readonly metadata?: {
|
|
154
|
+
readonly [x: string]: string;
|
|
155
|
+
} | undefined;
|
|
156
|
+
readonly safety_identifier?: string | undefined;
|
|
174
157
|
readonly stream_options?: {
|
|
175
158
|
readonly include_obfuscation?: boolean | undefined;
|
|
176
159
|
} | undefined;
|
|
177
|
-
readonly safety_identifier?: string | undefined;
|
|
178
160
|
readonly top_logprobs?: number | undefined;
|
|
161
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
162
|
+
readonly service_tier?: import("./utils/open-responses-options.js").ServiceTier | undefined;
|
|
163
|
+
readonly prompt_cache_key?: string | undefined;
|
|
164
|
+
readonly include?: readonly import("./utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
165
|
+
readonly reasoning?: {
|
|
166
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
167
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
readonly text?: {
|
|
170
|
+
readonly verbosity?: import("./utils/open-responses-options.js").TextVerbosity | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
readonly max_output_tokens?: number | undefined;
|
|
179
173
|
readonly max_tool_calls?: number | undefined;
|
|
174
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
175
|
+
readonly temperature?: number | undefined;
|
|
176
|
+
readonly top_p?: number | undefined;
|
|
177
|
+
readonly presence_penalty?: number | undefined;
|
|
178
|
+
readonly frequency_penalty?: number | undefined;
|
|
179
|
+
readonly stream: true;
|
|
180
180
|
}, string, {
|
|
181
181
|
readonly [x: string]: unknown;
|
|
182
182
|
readonly type: string;
|
|
183
|
-
readonly
|
|
184
|
-
readonly
|
|
185
|
-
readonly code?: unknown;
|
|
183
|
+
readonly delta?: string | undefined;
|
|
184
|
+
readonly arguments?: string | undefined;
|
|
186
185
|
readonly text?: string | undefined;
|
|
187
|
-
readonly
|
|
186
|
+
readonly item_id?: string | undefined;
|
|
187
|
+
readonly output_index?: number | undefined;
|
|
188
|
+
readonly summary_index?: number | undefined;
|
|
189
|
+
readonly item?: {
|
|
190
|
+
readonly [x: string]: unknown;
|
|
191
|
+
readonly type: string;
|
|
192
|
+
readonly id?: string | undefined;
|
|
193
|
+
readonly call_id?: string | undefined;
|
|
194
|
+
readonly name?: string | undefined;
|
|
195
|
+
readonly namespace?: string | undefined;
|
|
196
|
+
readonly arguments?: string | undefined;
|
|
197
|
+
readonly encrypted_content?: string | null | undefined;
|
|
198
|
+
} | null | undefined;
|
|
188
199
|
readonly response?: {
|
|
189
200
|
readonly [x: string]: unknown;
|
|
190
201
|
readonly id?: string | undefined;
|
|
202
|
+
readonly service_tier?: string | null | undefined;
|
|
203
|
+
readonly incomplete_details?: {
|
|
204
|
+
readonly reason?: string | undefined;
|
|
205
|
+
} | null | undefined;
|
|
191
206
|
readonly output?: readonly {
|
|
192
207
|
readonly [x: string]: unknown;
|
|
193
208
|
readonly type: string;
|
|
194
209
|
readonly id?: string | undefined;
|
|
210
|
+
readonly call_id?: string | undefined;
|
|
195
211
|
readonly name?: string | undefined;
|
|
196
|
-
readonly namespace?: string |
|
|
212
|
+
readonly namespace?: string | undefined;
|
|
197
213
|
readonly arguments?: string | undefined;
|
|
198
|
-
readonly call_id?: string | undefined;
|
|
199
214
|
readonly encrypted_content?: string | null | undefined;
|
|
200
215
|
}[] | undefined;
|
|
201
|
-
readonly error?: unknown;
|
|
202
216
|
readonly usage?: {
|
|
203
217
|
readonly [x: string]: unknown;
|
|
204
218
|
readonly input_tokens?: number | undefined;
|
|
219
|
+
readonly input_tokens_details?: {
|
|
220
|
+
readonly [x: string]: unknown;
|
|
221
|
+
readonly cached_tokens?: number | undefined;
|
|
222
|
+
readonly cache_write_tokens?: number | undefined;
|
|
223
|
+
} | null | undefined;
|
|
205
224
|
readonly output_tokens?: number | undefined;
|
|
206
225
|
readonly output_tokens_details?: {
|
|
207
226
|
readonly [x: string]: unknown;
|
|
208
227
|
readonly reasoning_tokens?: number | undefined;
|
|
209
228
|
} | null | undefined;
|
|
210
229
|
readonly total_tokens?: number | undefined;
|
|
211
|
-
readonly input_tokens_details?: {
|
|
212
|
-
readonly [x: string]: unknown;
|
|
213
|
-
readonly cached_tokens?: number | undefined;
|
|
214
|
-
readonly cache_write_tokens?: number | undefined;
|
|
215
|
-
} | null | undefined;
|
|
216
|
-
} | null | undefined;
|
|
217
|
-
readonly service_tier?: string | null | undefined;
|
|
218
|
-
readonly incomplete_details?: {
|
|
219
|
-
readonly reason?: string | undefined;
|
|
220
230
|
} | null | undefined;
|
|
231
|
+
readonly error?: unknown;
|
|
221
232
|
} | undefined;
|
|
222
|
-
readonly
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
readonly name?: string | undefined;
|
|
227
|
-
readonly namespace?: string | null | undefined;
|
|
228
|
-
readonly arguments?: string | undefined;
|
|
229
|
-
readonly call_id?: string | undefined;
|
|
230
|
-
readonly encrypted_content?: string | null | undefined;
|
|
231
|
-
} | null | undefined;
|
|
232
|
-
readonly delta?: string | undefined;
|
|
233
|
-
readonly arguments?: string | undefined;
|
|
234
|
-
readonly item_id?: string | undefined;
|
|
235
|
-
readonly output_index?: number | undefined;
|
|
236
|
-
readonly summary_index?: number | undefined;
|
|
233
|
+
readonly code?: unknown;
|
|
234
|
+
readonly message?: unknown;
|
|
235
|
+
readonly error?: unknown;
|
|
236
|
+
readonly status?: unknown;
|
|
237
237
|
readonly status_code?: unknown;
|
|
238
238
|
}, OpenResponses.ParserState>;
|
|
239
239
|
export declare const compact: import("../route/client.js").CompactOperation;
|