@opencode/ai 2.1.4 → 2.2.1
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 +339 -166
- 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 +50 -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 +1444 -34
- package/dist/index.js +139 -24
- package/dist/llm.d.ts +16 -1
- package/dist/llm.js +34 -0
- package/dist/media-client.d.ts +3 -1
- package/dist/media-client.js +1 -0
- 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 +59 -4
- 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 +26 -6
- 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/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/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 +10 -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 +46 -6
- package/dist/protocols/meta-responses.js +29 -1
- package/dist/protocols/minimax-images.d.ts +25 -0
- package/dist/protocols/minimax-images.js +150 -0
- package/dist/protocols/open-responses.d.ts +212 -27
- package/dist/protocols/open-responses.js +116 -54
- package/dist/protocols/openai-chat.d.ts +1135 -31
- package/dist/protocols/openai-chat.js +155 -60
- package/dist/protocols/openai-compatible-chat.d.ts +57 -5
- package/dist/protocols/openai-compatible-responses.d.ts +28 -8
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +128 -0
- package/dist/protocols/openai-freeform.d.ts +47 -0
- package/dist/protocols/openai-freeform.js +54 -0
- package/dist/protocols/openai-images.d.ts +36 -24
- package/dist/protocols/openai-images.js +137 -39
- package/dist/protocols/openai-responses.d.ts +202 -42
- package/dist/protocols/openai-responses.js +49 -10
- 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/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/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 +58 -4
- package/dist/protocols/venice-chat.js +2 -2
- package/dist/protocols/xai-images.d.ts +7 -2
- package/dist/protocols/xai-images.js +11 -5
- package/dist/protocols/xai-responses.d.ts +30 -3
- package/dist/protocols/xai-responses.js +30 -3
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/xai-video.js +11 -8
- package/dist/protocols/zai-chat.d.ts +60 -4
- 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 +23 -7
- package/dist/provider-package.d.ts +2 -0
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba.d.ts +137 -28
- package/dist/providers/alibaba.js +16 -8
- package/dist/providers/amazon-bedrock-mantle.d.ts +259 -145
- package/dist/providers/amazon-bedrock-mantle.js +1 -1
- package/dist/providers/amazon-bedrock.d.ts +34 -14
- package/dist/providers/amazon-bedrock.js +11 -11
- package/dist/providers/anthropic-compatible.d.ts +53 -18
- package/dist/providers/anthropic.d.ts +53 -18
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure.d.ts +129 -24
- 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 +124 -12
- package/dist/providers/baseten.js +41 -8
- package/dist/providers/cerebras.d.ts +115 -11
- package/dist/providers/cerebras.js +1 -1
- 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 +290 -60
- 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 +128 -12
- package/dist/providers/cloudflare-workers-ai.js +45 -9
- package/dist/providers/cohere/chat.d.ts +1 -1
- package/dist/providers/cohere/chat.js +1 -1
- package/dist/providers/cohere.d.ts +115 -11
- package/dist/providers/cohere.js +1 -1
- package/dist/providers/deepinfra.d.ts +115 -11
- package/dist/providers/deepinfra.js +1 -1
- package/dist/providers/deepseek.d.ts +115 -11
- package/dist/providers/deepseek.js +1 -1
- 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/responses.d.ts +4 -0
- package/dist/providers/digitalocean/responses.js +1 -0
- package/dist/providers/digitalocean.d.ts +390 -20
- package/dist/providers/digitalocean.js +53 -11
- package/dist/providers/fireworks.d.ts +115 -11
- package/dist/providers/fireworks.js +1 -1
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google/interactions.d.ts +1 -1
- package/dist/providers/google/interactions.js +1 -1
- 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 +57 -5
- package/dist/providers/google-vertex-chat.js +1 -1
- package/dist/providers/google-vertex-interactions.d.ts +1 -1
- package/dist/providers/google-vertex-interactions.js +1 -1
- package/dist/providers/google-vertex-messages.d.ts +53 -18
- package/dist/providers/google-vertex-messages.js +1 -1
- package/dist/providers/google-vertex-mistral.d.ts +1 -1
- package/dist/providers/google-vertex-mistral.js +1 -1
- package/dist/providers/google-vertex-responses.d.ts +24 -4
- package/dist/providers/google-vertex-responses.js +1 -1
- package/dist/providers/google-vertex.d.ts +4 -2
- package/dist/providers/google-vertex.js +30 -13
- package/dist/providers/google.d.ts +6 -5
- package/dist/providers/google.js +15 -8
- package/dist/providers/groq.d.ts +119 -15
- package/dist/providers/groq.js +1 -7
- package/dist/providers/index.d.ts +0 -4
- package/dist/providers/index.js +0 -4
- package/dist/providers/meta/images.d.ts +2 -0
- package/dist/providers/meta/images.js +1 -0
- package/dist/providers/meta.d.ts +254 -146
- package/dist/providers/meta.js +2 -1
- package/dist/providers/minimax/chat.d.ts +1 -1
- package/dist/providers/minimax/chat.js +1 -1
- package/dist/providers/minimax/images.d.ts +3 -0
- package/dist/providers/minimax/images.js +1 -0
- package/dist/providers/minimax/responses.d.ts +1 -1
- package/dist/providers/minimax/responses.js +1 -1
- package/dist/providers/minimax.d.ts +139 -26
- package/dist/providers/minimax.js +22 -9
- package/dist/providers/mistral.d.ts +3 -3
- package/dist/providers/mistral.js +1 -1
- package/dist/providers/moonshot/messages.d.ts +1 -1
- package/dist/providers/moonshot/messages.js +1 -1
- package/dist/providers/moonshot/responses.d.ts +1 -1
- package/dist/providers/moonshot/responses.js +1 -1
- package/dist/providers/moonshot.d.ts +132 -25
- package/dist/providers/moonshot.js +1 -1
- 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 +24 -4
- package/dist/providers/openai-compatible.d.ts +62 -8
- package/dist/providers/openai-compatible.js +29 -10
- package/dist/providers/openai-options.d.ts +3 -1
- package/dist/providers/openai.d.ts +103 -18
- package/dist/providers/openai.js +23 -5
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +11 -12
- 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/responses.d.ts +4 -0
- package/dist/providers/openrouter/responses.js +1 -0
- package/dist/providers/openrouter.d.ts +446 -35
- package/dist/providers/openrouter.js +78 -27
- package/dist/providers/togetherai.d.ts +115 -11
- package/dist/providers/togetherai.js +1 -1
- 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 +11 -12
- package/dist/providers/typesafe-ai.js +10 -8
- package/dist/providers/venice/responses.d.ts +4 -0
- package/dist/providers/venice/responses.js +1 -0
- package/dist/providers/venice.d.ts +261 -9
- package/dist/providers/venice.js +33 -17
- 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 +16 -22
- package/dist/providers/vercel-ai-gateway.js +41 -85
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai.d.ts +66 -12
- 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/messages.d.ts +1 -1
- package/dist/providers/zai-coding-plan/messages.js +1 -1
- package/dist/providers/zai-coding-plan/responses.d.ts +1 -1
- package/dist/providers/zai-coding-plan/responses.js +1 -1
- package/dist/providers/zai-coding-plan.d.ts +132 -25
- package/dist/providers/zai-coding-plan.js +1 -1
- package/dist/providers/zai.d.ts +62 -9
- package/dist/providers/zai.js +15 -8
- package/dist/route/auth.d.ts +1 -1
- 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 +3 -4
- package/dist/route/media-protocol.js +12 -8
- package/dist/route/media.d.ts +6 -2
- package/dist/route/media.js +8 -6
- 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 +41 -3
- package/dist/schema/messages.js +23 -0
- package/dist/schema/options.d.ts +5 -3
- package/dist/schema/options.js +8 -3
- package/dist/speech-client.d.ts +53 -14
- package/dist/speech-client.js +0 -1
- package/dist/speech.d.ts +0 -135
- package/dist/speech.js +2 -4
- package/dist/testing/decision.d.ts +16 -0
- package/dist/testing/decision.js +20 -0
- package/dist/testing/image.d.ts +14 -0
- package/dist/testing/image.js +12 -0
- package/dist/testing/media.d.ts +18 -0
- package/dist/testing/media.js +36 -0
- package/dist/testing/script.d.ts +28 -0
- package/dist/testing/script.js +60 -0
- package/dist/testing/speech.d.ts +14 -0
- package/dist/testing/speech.js +12 -0
- package/dist/testing/transcription.d.ts +14 -0
- package/dist/testing/transcription.js +12 -0
- package/dist/testing/video.d.ts +14 -0
- package/dist/testing/video.js +12 -0
- package/dist/testing.d.ts +35 -45
- package/dist/testing.js +14 -75
- package/dist/tool.d.ts +12 -1
- package/dist/tool.js +10 -2
- package/dist/transcription-client.d.ts +69 -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 +46 -14
- package/dist/video-client.js +0 -1
- package/dist/video.d.ts +1 -136
- package/dist/video.js +3 -5
- package/package.json +497 -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/protocols/bfl-images.d.ts +0 -38
- package/dist/protocols/bfl-images.js +0 -153
- package/dist/protocols/fal-images.d.ts +0 -25
- package/dist/protocols/fal-images.js +0 -104
- package/dist/protocols/fal-video.d.ts +0 -29
- package/dist/protocols/fal-video.js +0 -73
- package/dist/protocols/replicate-images.d.ts +0 -28
- package/dist/protocols/replicate-images.js +0 -127
- package/dist/protocols/stability-images.d.ts +0 -39
- package/dist/protocols/stability-images.js +0 -136
- package/dist/protocols/utils/fal-queue.d.ts +0 -26
- package/dist/protocols/utils/fal-queue.js +0 -67
- package/dist/provider.d.ts +0 -23
- package/dist/provider.js +0 -2
- package/dist/providers/black-forest-labs.d.ts +0 -21
- package/dist/providers/black-forest-labs.js +0 -23
- package/dist/providers/fal.d.ts +0 -24
- package/dist/providers/fal.js +0 -26
- package/dist/providers/replicate.d.ts +0 -21
- package/dist/providers/replicate.js +0 -17
- package/dist/providers/stability.d.ts +0 -23
- package/dist/providers/stability.js +0 -18
|
@@ -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"];
|
|
@@ -18,7 +18,7 @@ type GatewayOptions = {
|
|
|
18
18
|
readonly skipCache?: boolean;
|
|
19
19
|
readonly collectLog?: boolean;
|
|
20
20
|
};
|
|
21
|
-
export type
|
|
21
|
+
export type Config = GatewayURL & GatewayOptions & Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
22
22
|
readonly gatewayApiKey?: string | Redacted.Redacted | Config.Config<string | Redacted.Redacted>;
|
|
23
23
|
readonly providerOptions?: OpenAIProviderOptionsInput;
|
|
24
24
|
};
|
|
@@ -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 ({
|
|
@@ -43,7 +45,7 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
43
45
|
readonly role: "developer";
|
|
44
46
|
readonly content: string;
|
|
45
47
|
} | {
|
|
46
|
-
readonly type: "function_call_output";
|
|
48
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
47
49
|
readonly call_id: string;
|
|
48
50
|
readonly output: string | readonly ({
|
|
49
51
|
readonly type: "input_text";
|
|
@@ -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;
|
|
@@ -110,6 +115,12 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
110
115
|
readonly name: string;
|
|
111
116
|
readonly namespace?: string | undefined;
|
|
112
117
|
readonly arguments: string;
|
|
118
|
+
} | {
|
|
119
|
+
readonly type: "custom_tool_call";
|
|
120
|
+
readonly id?: string | undefined;
|
|
121
|
+
readonly call_id: string;
|
|
122
|
+
readonly name: string;
|
|
123
|
+
readonly input: string;
|
|
113
124
|
} | {
|
|
114
125
|
readonly [x: string]: unknown;
|
|
115
126
|
readonly type: "web_search_call";
|
|
@@ -166,10 +177,6 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
166
177
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
167
178
|
readonly prompt_cache_key?: string | undefined;
|
|
168
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;
|
|
169
|
-
readonly reasoning?: {
|
|
170
|
-
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
171
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
172
|
-
} | undefined;
|
|
173
180
|
readonly text?: {
|
|
174
181
|
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
175
182
|
} | undefined;
|
|
@@ -180,7 +187,22 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
180
187
|
readonly top_p?: number | undefined;
|
|
181
188
|
readonly presence_penalty?: number | undefined;
|
|
182
189
|
readonly frequency_penalty?: number | undefined;
|
|
190
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
191
|
+
readonly prompt_cache_options?: {
|
|
192
|
+
readonly ttl?: string | undefined;
|
|
193
|
+
} | undefined;
|
|
183
194
|
readonly tools?: readonly ({
|
|
195
|
+
readonly type: "custom";
|
|
196
|
+
readonly name: string;
|
|
197
|
+
readonly description: string;
|
|
198
|
+
readonly format: {
|
|
199
|
+
readonly type: "text";
|
|
200
|
+
} | {
|
|
201
|
+
readonly type: "grammar";
|
|
202
|
+
readonly syntax: "lark" | "regex";
|
|
203
|
+
readonly definition: string;
|
|
204
|
+
};
|
|
205
|
+
} | {
|
|
184
206
|
readonly type: "namespace";
|
|
185
207
|
readonly name: string;
|
|
186
208
|
readonly description: string;
|
|
@@ -213,18 +235,24 @@ export declare const responsesRoute: import("../route/client.js").Route<{
|
|
|
213
235
|
readonly size?: string | undefined;
|
|
214
236
|
})[] | undefined;
|
|
215
237
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
216
|
-
readonly type: "function";
|
|
238
|
+
readonly type: "custom" | "function";
|
|
217
239
|
readonly name: string;
|
|
218
240
|
} | {
|
|
219
241
|
readonly type: "allowed_tools";
|
|
220
242
|
readonly mode: "auto" | "none" | "required";
|
|
221
243
|
readonly tools: readonly {
|
|
222
|
-
readonly type: "function";
|
|
244
|
+
readonly type: "custom" | "function";
|
|
223
245
|
readonly name: string;
|
|
224
246
|
}[];
|
|
225
247
|
} | {
|
|
226
248
|
readonly type: "image_generation";
|
|
227
249
|
} | undefined;
|
|
250
|
+
readonly reasoning?: {
|
|
251
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
252
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
253
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
254
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
255
|
+
} | undefined;
|
|
228
256
|
readonly context_management?: readonly {
|
|
229
257
|
readonly type: "compaction";
|
|
230
258
|
readonly compact_threshold?: number | undefined;
|
|
@@ -252,7 +280,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
252
280
|
readonly text: string;
|
|
253
281
|
readonly cache_control?: {
|
|
254
282
|
readonly type: "ephemeral";
|
|
255
|
-
readonly ttl?:
|
|
283
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
256
284
|
} | undefined;
|
|
257
285
|
}[] | undefined;
|
|
258
286
|
readonly messages: readonly ({
|
|
@@ -262,7 +290,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
262
290
|
readonly text: string;
|
|
263
291
|
readonly cache_control?: {
|
|
264
292
|
readonly type: "ephemeral";
|
|
265
|
-
readonly ttl?:
|
|
293
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
266
294
|
} | undefined;
|
|
267
295
|
} | {
|
|
268
296
|
readonly type: "image";
|
|
@@ -279,11 +307,28 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
279
307
|
};
|
|
280
308
|
readonly cache_control?: {
|
|
281
309
|
readonly type: "ephemeral";
|
|
282
|
-
readonly ttl?:
|
|
310
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
283
311
|
} | undefined;
|
|
284
312
|
readonly transformations?: {
|
|
285
313
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
286
314
|
} | undefined;
|
|
315
|
+
} | {
|
|
316
|
+
readonly type: "video";
|
|
317
|
+
readonly source: {
|
|
318
|
+
readonly type: "base64";
|
|
319
|
+
readonly media_type: string;
|
|
320
|
+
readonly data: string;
|
|
321
|
+
} | {
|
|
322
|
+
readonly type: "url";
|
|
323
|
+
readonly url: string;
|
|
324
|
+
} | {
|
|
325
|
+
readonly type: "file";
|
|
326
|
+
readonly file_id: string;
|
|
327
|
+
};
|
|
328
|
+
readonly cache_control?: {
|
|
329
|
+
readonly type: "ephemeral";
|
|
330
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
331
|
+
} | undefined;
|
|
287
332
|
} | {
|
|
288
333
|
readonly type: "document";
|
|
289
334
|
readonly source: {
|
|
@@ -303,7 +348,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
303
348
|
};
|
|
304
349
|
readonly cache_control?: {
|
|
305
350
|
readonly type: "ephemeral";
|
|
306
|
-
readonly ttl?:
|
|
351
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
307
352
|
} | undefined;
|
|
308
353
|
readonly title?: string | undefined;
|
|
309
354
|
readonly context?: string | undefined;
|
|
@@ -318,7 +363,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
318
363
|
readonly text: string;
|
|
319
364
|
readonly cache_control?: {
|
|
320
365
|
readonly type: "ephemeral";
|
|
321
|
-
readonly ttl?:
|
|
366
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
322
367
|
} | undefined;
|
|
323
368
|
} | {
|
|
324
369
|
readonly type: "image";
|
|
@@ -335,11 +380,28 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
335
380
|
};
|
|
336
381
|
readonly cache_control?: {
|
|
337
382
|
readonly type: "ephemeral";
|
|
338
|
-
readonly ttl?:
|
|
383
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
339
384
|
} | undefined;
|
|
340
385
|
readonly transformations?: {
|
|
341
386
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
342
387
|
} | undefined;
|
|
388
|
+
} | {
|
|
389
|
+
readonly type: "video";
|
|
390
|
+
readonly source: {
|
|
391
|
+
readonly type: "base64";
|
|
392
|
+
readonly media_type: string;
|
|
393
|
+
readonly data: string;
|
|
394
|
+
} | {
|
|
395
|
+
readonly type: "url";
|
|
396
|
+
readonly url: string;
|
|
397
|
+
} | {
|
|
398
|
+
readonly type: "file";
|
|
399
|
+
readonly file_id: string;
|
|
400
|
+
};
|
|
401
|
+
readonly cache_control?: {
|
|
402
|
+
readonly type: "ephemeral";
|
|
403
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
404
|
+
} | undefined;
|
|
343
405
|
} | {
|
|
344
406
|
readonly type: "document";
|
|
345
407
|
readonly source: {
|
|
@@ -359,7 +421,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
359
421
|
};
|
|
360
422
|
readonly cache_control?: {
|
|
361
423
|
readonly type: "ephemeral";
|
|
362
|
-
readonly ttl?:
|
|
424
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
363
425
|
} | undefined;
|
|
364
426
|
readonly title?: string | undefined;
|
|
365
427
|
readonly context?: string | undefined;
|
|
@@ -370,7 +432,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
370
432
|
readonly is_error?: boolean | undefined;
|
|
371
433
|
readonly cache_control?: {
|
|
372
434
|
readonly type: "ephemeral";
|
|
373
|
-
readonly ttl?:
|
|
435
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
374
436
|
} | undefined;
|
|
375
437
|
})[];
|
|
376
438
|
} | {
|
|
@@ -383,7 +445,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
383
445
|
readonly text: string;
|
|
384
446
|
readonly cache_control?: {
|
|
385
447
|
readonly type: "ephemeral";
|
|
386
|
-
readonly ttl?:
|
|
448
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
387
449
|
} | undefined;
|
|
388
450
|
} | {
|
|
389
451
|
readonly type: "thinking";
|
|
@@ -391,14 +453,14 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
391
453
|
readonly signature: string;
|
|
392
454
|
readonly cache_control?: {
|
|
393
455
|
readonly type: "ephemeral";
|
|
394
|
-
readonly ttl?:
|
|
456
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
395
457
|
} | undefined;
|
|
396
458
|
} | {
|
|
397
459
|
readonly type: "redacted_thinking";
|
|
398
460
|
readonly data: string;
|
|
399
461
|
readonly cache_control?: {
|
|
400
462
|
readonly type: "ephemeral";
|
|
401
|
-
readonly ttl?:
|
|
463
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
402
464
|
} | undefined;
|
|
403
465
|
} | {
|
|
404
466
|
readonly type: "tool_use";
|
|
@@ -407,7 +469,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
407
469
|
readonly input: unknown;
|
|
408
470
|
readonly cache_control?: {
|
|
409
471
|
readonly type: "ephemeral";
|
|
410
|
-
readonly ttl?:
|
|
472
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
411
473
|
} | undefined;
|
|
412
474
|
} | {
|
|
413
475
|
readonly type: "server_tool_use";
|
|
@@ -416,7 +478,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
416
478
|
readonly input: unknown;
|
|
417
479
|
readonly cache_control?: {
|
|
418
480
|
readonly type: "ephemeral";
|
|
419
|
-
readonly ttl?:
|
|
481
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
420
482
|
} | undefined;
|
|
421
483
|
} | {
|
|
422
484
|
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
@@ -424,7 +486,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
424
486
|
readonly content: unknown;
|
|
425
487
|
readonly cache_control?: {
|
|
426
488
|
readonly type: "ephemeral";
|
|
427
|
-
readonly ttl?:
|
|
489
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
428
490
|
} | undefined;
|
|
429
491
|
})[];
|
|
430
492
|
} | {
|
|
@@ -434,7 +496,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
434
496
|
readonly text: string;
|
|
435
497
|
readonly cache_control?: {
|
|
436
498
|
readonly type: "ephemeral";
|
|
437
|
-
readonly ttl?:
|
|
499
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
438
500
|
} | undefined;
|
|
439
501
|
}[];
|
|
440
502
|
readonly output_config?: {
|
|
@@ -449,7 +511,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
449
511
|
};
|
|
450
512
|
readonly cache_control?: {
|
|
451
513
|
readonly type: "ephemeral";
|
|
452
|
-
readonly ttl?:
|
|
514
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
453
515
|
} | undefined;
|
|
454
516
|
}[] | undefined;
|
|
455
517
|
readonly tool_choice?: {
|
|
@@ -493,7 +555,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
493
555
|
} | undefined;
|
|
494
556
|
readonly cache_control?: {
|
|
495
557
|
readonly type: "ephemeral";
|
|
496
|
-
readonly ttl?:
|
|
558
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
497
559
|
} | undefined;
|
|
498
560
|
readonly container?: string | {
|
|
499
561
|
readonly id?: string | null | undefined;
|
|
@@ -506,6 +568,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
|
|
|
506
568
|
readonly user_id?: string | null | undefined;
|
|
507
569
|
} | undefined;
|
|
508
570
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
571
|
+
readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
|
|
509
572
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
510
573
|
export declare const route: import("../route/client.js").Route<{
|
|
511
574
|
readonly model: string;
|
|
@@ -516,6 +579,11 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
516
579
|
readonly image_url: {
|
|
517
580
|
readonly url: string;
|
|
518
581
|
};
|
|
582
|
+
} | {
|
|
583
|
+
readonly type: "video_url";
|
|
584
|
+
readonly video_url: {
|
|
585
|
+
readonly url: string;
|
|
586
|
+
};
|
|
519
587
|
} | {
|
|
520
588
|
readonly type: "file";
|
|
521
589
|
readonly file: {
|
|
@@ -537,6 +605,11 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
537
605
|
readonly image_url: {
|
|
538
606
|
readonly url: string;
|
|
539
607
|
};
|
|
608
|
+
} | {
|
|
609
|
+
readonly type: "video_url";
|
|
610
|
+
readonly video_url: {
|
|
611
|
+
readonly url: string;
|
|
612
|
+
};
|
|
540
613
|
} | {
|
|
541
614
|
readonly type: "file";
|
|
542
615
|
readonly file: {
|
|
@@ -573,7 +646,14 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
573
646
|
readonly ttl?: string | undefined;
|
|
574
647
|
} | undefined;
|
|
575
648
|
}[] | null;
|
|
576
|
-
readonly tool_calls?: readonly {
|
|
649
|
+
readonly tool_calls?: readonly ({
|
|
650
|
+
readonly id: string;
|
|
651
|
+
readonly type: "custom";
|
|
652
|
+
readonly custom: {
|
|
653
|
+
readonly name: string;
|
|
654
|
+
readonly input: string;
|
|
655
|
+
};
|
|
656
|
+
} | {
|
|
577
657
|
readonly id: string;
|
|
578
658
|
readonly type: "function";
|
|
579
659
|
readonly function: {
|
|
@@ -585,13 +665,13 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
585
665
|
readonly thought_signature: string;
|
|
586
666
|
};
|
|
587
667
|
} | undefined;
|
|
588
|
-
}[] | undefined;
|
|
668
|
+
})[] | undefined;
|
|
589
669
|
readonly reasoning_content?: string | undefined;
|
|
590
670
|
readonly reasoning?: string | undefined;
|
|
591
671
|
readonly reasoning_text?: string | undefined;
|
|
592
672
|
readonly reasoning_details?: unknown;
|
|
593
673
|
})[];
|
|
594
|
-
readonly tools?: readonly {
|
|
674
|
+
readonly tools?: readonly ({
|
|
595
675
|
readonly type: "function";
|
|
596
676
|
readonly function: {
|
|
597
677
|
readonly name: string;
|
|
@@ -605,12 +685,36 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
605
685
|
readonly type: "ephemeral";
|
|
606
686
|
readonly ttl?: string | undefined;
|
|
607
687
|
} | undefined;
|
|
608
|
-
}
|
|
688
|
+
} | {
|
|
689
|
+
readonly type: "custom";
|
|
690
|
+
readonly custom: {
|
|
691
|
+
readonly name: string;
|
|
692
|
+
readonly description: string;
|
|
693
|
+
readonly format: {
|
|
694
|
+
readonly type: "text";
|
|
695
|
+
} | {
|
|
696
|
+
readonly type: "grammar";
|
|
697
|
+
readonly grammar: {
|
|
698
|
+
readonly syntax: "lark" | "regex";
|
|
699
|
+
readonly definition: string;
|
|
700
|
+
};
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
readonly cache_control?: {
|
|
704
|
+
readonly type: "ephemeral";
|
|
705
|
+
readonly ttl?: string | undefined;
|
|
706
|
+
} | undefined;
|
|
707
|
+
})[] | undefined;
|
|
609
708
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
610
709
|
readonly type: "function";
|
|
611
710
|
readonly function: {
|
|
612
711
|
readonly name: string;
|
|
613
712
|
};
|
|
713
|
+
} | {
|
|
714
|
+
readonly type: "custom";
|
|
715
|
+
readonly custom: {
|
|
716
|
+
readonly name: string;
|
|
717
|
+
};
|
|
614
718
|
} | undefined;
|
|
615
719
|
readonly stream: true;
|
|
616
720
|
readonly stream_options?: {
|
|
@@ -618,7 +722,18 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
618
722
|
} | undefined;
|
|
619
723
|
readonly store?: boolean | undefined;
|
|
620
724
|
readonly prompt_cache_key?: string | undefined;
|
|
725
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
726
|
+
readonly prompt_cache_options?: {
|
|
727
|
+
readonly ttl?: string | undefined;
|
|
728
|
+
} | undefined;
|
|
621
729
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
730
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
731
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
732
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
733
|
+
readonly metadata?: {
|
|
734
|
+
readonly [x: string]: string;
|
|
735
|
+
} | undefined;
|
|
736
|
+
readonly safety_identifier?: string | undefined;
|
|
622
737
|
readonly tool_stream?: boolean | undefined;
|
|
623
738
|
readonly max_completion_tokens?: number | undefined;
|
|
624
739
|
readonly max_tokens?: number | undefined;
|
|
@@ -647,7 +762,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
647
762
|
readonly text: string;
|
|
648
763
|
readonly cache_control?: {
|
|
649
764
|
readonly type: "ephemeral";
|
|
650
|
-
readonly ttl?:
|
|
765
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
651
766
|
} | undefined;
|
|
652
767
|
}[] | undefined;
|
|
653
768
|
readonly messages: readonly ({
|
|
@@ -657,7 +772,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
657
772
|
readonly text: string;
|
|
658
773
|
readonly cache_control?: {
|
|
659
774
|
readonly type: "ephemeral";
|
|
660
|
-
readonly ttl?:
|
|
775
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
661
776
|
} | undefined;
|
|
662
777
|
} | {
|
|
663
778
|
readonly type: "image";
|
|
@@ -674,11 +789,28 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
674
789
|
};
|
|
675
790
|
readonly cache_control?: {
|
|
676
791
|
readonly type: "ephemeral";
|
|
677
|
-
readonly ttl?:
|
|
792
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
678
793
|
} | undefined;
|
|
679
794
|
readonly transformations?: {
|
|
680
795
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
681
796
|
} | undefined;
|
|
797
|
+
} | {
|
|
798
|
+
readonly type: "video";
|
|
799
|
+
readonly source: {
|
|
800
|
+
readonly type: "base64";
|
|
801
|
+
readonly media_type: string;
|
|
802
|
+
readonly data: string;
|
|
803
|
+
} | {
|
|
804
|
+
readonly type: "url";
|
|
805
|
+
readonly url: string;
|
|
806
|
+
} | {
|
|
807
|
+
readonly type: "file";
|
|
808
|
+
readonly file_id: string;
|
|
809
|
+
};
|
|
810
|
+
readonly cache_control?: {
|
|
811
|
+
readonly type: "ephemeral";
|
|
812
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
813
|
+
} | undefined;
|
|
682
814
|
} | {
|
|
683
815
|
readonly type: "document";
|
|
684
816
|
readonly source: {
|
|
@@ -698,7 +830,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
698
830
|
};
|
|
699
831
|
readonly cache_control?: {
|
|
700
832
|
readonly type: "ephemeral";
|
|
701
|
-
readonly ttl?:
|
|
833
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
702
834
|
} | undefined;
|
|
703
835
|
readonly title?: string | undefined;
|
|
704
836
|
readonly context?: string | undefined;
|
|
@@ -713,7 +845,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
713
845
|
readonly text: string;
|
|
714
846
|
readonly cache_control?: {
|
|
715
847
|
readonly type: "ephemeral";
|
|
716
|
-
readonly ttl?:
|
|
848
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
717
849
|
} | undefined;
|
|
718
850
|
} | {
|
|
719
851
|
readonly type: "image";
|
|
@@ -730,11 +862,28 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
730
862
|
};
|
|
731
863
|
readonly cache_control?: {
|
|
732
864
|
readonly type: "ephemeral";
|
|
733
|
-
readonly ttl?:
|
|
865
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
734
866
|
} | undefined;
|
|
735
867
|
readonly transformations?: {
|
|
736
868
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
737
869
|
} | undefined;
|
|
870
|
+
} | {
|
|
871
|
+
readonly type: "video";
|
|
872
|
+
readonly source: {
|
|
873
|
+
readonly type: "base64";
|
|
874
|
+
readonly media_type: string;
|
|
875
|
+
readonly data: string;
|
|
876
|
+
} | {
|
|
877
|
+
readonly type: "url";
|
|
878
|
+
readonly url: string;
|
|
879
|
+
} | {
|
|
880
|
+
readonly type: "file";
|
|
881
|
+
readonly file_id: string;
|
|
882
|
+
};
|
|
883
|
+
readonly cache_control?: {
|
|
884
|
+
readonly type: "ephemeral";
|
|
885
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
886
|
+
} | undefined;
|
|
738
887
|
} | {
|
|
739
888
|
readonly type: "document";
|
|
740
889
|
readonly source: {
|
|
@@ -754,7 +903,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
754
903
|
};
|
|
755
904
|
readonly cache_control?: {
|
|
756
905
|
readonly type: "ephemeral";
|
|
757
|
-
readonly ttl?:
|
|
906
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
758
907
|
} | undefined;
|
|
759
908
|
readonly title?: string | undefined;
|
|
760
909
|
readonly context?: string | undefined;
|
|
@@ -765,7 +914,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
765
914
|
readonly is_error?: boolean | undefined;
|
|
766
915
|
readonly cache_control?: {
|
|
767
916
|
readonly type: "ephemeral";
|
|
768
|
-
readonly ttl?:
|
|
917
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
769
918
|
} | undefined;
|
|
770
919
|
})[];
|
|
771
920
|
} | {
|
|
@@ -778,7 +927,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
778
927
|
readonly text: string;
|
|
779
928
|
readonly cache_control?: {
|
|
780
929
|
readonly type: "ephemeral";
|
|
781
|
-
readonly ttl?:
|
|
930
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
782
931
|
} | undefined;
|
|
783
932
|
} | {
|
|
784
933
|
readonly type: "thinking";
|
|
@@ -786,14 +935,14 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
786
935
|
readonly signature: string;
|
|
787
936
|
readonly cache_control?: {
|
|
788
937
|
readonly type: "ephemeral";
|
|
789
|
-
readonly ttl?:
|
|
938
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
790
939
|
} | undefined;
|
|
791
940
|
} | {
|
|
792
941
|
readonly type: "redacted_thinking";
|
|
793
942
|
readonly data: string;
|
|
794
943
|
readonly cache_control?: {
|
|
795
944
|
readonly type: "ephemeral";
|
|
796
|
-
readonly ttl?:
|
|
945
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
797
946
|
} | undefined;
|
|
798
947
|
} | {
|
|
799
948
|
readonly type: "tool_use";
|
|
@@ -802,7 +951,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
802
951
|
readonly input: unknown;
|
|
803
952
|
readonly cache_control?: {
|
|
804
953
|
readonly type: "ephemeral";
|
|
805
|
-
readonly ttl?:
|
|
954
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
806
955
|
} | undefined;
|
|
807
956
|
} | {
|
|
808
957
|
readonly type: "server_tool_use";
|
|
@@ -811,7 +960,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
811
960
|
readonly input: unknown;
|
|
812
961
|
readonly cache_control?: {
|
|
813
962
|
readonly type: "ephemeral";
|
|
814
|
-
readonly ttl?:
|
|
963
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
815
964
|
} | undefined;
|
|
816
965
|
} | {
|
|
817
966
|
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
@@ -819,7 +968,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
819
968
|
readonly content: unknown;
|
|
820
969
|
readonly cache_control?: {
|
|
821
970
|
readonly type: "ephemeral";
|
|
822
|
-
readonly ttl?:
|
|
971
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
823
972
|
} | undefined;
|
|
824
973
|
})[];
|
|
825
974
|
} | {
|
|
@@ -829,7 +978,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
829
978
|
readonly text: string;
|
|
830
979
|
readonly cache_control?: {
|
|
831
980
|
readonly type: "ephemeral";
|
|
832
|
-
readonly ttl?:
|
|
981
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
833
982
|
} | undefined;
|
|
834
983
|
}[];
|
|
835
984
|
readonly output_config?: {
|
|
@@ -844,7 +993,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
844
993
|
};
|
|
845
994
|
readonly cache_control?: {
|
|
846
995
|
readonly type: "ephemeral";
|
|
847
|
-
readonly ttl?:
|
|
996
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
848
997
|
} | undefined;
|
|
849
998
|
}[] | undefined;
|
|
850
999
|
readonly tool_choice?: {
|
|
@@ -888,7 +1037,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
888
1037
|
} | undefined;
|
|
889
1038
|
readonly cache_control?: {
|
|
890
1039
|
readonly type: "ephemeral";
|
|
891
|
-
readonly ttl?:
|
|
1040
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
892
1041
|
} | undefined;
|
|
893
1042
|
readonly container?: string | {
|
|
894
1043
|
readonly id?: string | null | undefined;
|
|
@@ -901,6 +1050,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
901
1050
|
readonly user_id?: string | null | undefined;
|
|
902
1051
|
} | undefined;
|
|
903
1052
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
1053
|
+
readonly speed?: import("../schema/options.js").OpenString<"fast" | "standard"> | undefined;
|
|
904
1054
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
|
|
905
1055
|
readonly model: string;
|
|
906
1056
|
readonly messages: readonly ({
|
|
@@ -910,6 +1060,11 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
910
1060
|
readonly image_url: {
|
|
911
1061
|
readonly url: string;
|
|
912
1062
|
};
|
|
1063
|
+
} | {
|
|
1064
|
+
readonly type: "video_url";
|
|
1065
|
+
readonly video_url: {
|
|
1066
|
+
readonly url: string;
|
|
1067
|
+
};
|
|
913
1068
|
} | {
|
|
914
1069
|
readonly type: "file";
|
|
915
1070
|
readonly file: {
|
|
@@ -931,6 +1086,11 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
931
1086
|
readonly image_url: {
|
|
932
1087
|
readonly url: string;
|
|
933
1088
|
};
|
|
1089
|
+
} | {
|
|
1090
|
+
readonly type: "video_url";
|
|
1091
|
+
readonly video_url: {
|
|
1092
|
+
readonly url: string;
|
|
1093
|
+
};
|
|
934
1094
|
} | {
|
|
935
1095
|
readonly type: "file";
|
|
936
1096
|
readonly file: {
|
|
@@ -967,7 +1127,14 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
967
1127
|
readonly ttl?: string | undefined;
|
|
968
1128
|
} | undefined;
|
|
969
1129
|
}[] | null;
|
|
970
|
-
readonly tool_calls?: readonly {
|
|
1130
|
+
readonly tool_calls?: readonly ({
|
|
1131
|
+
readonly id: string;
|
|
1132
|
+
readonly type: "custom";
|
|
1133
|
+
readonly custom: {
|
|
1134
|
+
readonly name: string;
|
|
1135
|
+
readonly input: string;
|
|
1136
|
+
};
|
|
1137
|
+
} | {
|
|
971
1138
|
readonly id: string;
|
|
972
1139
|
readonly type: "function";
|
|
973
1140
|
readonly function: {
|
|
@@ -979,13 +1146,13 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
979
1146
|
readonly thought_signature: string;
|
|
980
1147
|
};
|
|
981
1148
|
} | undefined;
|
|
982
|
-
}[] | undefined;
|
|
1149
|
+
})[] | undefined;
|
|
983
1150
|
readonly reasoning_content?: string | undefined;
|
|
984
1151
|
readonly reasoning?: string | undefined;
|
|
985
1152
|
readonly reasoning_text?: string | undefined;
|
|
986
1153
|
readonly reasoning_details?: unknown;
|
|
987
1154
|
})[];
|
|
988
|
-
readonly tools?: readonly {
|
|
1155
|
+
readonly tools?: readonly ({
|
|
989
1156
|
readonly type: "function";
|
|
990
1157
|
readonly function: {
|
|
991
1158
|
readonly name: string;
|
|
@@ -999,12 +1166,36 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
999
1166
|
readonly type: "ephemeral";
|
|
1000
1167
|
readonly ttl?: string | undefined;
|
|
1001
1168
|
} | undefined;
|
|
1002
|
-
}
|
|
1169
|
+
} | {
|
|
1170
|
+
readonly type: "custom";
|
|
1171
|
+
readonly custom: {
|
|
1172
|
+
readonly name: string;
|
|
1173
|
+
readonly description: string;
|
|
1174
|
+
readonly format: {
|
|
1175
|
+
readonly type: "text";
|
|
1176
|
+
} | {
|
|
1177
|
+
readonly type: "grammar";
|
|
1178
|
+
readonly grammar: {
|
|
1179
|
+
readonly syntax: "lark" | "regex";
|
|
1180
|
+
readonly definition: string;
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
readonly cache_control?: {
|
|
1185
|
+
readonly type: "ephemeral";
|
|
1186
|
+
readonly ttl?: string | undefined;
|
|
1187
|
+
} | undefined;
|
|
1188
|
+
})[] | undefined;
|
|
1003
1189
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1004
1190
|
readonly type: "function";
|
|
1005
1191
|
readonly function: {
|
|
1006
1192
|
readonly name: string;
|
|
1007
1193
|
};
|
|
1194
|
+
} | {
|
|
1195
|
+
readonly type: "custom";
|
|
1196
|
+
readonly custom: {
|
|
1197
|
+
readonly name: string;
|
|
1198
|
+
};
|
|
1008
1199
|
} | undefined;
|
|
1009
1200
|
readonly stream: true;
|
|
1010
1201
|
readonly stream_options?: {
|
|
@@ -1012,7 +1203,18 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1012
1203
|
} | undefined;
|
|
1013
1204
|
readonly store?: boolean | undefined;
|
|
1014
1205
|
readonly prompt_cache_key?: string | undefined;
|
|
1206
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1207
|
+
readonly prompt_cache_options?: {
|
|
1208
|
+
readonly ttl?: string | undefined;
|
|
1209
|
+
} | undefined;
|
|
1015
1210
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1211
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1212
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1213
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1214
|
+
readonly metadata?: {
|
|
1215
|
+
readonly [x: string]: string;
|
|
1216
|
+
} | undefined;
|
|
1217
|
+
readonly safety_identifier?: string | undefined;
|
|
1016
1218
|
readonly tool_stream?: boolean | undefined;
|
|
1017
1219
|
readonly max_completion_tokens?: number | undefined;
|
|
1018
1220
|
readonly max_tokens?: number | undefined;
|
|
@@ -1038,7 +1240,7 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1038
1240
|
readonly role: "developer";
|
|
1039
1241
|
readonly content: string;
|
|
1040
1242
|
} | {
|
|
1041
|
-
readonly type: "function_call_output";
|
|
1243
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
1042
1244
|
readonly call_id: string;
|
|
1043
1245
|
readonly output: string | readonly ({
|
|
1044
1246
|
readonly type: "input_text";
|
|
@@ -1075,6 +1277,9 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1075
1277
|
readonly content: readonly ({
|
|
1076
1278
|
readonly type: "input_text";
|
|
1077
1279
|
readonly text: string;
|
|
1280
|
+
} | {
|
|
1281
|
+
readonly type: "input_video";
|
|
1282
|
+
readonly video_url: string;
|
|
1078
1283
|
} | {
|
|
1079
1284
|
readonly type: "input_image";
|
|
1080
1285
|
readonly image_url: string;
|
|
@@ -1105,6 +1310,12 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1105
1310
|
readonly name: string;
|
|
1106
1311
|
readonly namespace?: string | undefined;
|
|
1107
1312
|
readonly arguments: string;
|
|
1313
|
+
} | {
|
|
1314
|
+
readonly type: "custom_tool_call";
|
|
1315
|
+
readonly id?: string | undefined;
|
|
1316
|
+
readonly call_id: string;
|
|
1317
|
+
readonly name: string;
|
|
1318
|
+
readonly input: string;
|
|
1108
1319
|
} | {
|
|
1109
1320
|
readonly [x: string]: unknown;
|
|
1110
1321
|
readonly type: "web_search_call";
|
|
@@ -1161,10 +1372,6 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1161
1372
|
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1162
1373
|
readonly prompt_cache_key?: string | undefined;
|
|
1163
1374
|
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
1375
|
readonly text?: {
|
|
1169
1376
|
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1170
1377
|
} | undefined;
|
|
@@ -1175,7 +1382,22 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1175
1382
|
readonly top_p?: number | undefined;
|
|
1176
1383
|
readonly presence_penalty?: number | undefined;
|
|
1177
1384
|
readonly frequency_penalty?: number | undefined;
|
|
1385
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1386
|
+
readonly prompt_cache_options?: {
|
|
1387
|
+
readonly ttl?: string | undefined;
|
|
1388
|
+
} | undefined;
|
|
1178
1389
|
readonly tools?: readonly ({
|
|
1390
|
+
readonly type: "custom";
|
|
1391
|
+
readonly name: string;
|
|
1392
|
+
readonly description: string;
|
|
1393
|
+
readonly format: {
|
|
1394
|
+
readonly type: "text";
|
|
1395
|
+
} | {
|
|
1396
|
+
readonly type: "grammar";
|
|
1397
|
+
readonly syntax: "lark" | "regex";
|
|
1398
|
+
readonly definition: string;
|
|
1399
|
+
};
|
|
1400
|
+
} | {
|
|
1179
1401
|
readonly type: "namespace";
|
|
1180
1402
|
readonly name: string;
|
|
1181
1403
|
readonly description: string;
|
|
@@ -1208,18 +1430,24 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1208
1430
|
readonly size?: string | undefined;
|
|
1209
1431
|
})[] | undefined;
|
|
1210
1432
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
1211
|
-
readonly type: "function";
|
|
1433
|
+
readonly type: "custom" | "function";
|
|
1212
1434
|
readonly name: string;
|
|
1213
1435
|
} | {
|
|
1214
1436
|
readonly type: "allowed_tools";
|
|
1215
1437
|
readonly mode: "auto" | "none" | "required";
|
|
1216
1438
|
readonly tools: readonly {
|
|
1217
|
-
readonly type: "function";
|
|
1439
|
+
readonly type: "custom" | "function";
|
|
1218
1440
|
readonly name: string;
|
|
1219
1441
|
}[];
|
|
1220
1442
|
} | {
|
|
1221
1443
|
readonly type: "image_generation";
|
|
1222
1444
|
} | undefined;
|
|
1445
|
+
readonly reasoning?: {
|
|
1446
|
+
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
1447
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
1448
|
+
readonly mode?: import("../schema/options.js").OpenString<"pro" | "standard"> | undefined;
|
|
1449
|
+
readonly context?: import("../schema/options.js").OpenString<"all_turns" | "auto" | "current_turn"> | undefined;
|
|
1450
|
+
} | undefined;
|
|
1223
1451
|
readonly context_management?: readonly {
|
|
1224
1452
|
readonly type: "compaction";
|
|
1225
1453
|
readonly compact_threshold?: number | undefined;
|
|
@@ -1229,17 +1457,19 @@ export declare const routes: (import("../route/client.js").Route<{
|
|
|
1229
1457
|
endpoint: import("../route/client.js").CompactOperation;
|
|
1230
1458
|
trigger: import("../route/client.js").TriggerCompactOperation;
|
|
1231
1459
|
}>)[];
|
|
1232
|
-
export declare const configure: (input:
|
|
1460
|
+
export declare const configure: (input: Config) => {
|
|
1233
1461
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1234
1462
|
model: (value: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, {
|
|
1235
1463
|
endpoint: import("../route/client.js").CompactOperation;
|
|
1236
1464
|
trigger: import("../route/client.js").TriggerCompactOperation;
|
|
1237
1465
|
}>;
|
|
1466
|
+
decision: (value: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
|
|
1238
1467
|
configure: typeof configure;
|
|
1239
1468
|
};
|
|
1240
1469
|
export declare const provider: {
|
|
1241
1470
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1242
1471
|
configure: typeof configure;
|
|
1243
1472
|
};
|
|
1244
|
-
export declare const model: ProviderPackage.
|
|
1473
|
+
export declare const model: ProviderPackage.Model<Settings, OpenAIProviderOptionsInput>;
|
|
1474
|
+
export declare const decisionModel: (modelID: string, settings: Settings) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
|
|
1245
1475
|
export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";
|