@opencode/ai 2.1.4 → 2.2.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/README.md +283 -114
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -1
- package/dist/cache-policy.d.ts +4 -0
- package/dist/cache-policy.js +20 -6
- package/dist/decision-client.d.ts +21 -0
- package/dist/decision-client.js +55 -0
- package/dist/decision.d.ts +472 -0
- package/dist/decision.js +158 -0
- package/dist/effect.d.ts +38 -0
- package/dist/effect.js +27 -0
- package/dist/effort-updates.d.ts +2 -2
- package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
- package/dist/experimental/cloudflare-run-extraction.js +83 -0
- package/dist/experimental/extraction.d.ts +183 -0
- package/dist/experimental/extraction.js +102 -0
- package/dist/experimental/realtime.d.ts +7 -2
- package/dist/experimental/realtime.js +5 -5
- package/dist/experimental.d.ts +2 -3
- package/dist/experimental.js +1 -2
- package/dist/image-client.d.ts +5 -14
- package/dist/image-client.js +0 -1
- package/dist/image.d.ts +6 -176
- package/dist/image.js +4 -11
- package/dist/index.d.ts +1426 -34
- package/dist/index.js +127 -24
- package/dist/llm.d.ts +16 -1
- package/dist/llm.js +34 -0
- package/dist/media-client.d.ts +2 -1
- package/dist/media-model.d.ts +3 -0
- package/dist/media-model.js +4 -1
- package/dist/media.d.ts +0 -7
- package/dist/media.js +0 -6
- package/dist/protocols/alibaba-chat.d.ts +20 -0
- package/dist/protocols/alibaba-images.d.ts +22 -0
- package/dist/protocols/alibaba-images.js +77 -0
- package/dist/protocols/alibaba-messages.d.ts +52 -17
- package/dist/protocols/alibaba-responses.d.ts +6 -3
- package/dist/protocols/anthropic-messages.d.ts +160 -54
- package/dist/protocols/anthropic-messages.js +44 -13
- package/dist/protocols/bedrock-converse.d.ts +110 -15
- package/dist/protocols/bedrock-converse.js +112 -15
- package/dist/protocols/bedrock-event-stream.js +1 -0
- package/dist/protocols/bfl-images.d.ts +9 -0
- package/dist/protocols/bfl-images.js +17 -15
- package/dist/protocols/cartesia-speech.d.ts +0 -18
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
- package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
- package/dist/protocols/deepgram-speech.d.ts +0 -18
- package/dist/protocols/elevenlabs-speech.d.ts +0 -18
- package/dist/protocols/fal-images.d.ts +10 -1
- package/dist/protocols/fal-images.js +16 -25
- package/dist/protocols/fal-video.js +1 -1
- package/dist/protocols/gemini.d.ts +3 -0
- package/dist/protocols/gemini.js +11 -6
- package/dist/protocols/google-images.d.ts +2 -2
- package/dist/protocols/google-images.js +8 -37
- package/dist/protocols/google-interactions.d.ts +4 -0
- package/dist/protocols/google-interactions.js +12 -5
- package/dist/protocols/google-speech.d.ts +0 -18
- package/dist/protocols/google-speech.js +0 -1
- package/dist/protocols/google-transcription.d.ts +0 -18
- package/dist/protocols/google-transcription.js +0 -1
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/google-video.js +2 -7
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/meta-images.d.ts +7 -1
- package/dist/protocols/meta-images.js +10 -8
- package/dist/protocols/meta-messages.d.ts +52 -17
- package/dist/protocols/meta-messages.js +14 -1
- package/dist/protocols/meta-responses.d.ts +6 -0
- package/dist/protocols/meta-responses.js +29 -1
- package/dist/protocols/open-responses.d.ts +30 -0
- package/dist/protocols/open-responses.js +8 -18
- package/dist/protocols/openai-chat.d.ts +713 -1
- package/dist/protocols/openai-chat.js +35 -22
- package/dist/protocols/openai-compatible-chat.d.ts +22 -1
- package/dist/protocols/openai-compatible-responses.d.ts +8 -5
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +128 -0
- package/dist/protocols/openai-images.d.ts +21 -24
- package/dist/protocols/openai-images.js +100 -34
- package/dist/protocols/openai-responses.d.ts +82 -24
- package/dist/protocols/openai-responses.js +32 -2
- package/dist/protocols/openai-speech.d.ts +0 -18
- package/dist/protocols/openai-speech.js +15 -5
- package/dist/protocols/openai-transcription.d.ts +0 -18
- package/dist/protocols/openai-transcription.js +3 -4
- package/dist/protocols/replicate-images.js +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/runway-video.js +1 -1
- package/dist/protocols/shared.d.ts +9 -1
- package/dist/protocols/shared.js +13 -2
- package/dist/protocols/stability-images.d.ts +5 -0
- package/dist/protocols/stability-images.js +4 -9
- package/dist/protocols/system-one.d.ts +101 -0
- package/dist/protocols/system-one.js +230 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.js +7 -6
- package/dist/protocols/utils/cache.d.ts +14 -3
- package/dist/protocols/utils/cache.js +11 -4
- package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
- package/dist/protocols/utils/gemini-generate-content.js +10 -16
- package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
- package/dist/protocols/utils/gemini-json-schema.js +3 -3
- package/dist/protocols/utils/image-sizing.d.ts +31 -0
- package/dist/protocols/utils/image-sizing.js +73 -0
- package/dist/protocols/utils/media-input.d.ts +4 -5
- package/dist/protocols/utils/media-input.js +8 -5
- package/dist/protocols/utils/speech-stream.d.ts +0 -1
- package/dist/protocols/utils/speech-stream.js +0 -1
- package/dist/protocols/utils/tool-schema.js +15 -5
- package/dist/protocols/utils/tool-stream.d.ts +9 -0
- package/dist/protocols/venice-chat.d.ts +19 -0
- package/dist/protocols/venice-chat.js +1 -1
- package/dist/protocols/xai-images.d.ts +1 -2
- package/dist/protocols/xai-images.js +9 -2
- package/dist/protocols/xai-responses.d.ts +10 -0
- package/dist/protocols/xai-responses.js +28 -2
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/xai-video.js +11 -8
- package/dist/protocols/zai-chat.d.ts +21 -0
- package/dist/protocols/zai-images.d.ts +3 -1
- package/dist/protocols/zai-images.js +12 -11
- package/dist/protocols/zai-messages.d.ts +52 -17
- package/dist/provider-error.js +19 -4
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba.d.ts +79 -18
- package/dist/providers/alibaba.js +16 -8
- package/dist/providers/amazon-bedrock-mantle.d.ts +197 -138
- package/dist/providers/amazon-bedrock.d.ts +34 -14
- package/dist/providers/amazon-bedrock.js +11 -11
- package/dist/providers/anthropic-compatible.d.ts +52 -17
- package/dist/providers/anthropic.d.ts +52 -17
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure.d.ts +50 -9
- package/dist/providers/azure.js +19 -1
- package/dist/providers/baseten/decisions.d.ts +2 -0
- package/dist/providers/baseten/decisions.js +1 -0
- package/dist/providers/baseten.d.ts +51 -1
- package/dist/providers/baseten.js +41 -8
- package/dist/providers/cerebras.d.ts +42 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +177 -43
- package/dist/providers/cloudflare-ai-gateway.js +32 -4
- package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
- package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/images.js +1 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +55 -1
- package/dist/providers/cloudflare-workers-ai.js +45 -9
- package/dist/providers/cohere.d.ts +42 -0
- package/dist/providers/deepinfra.d.ts +42 -0
- package/dist/providers/deepseek.d.ts +42 -0
- package/dist/providers/digitalocean/decisions.d.ts +2 -0
- package/dist/providers/digitalocean/decisions.js +1 -0
- package/dist/providers/digitalocean/images.d.ts +2 -0
- package/dist/providers/digitalocean/images.js +1 -0
- package/dist/providers/digitalocean.d.ts +72 -1
- package/dist/providers/digitalocean.js +39 -8
- package/dist/providers/fireworks.d.ts +42 -0
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google-vertex/images.d.ts +2 -0
- package/dist/providers/google-vertex/images.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +21 -0
- package/dist/providers/google-vertex-messages.d.ts +52 -17
- package/dist/providers/google-vertex-responses.d.ts +3 -0
- package/dist/providers/google-vertex.d.ts +3 -1
- package/dist/providers/google-vertex.js +30 -13
- package/dist/providers/google.d.ts +5 -4
- package/dist/providers/google.js +15 -8
- package/dist/providers/groq.d.ts +42 -4
- package/dist/providers/groq.js +0 -6
- package/dist/providers/meta.d.ts +197 -138
- package/dist/providers/minimax.d.ts +76 -17
- package/dist/providers/moonshot.d.ts +76 -17
- package/dist/providers/openai/images.d.ts +2 -0
- package/dist/providers/openai/images.js +1 -0
- package/dist/providers/openai-compatible/images.d.ts +2 -0
- package/dist/providers/openai-compatible/images.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +3 -0
- package/dist/providers/openai-compatible.d.ts +24 -1
- package/dist/providers/openai-compatible.js +21 -9
- package/dist/providers/openai-options.d.ts +3 -1
- package/dist/providers/openai.d.ts +46 -9
- package/dist/providers/openai.js +20 -4
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +9 -10
- package/dist/providers/opencode.js +10 -8
- package/dist/providers/openrouter/decisions.d.ts +2 -0
- package/dist/providers/openrouter/decisions.js +1 -0
- package/dist/providers/openrouter/images.d.ts +2 -0
- package/dist/providers/openrouter/images.js +1 -0
- package/dist/providers/openrouter.d.ts +92 -11
- package/dist/providers/openrouter.js +38 -16
- package/dist/providers/togetherai.d.ts +42 -0
- package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
- package/dist/providers/typesafe-ai/decisions.js +1 -0
- package/dist/providers/typesafe-ai.d.ts +9 -10
- package/dist/providers/typesafe-ai.js +10 -8
- package/dist/providers/venice.d.ts +19 -0
- package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
- package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/images.js +1 -0
- package/dist/providers/vercel-ai-gateway.d.ts +10 -16
- package/dist/providers/vercel-ai-gateway.js +31 -85
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai.d.ts +28 -5
- package/dist/providers/xai.js +15 -8
- package/dist/providers/zai/images.d.ts +2 -0
- package/dist/providers/zai/images.js +1 -0
- package/dist/providers/zai-coding-plan.d.ts +76 -17
- package/dist/providers/zai.d.ts +26 -4
- package/dist/providers/zai.js +15 -8
- package/dist/route/client.d.ts +2 -2
- package/dist/route/client.js +26 -4
- package/dist/route/decision.d.ts +58 -0
- package/dist/route/decision.js +75 -0
- package/dist/route/executor.d.ts +1 -1
- package/dist/route/framing.d.ts +2 -0
- package/dist/route/index.d.ts +3 -0
- package/dist/route/index.js +3 -0
- package/dist/route/media-protocol.d.ts +1 -0
- package/dist/route/media-protocol.js +12 -8
- package/dist/route/media.d.ts +5 -1
- package/dist/route/media.js +6 -2
- package/dist/route/transport/http.js +1 -0
- package/dist/route/transport/index.d.ts +1 -0
- package/dist/schema/events.d.ts +148 -6
- package/dist/schema/events.js +20 -0
- package/dist/schema/messages.d.ts +6 -2
- package/dist/schema/messages.js +3 -0
- package/dist/schema/options.d.ts +5 -3
- package/dist/schema/options.js +8 -3
- package/dist/speech-client.d.ts +5 -14
- package/dist/speech-client.js +0 -1
- package/dist/speech.d.ts +0 -135
- package/dist/speech.js +2 -4
- package/dist/testing.d.ts +25 -24
- package/dist/testing.js +3 -21
- package/dist/transcription-client.d.ts +5 -14
- package/dist/transcription.d.ts +0 -135
- package/dist/transcription.js +1 -1
- package/dist/utils/media-type.js +22 -1
- package/dist/video-client.d.ts +5 -14
- package/dist/video-client.js +0 -1
- package/dist/video.d.ts +1 -136
- package/dist/video.js +3 -5
- package/package.json +513 -11
- package/dist/experimental/evaluation-client.d.ts +0 -21
- package/dist/experimental/evaluation-client.js +0 -64
- package/dist/experimental/evaluation.d.ts +0 -242
- package/dist/experimental/evaluation.js +0 -108
- package/dist/experimental/system-one.d.ts +0 -16
- package/dist/experimental/system-one.js +0 -135
- package/dist/promise.d.ts +0 -1021
- package/dist/promise.js +0 -101
- package/dist/provider.d.ts +0 -23
- package/dist/provider.js +0 -2
|
@@ -2,7 +2,7 @@ import type { Config, Redacted } from "effect";
|
|
|
2
2
|
import type { ProviderPackage } from "../provider-package.js";
|
|
3
3
|
import type { AtLeastOne, ProviderAuthOption } from "../route/auth-options.js";
|
|
4
4
|
import type { RouteDefaultsInput } from "../route/client.js";
|
|
5
|
-
import { type ModelID } from "../schema/index.js";
|
|
5
|
+
import { type ModelID, type ProviderOptions } from "../schema/index.js";
|
|
6
6
|
import type { OpenAIProviderOptionsInput } from "./openai-options.js";
|
|
7
7
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
8
|
export declare const authEnvVars: readonly ["CLOUDFLARE_API_TOKEN", "CF_AIG_TOKEN"];
|
|
@@ -27,6 +27,8 @@ export type Settings = ProviderPackage.Settings & OpenAIProviderOptionsInput & G
|
|
|
27
27
|
readonly gatewayApiKey?: string;
|
|
28
28
|
};
|
|
29
29
|
export declare const baseURL: (input: GatewayURL) => string;
|
|
30
|
+
/** The Run API (`/ai/run`) next to the OpenAI-compatible `/ai/v1` base. */
|
|
31
|
+
export declare const runBaseURL: (input: GatewayURL) => string;
|
|
30
32
|
export declare const responsesRoute: import("../route/client.js").Route<{
|
|
31
33
|
readonly model: string;
|
|
32
34
|
readonly input: readonly ({
|
|
@@ -80,6 +82,9 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
80
82
|
readonly content: readonly ({
|
|
81
83
|
readonly type: "input_text";
|
|
82
84
|
readonly text: string;
|
|
85
|
+
} | {
|
|
86
|
+
readonly type: "input_video";
|
|
87
|
+
readonly video_url: string;
|
|
83
88
|
} | {
|
|
84
89
|
readonly type: "input_image";
|
|
85
90
|
readonly image_url: string;
|
|
@@ -166,10 +171,6 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
166
171
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
167
172
|
readonly prompt_cache_key?: string | undefined;
|
|
168
173
|
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;
|
|
169
|
-
readonly reasoning?: {
|
|
170
|
-
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
171
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
172
|
-
} | undefined;
|
|
173
174
|
readonly text?: {
|
|
174
175
|
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
175
176
|
} | undefined;
|
|
@@ -180,6 +181,10 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
180
181
|
readonly top_p?: number | undefined;
|
|
181
182
|
readonly presence_penalty?: number | undefined;
|
|
182
183
|
readonly frequency_penalty?: number | undefined;
|
|
184
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
185
|
+
readonly prompt_cache_options?: {
|
|
186
|
+
readonly ttl?: string | undefined;
|
|
187
|
+
} | undefined;
|
|
183
188
|
readonly tools?: readonly ({
|
|
184
189
|
readonly type: "namespace";
|
|
185
190
|
readonly name: string;
|
|
@@ -225,6 +230,12 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
225
230
|
} | {
|
|
226
231
|
readonly type: "image_generation";
|
|
227
232
|
} | undefined;
|
|
233
|
+
readonly reasoning?: {
|
|
234
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
235
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
236
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
237
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
238
|
+
} | undefined;
|
|
228
239
|
readonly context_management?: readonly {
|
|
229
240
|
readonly type: "compaction";
|
|
230
241
|
readonly compact_threshold?: number | undefined;
|
|
@@ -252,7 +263,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
252
263
|
readonly text: string;
|
|
253
264
|
readonly cache_control?: {
|
|
254
265
|
readonly type: "ephemeral";
|
|
255
|
-
readonly ttl?:
|
|
266
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
256
267
|
} | undefined;
|
|
257
268
|
}[] | undefined;
|
|
258
269
|
readonly messages: readonly ({
|
|
@@ -262,7 +273,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
262
273
|
readonly text: string;
|
|
263
274
|
readonly cache_control?: {
|
|
264
275
|
readonly type: "ephemeral";
|
|
265
|
-
readonly ttl?:
|
|
276
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
266
277
|
} | undefined;
|
|
267
278
|
} | {
|
|
268
279
|
readonly type: "image";
|
|
@@ -279,11 +290,28 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
279
290
|
};
|
|
280
291
|
readonly cache_control?: {
|
|
281
292
|
readonly type: "ephemeral";
|
|
282
|
-
readonly ttl?:
|
|
293
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
283
294
|
} | undefined;
|
|
284
295
|
readonly transformations?: {
|
|
285
296
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
286
297
|
} | undefined;
|
|
298
|
+
} | {
|
|
299
|
+
readonly type: "video";
|
|
300
|
+
readonly source: {
|
|
301
|
+
readonly type: "base64";
|
|
302
|
+
readonly media_type: string;
|
|
303
|
+
readonly data: string;
|
|
304
|
+
} | {
|
|
305
|
+
readonly type: "url";
|
|
306
|
+
readonly url: string;
|
|
307
|
+
} | {
|
|
308
|
+
readonly type: "file";
|
|
309
|
+
readonly file_id: string;
|
|
310
|
+
};
|
|
311
|
+
readonly cache_control?: {
|
|
312
|
+
readonly type: "ephemeral";
|
|
313
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
314
|
+
} | undefined;
|
|
287
315
|
} | {
|
|
288
316
|
readonly type: "document";
|
|
289
317
|
readonly source: {
|
|
@@ -303,7 +331,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
303
331
|
};
|
|
304
332
|
readonly cache_control?: {
|
|
305
333
|
readonly type: "ephemeral";
|
|
306
|
-
readonly ttl?:
|
|
334
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
307
335
|
} | undefined;
|
|
308
336
|
readonly title?: string | undefined;
|
|
309
337
|
readonly context?: string | undefined;
|
|
@@ -318,7 +346,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
318
346
|
readonly text: string;
|
|
319
347
|
readonly cache_control?: {
|
|
320
348
|
readonly type: "ephemeral";
|
|
321
|
-
readonly ttl?:
|
|
349
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
322
350
|
} | undefined;
|
|
323
351
|
} | {
|
|
324
352
|
readonly type: "image";
|
|
@@ -335,11 +363,28 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
335
363
|
};
|
|
336
364
|
readonly cache_control?: {
|
|
337
365
|
readonly type: "ephemeral";
|
|
338
|
-
readonly ttl?:
|
|
366
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
339
367
|
} | undefined;
|
|
340
368
|
readonly transformations?: {
|
|
341
369
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
342
370
|
} | undefined;
|
|
371
|
+
} | {
|
|
372
|
+
readonly type: "video";
|
|
373
|
+
readonly source: {
|
|
374
|
+
readonly type: "base64";
|
|
375
|
+
readonly media_type: string;
|
|
376
|
+
readonly data: string;
|
|
377
|
+
} | {
|
|
378
|
+
readonly type: "url";
|
|
379
|
+
readonly url: string;
|
|
380
|
+
} | {
|
|
381
|
+
readonly type: "file";
|
|
382
|
+
readonly file_id: string;
|
|
383
|
+
};
|
|
384
|
+
readonly cache_control?: {
|
|
385
|
+
readonly type: "ephemeral";
|
|
386
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
387
|
+
} | undefined;
|
|
343
388
|
} | {
|
|
344
389
|
readonly type: "document";
|
|
345
390
|
readonly source: {
|
|
@@ -359,7 +404,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
359
404
|
};
|
|
360
405
|
readonly cache_control?: {
|
|
361
406
|
readonly type: "ephemeral";
|
|
362
|
-
readonly ttl?:
|
|
407
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
363
408
|
} | undefined;
|
|
364
409
|
readonly title?: string | undefined;
|
|
365
410
|
readonly context?: string | undefined;
|
|
@@ -370,7 +415,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
370
415
|
readonly is_error?: boolean | undefined;
|
|
371
416
|
readonly cache_control?: {
|
|
372
417
|
readonly type: "ephemeral";
|
|
373
|
-
readonly ttl?:
|
|
418
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
374
419
|
} | undefined;
|
|
375
420
|
})[];
|
|
376
421
|
} | {
|
|
@@ -383,7 +428,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
383
428
|
readonly text: string;
|
|
384
429
|
readonly cache_control?: {
|
|
385
430
|
readonly type: "ephemeral";
|
|
386
|
-
readonly ttl?:
|
|
431
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
387
432
|
} | undefined;
|
|
388
433
|
} | {
|
|
389
434
|
readonly type: "thinking";
|
|
@@ -391,14 +436,14 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
391
436
|
readonly signature: string;
|
|
392
437
|
readonly cache_control?: {
|
|
393
438
|
readonly type: "ephemeral";
|
|
394
|
-
readonly ttl?:
|
|
439
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
395
440
|
} | undefined;
|
|
396
441
|
} | {
|
|
397
442
|
readonly type: "redacted_thinking";
|
|
398
443
|
readonly data: string;
|
|
399
444
|
readonly cache_control?: {
|
|
400
445
|
readonly type: "ephemeral";
|
|
401
|
-
readonly ttl?:
|
|
446
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
402
447
|
} | undefined;
|
|
403
448
|
} | {
|
|
404
449
|
readonly type: "tool_use";
|
|
@@ -407,7 +452,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
407
452
|
readonly input: unknown;
|
|
408
453
|
readonly cache_control?: {
|
|
409
454
|
readonly type: "ephemeral";
|
|
410
|
-
readonly ttl?:
|
|
455
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
411
456
|
} | undefined;
|
|
412
457
|
} | {
|
|
413
458
|
readonly type: "server_tool_use";
|
|
@@ -416,7 +461,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
416
461
|
readonly input: unknown;
|
|
417
462
|
readonly cache_control?: {
|
|
418
463
|
readonly type: "ephemeral";
|
|
419
|
-
readonly ttl?:
|
|
464
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
420
465
|
} | undefined;
|
|
421
466
|
} | {
|
|
422
467
|
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
@@ -424,7 +469,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
424
469
|
readonly content: unknown;
|
|
425
470
|
readonly cache_control?: {
|
|
426
471
|
readonly type: "ephemeral";
|
|
427
|
-
readonly ttl?:
|
|
472
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
428
473
|
} | undefined;
|
|
429
474
|
})[];
|
|
430
475
|
} | {
|
|
@@ -434,7 +479,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
434
479
|
readonly text: string;
|
|
435
480
|
readonly cache_control?: {
|
|
436
481
|
readonly type: "ephemeral";
|
|
437
|
-
readonly ttl?:
|
|
482
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
438
483
|
} | undefined;
|
|
439
484
|
}[];
|
|
440
485
|
readonly output_config?: {
|
|
@@ -449,7 +494,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
449
494
|
};
|
|
450
495
|
readonly cache_control?: {
|
|
451
496
|
readonly type: "ephemeral";
|
|
452
|
-
readonly ttl?:
|
|
497
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
453
498
|
} | undefined;
|
|
454
499
|
}[] | undefined;
|
|
455
500
|
readonly tool_choice?: {
|
|
@@ -493,7 +538,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
493
538
|
} | undefined;
|
|
494
539
|
readonly cache_control?: {
|
|
495
540
|
readonly type: "ephemeral";
|
|
496
|
-
readonly ttl?:
|
|
541
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
497
542
|
} | undefined;
|
|
498
543
|
readonly container?: string | {
|
|
499
544
|
readonly id?: string | null | undefined;
|
|
@@ -506,6 +551,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
506
551
|
readonly user_id?: string | null | undefined;
|
|
507
552
|
} | undefined;
|
|
508
553
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
554
|
+
readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
|
|
509
555
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
510
556
|
export declare const route: import("../route/client.js").Route<{
|
|
511
557
|
readonly model: string;
|
|
@@ -516,6 +562,11 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
516
562
|
readonly image_url: {
|
|
517
563
|
readonly url: string;
|
|
518
564
|
};
|
|
565
|
+
} | {
|
|
566
|
+
readonly type: "video_url";
|
|
567
|
+
readonly video_url: {
|
|
568
|
+
readonly url: string;
|
|
569
|
+
};
|
|
519
570
|
} | {
|
|
520
571
|
readonly type: "file";
|
|
521
572
|
readonly file: {
|
|
@@ -537,6 +588,11 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
537
588
|
readonly image_url: {
|
|
538
589
|
readonly url: string;
|
|
539
590
|
};
|
|
591
|
+
} | {
|
|
592
|
+
readonly type: "video_url";
|
|
593
|
+
readonly video_url: {
|
|
594
|
+
readonly url: string;
|
|
595
|
+
};
|
|
540
596
|
} | {
|
|
541
597
|
readonly type: "file";
|
|
542
598
|
readonly file: {
|
|
@@ -618,7 +674,18 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
618
674
|
} | undefined;
|
|
619
675
|
readonly store?: boolean | undefined;
|
|
620
676
|
readonly prompt_cache_key?: string | undefined;
|
|
677
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
678
|
+
readonly prompt_cache_options?: {
|
|
679
|
+
readonly ttl?: string | undefined;
|
|
680
|
+
} | undefined;
|
|
621
681
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
682
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
683
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
684
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
685
|
+
readonly metadata?: {
|
|
686
|
+
readonly [x: string]: string;
|
|
687
|
+
} | undefined;
|
|
688
|
+
readonly safety_identifier?: string | undefined;
|
|
622
689
|
readonly tool_stream?: boolean | undefined;
|
|
623
690
|
readonly max_completion_tokens?: number | undefined;
|
|
624
691
|
readonly max_tokens?: number | undefined;
|
|
@@ -647,7 +714,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
647
714
|
readonly text: string;
|
|
648
715
|
readonly cache_control?: {
|
|
649
716
|
readonly type: "ephemeral";
|
|
650
|
-
readonly ttl?:
|
|
717
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
651
718
|
} | undefined;
|
|
652
719
|
}[] | undefined;
|
|
653
720
|
readonly messages: readonly ({
|
|
@@ -657,7 +724,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
657
724
|
readonly text: string;
|
|
658
725
|
readonly cache_control?: {
|
|
659
726
|
readonly type: "ephemeral";
|
|
660
|
-
readonly ttl?:
|
|
727
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
661
728
|
} | undefined;
|
|
662
729
|
} | {
|
|
663
730
|
readonly type: "image";
|
|
@@ -674,11 +741,28 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
674
741
|
};
|
|
675
742
|
readonly cache_control?: {
|
|
676
743
|
readonly type: "ephemeral";
|
|
677
|
-
readonly ttl?:
|
|
744
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
678
745
|
} | undefined;
|
|
679
746
|
readonly transformations?: {
|
|
680
747
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
681
748
|
} | undefined;
|
|
749
|
+
} | {
|
|
750
|
+
readonly type: "video";
|
|
751
|
+
readonly source: {
|
|
752
|
+
readonly type: "base64";
|
|
753
|
+
readonly media_type: string;
|
|
754
|
+
readonly data: string;
|
|
755
|
+
} | {
|
|
756
|
+
readonly type: "url";
|
|
757
|
+
readonly url: string;
|
|
758
|
+
} | {
|
|
759
|
+
readonly type: "file";
|
|
760
|
+
readonly file_id: string;
|
|
761
|
+
};
|
|
762
|
+
readonly cache_control?: {
|
|
763
|
+
readonly type: "ephemeral";
|
|
764
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
765
|
+
} | undefined;
|
|
682
766
|
} | {
|
|
683
767
|
readonly type: "document";
|
|
684
768
|
readonly source: {
|
|
@@ -698,7 +782,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
698
782
|
};
|
|
699
783
|
readonly cache_control?: {
|
|
700
784
|
readonly type: "ephemeral";
|
|
701
|
-
readonly ttl?:
|
|
785
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
702
786
|
} | undefined;
|
|
703
787
|
readonly title?: string | undefined;
|
|
704
788
|
readonly context?: string | undefined;
|
|
@@ -713,7 +797,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
713
797
|
readonly text: string;
|
|
714
798
|
readonly cache_control?: {
|
|
715
799
|
readonly type: "ephemeral";
|
|
716
|
-
readonly ttl?:
|
|
800
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
717
801
|
} | undefined;
|
|
718
802
|
} | {
|
|
719
803
|
readonly type: "image";
|
|
@@ -730,11 +814,28 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
730
814
|
};
|
|
731
815
|
readonly cache_control?: {
|
|
732
816
|
readonly type: "ephemeral";
|
|
733
|
-
readonly ttl?:
|
|
817
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
734
818
|
} | undefined;
|
|
735
819
|
readonly transformations?: {
|
|
736
820
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
737
821
|
} | undefined;
|
|
822
|
+
} | {
|
|
823
|
+
readonly type: "video";
|
|
824
|
+
readonly source: {
|
|
825
|
+
readonly type: "base64";
|
|
826
|
+
readonly media_type: string;
|
|
827
|
+
readonly data: string;
|
|
828
|
+
} | {
|
|
829
|
+
readonly type: "url";
|
|
830
|
+
readonly url: string;
|
|
831
|
+
} | {
|
|
832
|
+
readonly type: "file";
|
|
833
|
+
readonly file_id: string;
|
|
834
|
+
};
|
|
835
|
+
readonly cache_control?: {
|
|
836
|
+
readonly type: "ephemeral";
|
|
837
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
838
|
+
} | undefined;
|
|
738
839
|
} | {
|
|
739
840
|
readonly type: "document";
|
|
740
841
|
readonly source: {
|
|
@@ -754,7 +855,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
754
855
|
};
|
|
755
856
|
readonly cache_control?: {
|
|
756
857
|
readonly type: "ephemeral";
|
|
757
|
-
readonly ttl?:
|
|
858
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
758
859
|
} | undefined;
|
|
759
860
|
readonly title?: string | undefined;
|
|
760
861
|
readonly context?: string | undefined;
|
|
@@ -765,7 +866,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
765
866
|
readonly is_error?: boolean | undefined;
|
|
766
867
|
readonly cache_control?: {
|
|
767
868
|
readonly type: "ephemeral";
|
|
768
|
-
readonly ttl?:
|
|
869
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
769
870
|
} | undefined;
|
|
770
871
|
})[];
|
|
771
872
|
} | {
|
|
@@ -778,7 +879,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
778
879
|
readonly text: string;
|
|
779
880
|
readonly cache_control?: {
|
|
780
881
|
readonly type: "ephemeral";
|
|
781
|
-
readonly ttl?:
|
|
882
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
782
883
|
} | undefined;
|
|
783
884
|
} | {
|
|
784
885
|
readonly type: "thinking";
|
|
@@ -786,14 +887,14 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
786
887
|
readonly signature: string;
|
|
787
888
|
readonly cache_control?: {
|
|
788
889
|
readonly type: "ephemeral";
|
|
789
|
-
readonly ttl?:
|
|
890
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
790
891
|
} | undefined;
|
|
791
892
|
} | {
|
|
792
893
|
readonly type: "redacted_thinking";
|
|
793
894
|
readonly data: string;
|
|
794
895
|
readonly cache_control?: {
|
|
795
896
|
readonly type: "ephemeral";
|
|
796
|
-
readonly ttl?:
|
|
897
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
797
898
|
} | undefined;
|
|
798
899
|
} | {
|
|
799
900
|
readonly type: "tool_use";
|
|
@@ -802,7 +903,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
802
903
|
readonly input: unknown;
|
|
803
904
|
readonly cache_control?: {
|
|
804
905
|
readonly type: "ephemeral";
|
|
805
|
-
readonly ttl?:
|
|
906
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
806
907
|
} | undefined;
|
|
807
908
|
} | {
|
|
808
909
|
readonly type: "server_tool_use";
|
|
@@ -811,7 +912,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
811
912
|
readonly input: unknown;
|
|
812
913
|
readonly cache_control?: {
|
|
813
914
|
readonly type: "ephemeral";
|
|
814
|
-
readonly ttl?:
|
|
915
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
815
916
|
} | undefined;
|
|
816
917
|
} | {
|
|
817
918
|
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
@@ -819,7 +920,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
819
920
|
readonly content: unknown;
|
|
820
921
|
readonly cache_control?: {
|
|
821
922
|
readonly type: "ephemeral";
|
|
822
|
-
readonly ttl?:
|
|
923
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
823
924
|
} | undefined;
|
|
824
925
|
})[];
|
|
825
926
|
} | {
|
|
@@ -829,7 +930,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
829
930
|
readonly text: string;
|
|
830
931
|
readonly cache_control?: {
|
|
831
932
|
readonly type: "ephemeral";
|
|
832
|
-
readonly ttl?:
|
|
933
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
833
934
|
} | undefined;
|
|
834
935
|
}[];
|
|
835
936
|
readonly output_config?: {
|
|
@@ -844,7 +945,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
844
945
|
};
|
|
845
946
|
readonly cache_control?: {
|
|
846
947
|
readonly type: "ephemeral";
|
|
847
|
-
readonly ttl?:
|
|
948
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
848
949
|
} | undefined;
|
|
849
950
|
}[] | undefined;
|
|
850
951
|
readonly tool_choice?: {
|
|
@@ -888,7 +989,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
888
989
|
} | undefined;
|
|
889
990
|
readonly cache_control?: {
|
|
890
991
|
readonly type: "ephemeral";
|
|
891
|
-
readonly ttl?:
|
|
992
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
892
993
|
} | undefined;
|
|
893
994
|
readonly container?: string | {
|
|
894
995
|
readonly id?: string | null | undefined;
|
|
@@ -901,6 +1002,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
901
1002
|
readonly user_id?: string | null | undefined;
|
|
902
1003
|
} | undefined;
|
|
903
1004
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
1005
|
+
readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
|
|
904
1006
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
|
|
905
1007
|
readonly model: string;
|
|
906
1008
|
readonly messages: readonly ({
|
|
@@ -910,6 +1012,11 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
910
1012
|
readonly image_url: {
|
|
911
1013
|
readonly url: string;
|
|
912
1014
|
};
|
|
1015
|
+
} | {
|
|
1016
|
+
readonly type: "video_url";
|
|
1017
|
+
readonly video_url: {
|
|
1018
|
+
readonly url: string;
|
|
1019
|
+
};
|
|
913
1020
|
} | {
|
|
914
1021
|
readonly type: "file";
|
|
915
1022
|
readonly file: {
|
|
@@ -931,6 +1038,11 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
931
1038
|
readonly image_url: {
|
|
932
1039
|
readonly url: string;
|
|
933
1040
|
};
|
|
1041
|
+
} | {
|
|
1042
|
+
readonly type: "video_url";
|
|
1043
|
+
readonly video_url: {
|
|
1044
|
+
readonly url: string;
|
|
1045
|
+
};
|
|
934
1046
|
} | {
|
|
935
1047
|
readonly type: "file";
|
|
936
1048
|
readonly file: {
|
|
@@ -1012,7 +1124,18 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1012
1124
|
} | undefined;
|
|
1013
1125
|
readonly store?: boolean | undefined;
|
|
1014
1126
|
readonly prompt_cache_key?: string | undefined;
|
|
1127
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1128
|
+
readonly prompt_cache_options?: {
|
|
1129
|
+
readonly ttl?: string | undefined;
|
|
1130
|
+
} | undefined;
|
|
1015
1131
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1132
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1133
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1134
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1135
|
+
readonly metadata?: {
|
|
1136
|
+
readonly [x: string]: string;
|
|
1137
|
+
} | undefined;
|
|
1138
|
+
readonly safety_identifier?: string | undefined;
|
|
1016
1139
|
readonly tool_stream?: boolean | undefined;
|
|
1017
1140
|
readonly max_completion_tokens?: number | undefined;
|
|
1018
1141
|
readonly max_tokens?: number | undefined;
|
|
@@ -1075,6 +1198,9 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1075
1198
|
readonly content: readonly ({
|
|
1076
1199
|
readonly type: "input_text";
|
|
1077
1200
|
readonly text: string;
|
|
1201
|
+
} | {
|
|
1202
|
+
readonly type: "input_video";
|
|
1203
|
+
readonly video_url: string;
|
|
1078
1204
|
} | {
|
|
1079
1205
|
readonly type: "input_image";
|
|
1080
1206
|
readonly image_url: string;
|
|
@@ -1161,10 +1287,6 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1161
1287
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1162
1288
|
readonly prompt_cache_key?: string | undefined;
|
|
1163
1289
|
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;
|
|
1164
|
-
readonly reasoning?: {
|
|
1165
|
-
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1166
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1167
|
-
} | undefined;
|
|
1168
1290
|
readonly text?: {
|
|
1169
1291
|
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1170
1292
|
} | undefined;
|
|
@@ -1175,6 +1297,10 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1175
1297
|
readonly top_p?: number | undefined;
|
|
1176
1298
|
readonly presence_penalty?: number | undefined;
|
|
1177
1299
|
readonly frequency_penalty?: number | undefined;
|
|
1300
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1301
|
+
readonly prompt_cache_options?: {
|
|
1302
|
+
readonly ttl?: string | undefined;
|
|
1303
|
+
} | undefined;
|
|
1178
1304
|
readonly tools?: readonly ({
|
|
1179
1305
|
readonly type: "namespace";
|
|
1180
1306
|
readonly name: string;
|
|
@@ -1220,6 +1346,12 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1220
1346
|
} | {
|
|
1221
1347
|
readonly type: "image_generation";
|
|
1222
1348
|
} | undefined;
|
|
1349
|
+
readonly reasoning?: {
|
|
1350
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1351
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1352
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
1353
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
1354
|
+
} | undefined;
|
|
1223
1355
|
readonly context_management?: readonly {
|
|
1224
1356
|
readonly type: "compaction";
|
|
1225
1357
|
readonly compact_threshold?: number | undefined;
|
|
@@ -1235,6 +1367,7 @@ export declare const configure: (input: LanguageModelOptions) => {
|
|
|
1235
1367
|
endpoint: import("../route/client.js").CompactOperation;
|
|
1236
1368
|
trigger: import("../route/client.js").TriggerCompactOperation;
|
|
1237
1369
|
}>;
|
|
1370
|
+
decision: (value: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
|
|
1238
1371
|
configure: typeof configure;
|
|
1239
1372
|
};
|
|
1240
1373
|
export declare const provider: {
|
|
@@ -1242,4 +1375,5 @@ export declare const provider: {
|
|
|
1242
1375
|
configure: typeof configure;
|
|
1243
1376
|
};
|
|
1244
1377
|
export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
1378
|
+
export declare const decisionModel: (modelID: string, settings: Settings) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
|
|
1245
1379
|
export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";
|