@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
package/dist/providers/meta.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ImageGenerationOptions {
|
|
|
30
30
|
readonly enableShell?: boolean;
|
|
31
31
|
}
|
|
32
32
|
export declare const imageGeneration: (options?: ImageGenerationOptions) => ToolDefinition;
|
|
33
|
-
export type
|
|
33
|
+
export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
34
34
|
readonly baseURL?: string;
|
|
35
35
|
readonly providerOptions?: ProviderOptionsInput;
|
|
36
36
|
};
|
|
@@ -39,127 +39,6 @@ export type Settings = ProviderPackage.Settings & ProviderOptionsInput & {
|
|
|
39
39
|
readonly baseURL?: string;
|
|
40
40
|
};
|
|
41
41
|
export declare const routes: (Route<{
|
|
42
|
-
readonly model: string;
|
|
43
|
-
readonly messages: readonly ({
|
|
44
|
-
readonly role: "system";
|
|
45
|
-
readonly content: string | readonly ({
|
|
46
|
-
readonly type: "image_url";
|
|
47
|
-
readonly image_url: {
|
|
48
|
-
readonly url: string;
|
|
49
|
-
};
|
|
50
|
-
} | {
|
|
51
|
-
readonly type: "file";
|
|
52
|
-
readonly file: {
|
|
53
|
-
readonly filename: string;
|
|
54
|
-
readonly file_data: string;
|
|
55
|
-
};
|
|
56
|
-
} | {
|
|
57
|
-
readonly type: "text";
|
|
58
|
-
readonly text: string;
|
|
59
|
-
readonly cache_control?: {
|
|
60
|
-
readonly type: "ephemeral";
|
|
61
|
-
readonly ttl?: string | undefined;
|
|
62
|
-
} | undefined;
|
|
63
|
-
})[];
|
|
64
|
-
} | {
|
|
65
|
-
readonly role: "user";
|
|
66
|
-
readonly content: string | readonly ({
|
|
67
|
-
readonly type: "image_url";
|
|
68
|
-
readonly image_url: {
|
|
69
|
-
readonly url: string;
|
|
70
|
-
};
|
|
71
|
-
} | {
|
|
72
|
-
readonly type: "file";
|
|
73
|
-
readonly file: {
|
|
74
|
-
readonly filename: string;
|
|
75
|
-
readonly file_data: string;
|
|
76
|
-
};
|
|
77
|
-
} | {
|
|
78
|
-
readonly type: "text";
|
|
79
|
-
readonly text: string;
|
|
80
|
-
readonly cache_control?: {
|
|
81
|
-
readonly type: "ephemeral";
|
|
82
|
-
readonly ttl?: string | undefined;
|
|
83
|
-
} | undefined;
|
|
84
|
-
})[];
|
|
85
|
-
} | {
|
|
86
|
-
readonly role: "tool";
|
|
87
|
-
readonly tool_call_id: string;
|
|
88
|
-
readonly content: string | readonly {
|
|
89
|
-
readonly type: "text";
|
|
90
|
-
readonly text: string;
|
|
91
|
-
readonly cache_control?: {
|
|
92
|
-
readonly type: "ephemeral";
|
|
93
|
-
readonly ttl?: string | undefined;
|
|
94
|
-
} | undefined;
|
|
95
|
-
}[];
|
|
96
|
-
} | {
|
|
97
|
-
readonly [x: string]: unknown;
|
|
98
|
-
readonly role: "assistant";
|
|
99
|
-
readonly content: string | readonly {
|
|
100
|
-
readonly type: "text";
|
|
101
|
-
readonly text: string;
|
|
102
|
-
readonly cache_control?: {
|
|
103
|
-
readonly type: "ephemeral";
|
|
104
|
-
readonly ttl?: string | undefined;
|
|
105
|
-
} | undefined;
|
|
106
|
-
}[] | null;
|
|
107
|
-
readonly tool_calls?: readonly {
|
|
108
|
-
readonly id: string;
|
|
109
|
-
readonly type: "function";
|
|
110
|
-
readonly function: {
|
|
111
|
-
readonly name: string;
|
|
112
|
-
readonly arguments: string;
|
|
113
|
-
};
|
|
114
|
-
readonly extra_content?: {
|
|
115
|
-
readonly google: {
|
|
116
|
-
readonly thought_signature: string;
|
|
117
|
-
};
|
|
118
|
-
} | undefined;
|
|
119
|
-
}[] | undefined;
|
|
120
|
-
readonly reasoning_content?: string | undefined;
|
|
121
|
-
readonly reasoning?: string | undefined;
|
|
122
|
-
readonly reasoning_text?: string | undefined;
|
|
123
|
-
readonly reasoning_details?: unknown;
|
|
124
|
-
})[];
|
|
125
|
-
readonly tools?: readonly {
|
|
126
|
-
readonly type: "function";
|
|
127
|
-
readonly function: {
|
|
128
|
-
readonly name: string;
|
|
129
|
-
readonly description: string;
|
|
130
|
-
readonly parameters: {
|
|
131
|
-
readonly [x: string]: unknown;
|
|
132
|
-
};
|
|
133
|
-
readonly strict?: boolean | undefined;
|
|
134
|
-
};
|
|
135
|
-
readonly cache_control?: {
|
|
136
|
-
readonly type: "ephemeral";
|
|
137
|
-
readonly ttl?: string | undefined;
|
|
138
|
-
} | undefined;
|
|
139
|
-
}[] | undefined;
|
|
140
|
-
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
141
|
-
readonly type: "function";
|
|
142
|
-
readonly function: {
|
|
143
|
-
readonly name: string;
|
|
144
|
-
};
|
|
145
|
-
} | undefined;
|
|
146
|
-
readonly stream: true;
|
|
147
|
-
readonly stream_options?: {
|
|
148
|
-
readonly include_usage: boolean;
|
|
149
|
-
} | undefined;
|
|
150
|
-
readonly store?: boolean | undefined;
|
|
151
|
-
readonly prompt_cache_key?: string | undefined;
|
|
152
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
153
|
-
readonly tool_stream?: boolean | undefined;
|
|
154
|
-
readonly max_completion_tokens?: number | undefined;
|
|
155
|
-
readonly max_tokens?: number | undefined;
|
|
156
|
-
readonly temperature?: number | undefined;
|
|
157
|
-
readonly top_p?: number | undefined;
|
|
158
|
-
readonly frequency_penalty?: number | undefined;
|
|
159
|
-
readonly presence_penalty?: number | undefined;
|
|
160
|
-
readonly seed?: number | undefined;
|
|
161
|
-
readonly stop?: readonly string[] | undefined;
|
|
162
|
-
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
163
42
|
readonly model: string;
|
|
164
43
|
readonly input: readonly ({
|
|
165
44
|
readonly type: "configuration_update";
|
|
@@ -175,7 +54,7 @@ export declare const routes: (Route<{
|
|
|
175
54
|
readonly role: "developer";
|
|
176
55
|
readonly content: string;
|
|
177
56
|
} | {
|
|
178
|
-
readonly type: "function_call_output";
|
|
57
|
+
readonly type: "custom_tool_call_output" | "function_call_output";
|
|
179
58
|
readonly call_id: string;
|
|
180
59
|
readonly output: string | readonly ({
|
|
181
60
|
readonly type: "input_text";
|
|
@@ -212,6 +91,9 @@ export declare const routes: (Route<{
|
|
|
212
91
|
readonly content: readonly ({
|
|
213
92
|
readonly type: "input_text";
|
|
214
93
|
readonly text: string;
|
|
94
|
+
} | {
|
|
95
|
+
readonly type: "input_video";
|
|
96
|
+
readonly video_url: string;
|
|
215
97
|
} | {
|
|
216
98
|
readonly type: "input_image";
|
|
217
99
|
readonly image_url: string;
|
|
@@ -242,6 +124,12 @@ export declare const routes: (Route<{
|
|
|
242
124
|
readonly name: string;
|
|
243
125
|
readonly namespace?: string | undefined;
|
|
244
126
|
readonly arguments: string;
|
|
127
|
+
} | {
|
|
128
|
+
readonly type: "custom_tool_call";
|
|
129
|
+
readonly id?: string | undefined;
|
|
130
|
+
readonly call_id: string;
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly input: string;
|
|
245
133
|
} | {
|
|
246
134
|
readonly [x: string]: unknown;
|
|
247
135
|
readonly type: "web_search_call";
|
|
@@ -286,6 +174,17 @@ export declare const routes: (Route<{
|
|
|
286
174
|
})[];
|
|
287
175
|
readonly instructions?: string | undefined;
|
|
288
176
|
readonly tools?: readonly ({
|
|
177
|
+
readonly type: "custom";
|
|
178
|
+
readonly name: string;
|
|
179
|
+
readonly description: string;
|
|
180
|
+
readonly format: {
|
|
181
|
+
readonly type: "text";
|
|
182
|
+
} | {
|
|
183
|
+
readonly type: "grammar";
|
|
184
|
+
readonly syntax: "lark" | "regex";
|
|
185
|
+
readonly definition: string;
|
|
186
|
+
};
|
|
187
|
+
} | {
|
|
289
188
|
readonly type: "function";
|
|
290
189
|
readonly name: string;
|
|
291
190
|
readonly description: string;
|
|
@@ -298,13 +197,13 @@ export declare const routes: (Route<{
|
|
|
298
197
|
readonly type: string;
|
|
299
198
|
})[] | undefined;
|
|
300
199
|
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
301
|
-
readonly type: "function";
|
|
200
|
+
readonly type: "custom" | "function";
|
|
302
201
|
readonly name: string;
|
|
303
202
|
} | {
|
|
304
203
|
readonly type: "allowed_tools";
|
|
305
204
|
readonly mode: "auto" | "none" | "required";
|
|
306
205
|
readonly tools: readonly {
|
|
307
|
-
readonly type: "function";
|
|
206
|
+
readonly type: "custom" | "function";
|
|
308
207
|
readonly name: string;
|
|
309
208
|
}[];
|
|
310
209
|
} | undefined;
|
|
@@ -336,6 +235,179 @@ export declare const routes: (Route<{
|
|
|
336
235
|
readonly presence_penalty?: number | undefined;
|
|
337
236
|
readonly frequency_penalty?: number | undefined;
|
|
338
237
|
readonly stream: true;
|
|
238
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
239
|
+
readonly model: string;
|
|
240
|
+
readonly messages: readonly ({
|
|
241
|
+
readonly role: "system";
|
|
242
|
+
readonly content: string | readonly ({
|
|
243
|
+
readonly type: "image_url";
|
|
244
|
+
readonly image_url: {
|
|
245
|
+
readonly url: string;
|
|
246
|
+
};
|
|
247
|
+
} | {
|
|
248
|
+
readonly type: "video_url";
|
|
249
|
+
readonly video_url: {
|
|
250
|
+
readonly url: string;
|
|
251
|
+
};
|
|
252
|
+
} | {
|
|
253
|
+
readonly type: "file";
|
|
254
|
+
readonly file: {
|
|
255
|
+
readonly filename: string;
|
|
256
|
+
readonly file_data: string;
|
|
257
|
+
};
|
|
258
|
+
} | {
|
|
259
|
+
readonly type: "text";
|
|
260
|
+
readonly text: string;
|
|
261
|
+
readonly cache_control?: {
|
|
262
|
+
readonly type: "ephemeral";
|
|
263
|
+
readonly ttl?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
})[];
|
|
266
|
+
} | {
|
|
267
|
+
readonly role: "user";
|
|
268
|
+
readonly content: string | readonly ({
|
|
269
|
+
readonly type: "image_url";
|
|
270
|
+
readonly image_url: {
|
|
271
|
+
readonly url: string;
|
|
272
|
+
};
|
|
273
|
+
} | {
|
|
274
|
+
readonly type: "video_url";
|
|
275
|
+
readonly video_url: {
|
|
276
|
+
readonly url: string;
|
|
277
|
+
};
|
|
278
|
+
} | {
|
|
279
|
+
readonly type: "file";
|
|
280
|
+
readonly file: {
|
|
281
|
+
readonly filename: string;
|
|
282
|
+
readonly file_data: string;
|
|
283
|
+
};
|
|
284
|
+
} | {
|
|
285
|
+
readonly type: "text";
|
|
286
|
+
readonly text: string;
|
|
287
|
+
readonly cache_control?: {
|
|
288
|
+
readonly type: "ephemeral";
|
|
289
|
+
readonly ttl?: string | undefined;
|
|
290
|
+
} | undefined;
|
|
291
|
+
})[];
|
|
292
|
+
} | {
|
|
293
|
+
readonly role: "tool";
|
|
294
|
+
readonly tool_call_id: string;
|
|
295
|
+
readonly content: string | readonly {
|
|
296
|
+
readonly type: "text";
|
|
297
|
+
readonly text: string;
|
|
298
|
+
readonly cache_control?: {
|
|
299
|
+
readonly type: "ephemeral";
|
|
300
|
+
readonly ttl?: string | undefined;
|
|
301
|
+
} | undefined;
|
|
302
|
+
}[];
|
|
303
|
+
} | {
|
|
304
|
+
readonly [x: string]: unknown;
|
|
305
|
+
readonly role: "assistant";
|
|
306
|
+
readonly content: string | readonly {
|
|
307
|
+
readonly type: "text";
|
|
308
|
+
readonly text: string;
|
|
309
|
+
readonly cache_control?: {
|
|
310
|
+
readonly type: "ephemeral";
|
|
311
|
+
readonly ttl?: string | undefined;
|
|
312
|
+
} | undefined;
|
|
313
|
+
}[] | null;
|
|
314
|
+
readonly tool_calls?: readonly ({
|
|
315
|
+
readonly id: string;
|
|
316
|
+
readonly type: "custom";
|
|
317
|
+
readonly custom: {
|
|
318
|
+
readonly name: string;
|
|
319
|
+
readonly input: string;
|
|
320
|
+
};
|
|
321
|
+
} | {
|
|
322
|
+
readonly id: string;
|
|
323
|
+
readonly type: "function";
|
|
324
|
+
readonly function: {
|
|
325
|
+
readonly name: string;
|
|
326
|
+
readonly arguments: string;
|
|
327
|
+
};
|
|
328
|
+
readonly extra_content?: {
|
|
329
|
+
readonly google: {
|
|
330
|
+
readonly thought_signature: string;
|
|
331
|
+
};
|
|
332
|
+
} | undefined;
|
|
333
|
+
})[] | undefined;
|
|
334
|
+
readonly reasoning_content?: string | undefined;
|
|
335
|
+
readonly reasoning?: string | undefined;
|
|
336
|
+
readonly reasoning_text?: string | undefined;
|
|
337
|
+
readonly reasoning_details?: unknown;
|
|
338
|
+
})[];
|
|
339
|
+
readonly tools?: readonly ({
|
|
340
|
+
readonly type: "function";
|
|
341
|
+
readonly function: {
|
|
342
|
+
readonly name: string;
|
|
343
|
+
readonly description: string;
|
|
344
|
+
readonly parameters: {
|
|
345
|
+
readonly [x: string]: unknown;
|
|
346
|
+
};
|
|
347
|
+
readonly strict?: boolean | undefined;
|
|
348
|
+
};
|
|
349
|
+
readonly cache_control?: {
|
|
350
|
+
readonly type: "ephemeral";
|
|
351
|
+
readonly ttl?: string | undefined;
|
|
352
|
+
} | undefined;
|
|
353
|
+
} | {
|
|
354
|
+
readonly type: "custom";
|
|
355
|
+
readonly custom: {
|
|
356
|
+
readonly name: string;
|
|
357
|
+
readonly description: string;
|
|
358
|
+
readonly format: {
|
|
359
|
+
readonly type: "text";
|
|
360
|
+
} | {
|
|
361
|
+
readonly type: "grammar";
|
|
362
|
+
readonly grammar: {
|
|
363
|
+
readonly syntax: "lark" | "regex";
|
|
364
|
+
readonly definition: string;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly cache_control?: {
|
|
369
|
+
readonly type: "ephemeral";
|
|
370
|
+
readonly ttl?: string | undefined;
|
|
371
|
+
} | undefined;
|
|
372
|
+
})[] | undefined;
|
|
373
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
374
|
+
readonly type: "function";
|
|
375
|
+
readonly function: {
|
|
376
|
+
readonly name: string;
|
|
377
|
+
};
|
|
378
|
+
} | {
|
|
379
|
+
readonly type: "custom";
|
|
380
|
+
readonly custom: {
|
|
381
|
+
readonly name: string;
|
|
382
|
+
};
|
|
383
|
+
} | undefined;
|
|
384
|
+
readonly stream: true;
|
|
385
|
+
readonly stream_options?: {
|
|
386
|
+
readonly include_usage: boolean;
|
|
387
|
+
} | undefined;
|
|
388
|
+
readonly store?: boolean | undefined;
|
|
389
|
+
readonly prompt_cache_key?: string | undefined;
|
|
390
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
391
|
+
readonly prompt_cache_options?: {
|
|
392
|
+
readonly ttl?: string | undefined;
|
|
393
|
+
} | undefined;
|
|
394
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
395
|
+
readonly verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
|
|
396
|
+
readonly service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
397
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
398
|
+
readonly metadata?: {
|
|
399
|
+
readonly [x: string]: string;
|
|
400
|
+
} | undefined;
|
|
401
|
+
readonly safety_identifier?: string | undefined;
|
|
402
|
+
readonly tool_stream?: boolean | undefined;
|
|
403
|
+
readonly max_completion_tokens?: number | undefined;
|
|
404
|
+
readonly max_tokens?: number | undefined;
|
|
405
|
+
readonly temperature?: number | undefined;
|
|
406
|
+
readonly top_p?: number | undefined;
|
|
407
|
+
readonly frequency_penalty?: number | undefined;
|
|
408
|
+
readonly presence_penalty?: number | undefined;
|
|
409
|
+
readonly seed?: number | undefined;
|
|
410
|
+
readonly stop?: readonly string[] | undefined;
|
|
339
411
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
340
412
|
readonly context_management?: {
|
|
341
413
|
readonly edits: readonly {
|
|
@@ -354,7 +426,7 @@ export declare const routes: (Route<{
|
|
|
354
426
|
readonly text: string;
|
|
355
427
|
readonly cache_control?: {
|
|
356
428
|
readonly type: "ephemeral";
|
|
357
|
-
readonly ttl?:
|
|
429
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
358
430
|
} | undefined;
|
|
359
431
|
}[] | undefined;
|
|
360
432
|
readonly messages: readonly ({
|
|
@@ -364,7 +436,7 @@ export declare const routes: (Route<{
|
|
|
364
436
|
readonly text: string;
|
|
365
437
|
readonly cache_control?: {
|
|
366
438
|
readonly type: "ephemeral";
|
|
367
|
-
readonly ttl?:
|
|
439
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
368
440
|
} | undefined;
|
|
369
441
|
} | {
|
|
370
442
|
readonly type: "image";
|
|
@@ -381,11 +453,28 @@ export declare const routes: (Route<{
|
|
|
381
453
|
};
|
|
382
454
|
readonly cache_control?: {
|
|
383
455
|
readonly type: "ephemeral";
|
|
384
|
-
readonly ttl?:
|
|
456
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
385
457
|
} | undefined;
|
|
386
458
|
readonly transformations?: {
|
|
387
459
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
388
460
|
} | undefined;
|
|
461
|
+
} | {
|
|
462
|
+
readonly type: "video";
|
|
463
|
+
readonly source: {
|
|
464
|
+
readonly type: "base64";
|
|
465
|
+
readonly media_type: string;
|
|
466
|
+
readonly data: string;
|
|
467
|
+
} | {
|
|
468
|
+
readonly type: "url";
|
|
469
|
+
readonly url: string;
|
|
470
|
+
} | {
|
|
471
|
+
readonly type: "file";
|
|
472
|
+
readonly file_id: string;
|
|
473
|
+
};
|
|
474
|
+
readonly cache_control?: {
|
|
475
|
+
readonly type: "ephemeral";
|
|
476
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
477
|
+
} | undefined;
|
|
389
478
|
} | {
|
|
390
479
|
readonly type: "document";
|
|
391
480
|
readonly source: {
|
|
@@ -405,7 +494,7 @@ export declare const routes: (Route<{
|
|
|
405
494
|
};
|
|
406
495
|
readonly cache_control?: {
|
|
407
496
|
readonly type: "ephemeral";
|
|
408
|
-
readonly ttl?:
|
|
497
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
409
498
|
} | undefined;
|
|
410
499
|
readonly title?: string | undefined;
|
|
411
500
|
readonly context?: string | undefined;
|
|
@@ -420,7 +509,7 @@ export declare const routes: (Route<{
|
|
|
420
509
|
readonly text: string;
|
|
421
510
|
readonly cache_control?: {
|
|
422
511
|
readonly type: "ephemeral";
|
|
423
|
-
readonly ttl?:
|
|
512
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
424
513
|
} | undefined;
|
|
425
514
|
} | {
|
|
426
515
|
readonly type: "image";
|
|
@@ -437,11 +526,28 @@ export declare const routes: (Route<{
|
|
|
437
526
|
};
|
|
438
527
|
readonly cache_control?: {
|
|
439
528
|
readonly type: "ephemeral";
|
|
440
|
-
readonly ttl?:
|
|
529
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
441
530
|
} | undefined;
|
|
442
531
|
readonly transformations?: {
|
|
443
532
|
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
444
533
|
} | undefined;
|
|
534
|
+
} | {
|
|
535
|
+
readonly type: "video";
|
|
536
|
+
readonly source: {
|
|
537
|
+
readonly type: "base64";
|
|
538
|
+
readonly media_type: string;
|
|
539
|
+
readonly data: string;
|
|
540
|
+
} | {
|
|
541
|
+
readonly type: "url";
|
|
542
|
+
readonly url: string;
|
|
543
|
+
} | {
|
|
544
|
+
readonly type: "file";
|
|
545
|
+
readonly file_id: string;
|
|
546
|
+
};
|
|
547
|
+
readonly cache_control?: {
|
|
548
|
+
readonly type: "ephemeral";
|
|
549
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
550
|
+
} | undefined;
|
|
445
551
|
} | {
|
|
446
552
|
readonly type: "document";
|
|
447
553
|
readonly source: {
|
|
@@ -461,7 +567,7 @@ export declare const routes: (Route<{
|
|
|
461
567
|
};
|
|
462
568
|
readonly cache_control?: {
|
|
463
569
|
readonly type: "ephemeral";
|
|
464
|
-
readonly ttl?:
|
|
570
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
465
571
|
} | undefined;
|
|
466
572
|
readonly title?: string | undefined;
|
|
467
573
|
readonly context?: string | undefined;
|
|
@@ -472,7 +578,7 @@ export declare const routes: (Route<{
|
|
|
472
578
|
readonly is_error?: boolean | undefined;
|
|
473
579
|
readonly cache_control?: {
|
|
474
580
|
readonly type: "ephemeral";
|
|
475
|
-
readonly ttl?:
|
|
581
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
476
582
|
} | undefined;
|
|
477
583
|
})[];
|
|
478
584
|
} | {
|
|
@@ -485,7 +591,7 @@ export declare const routes: (Route<{
|
|
|
485
591
|
readonly text: string;
|
|
486
592
|
readonly cache_control?: {
|
|
487
593
|
readonly type: "ephemeral";
|
|
488
|
-
readonly ttl?:
|
|
594
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
489
595
|
} | undefined;
|
|
490
596
|
} | {
|
|
491
597
|
readonly type: "thinking";
|
|
@@ -493,14 +599,14 @@ export declare const routes: (Route<{
|
|
|
493
599
|
readonly signature: string;
|
|
494
600
|
readonly cache_control?: {
|
|
495
601
|
readonly type: "ephemeral";
|
|
496
|
-
readonly ttl?:
|
|
602
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
497
603
|
} | undefined;
|
|
498
604
|
} | {
|
|
499
605
|
readonly type: "redacted_thinking";
|
|
500
606
|
readonly data: string;
|
|
501
607
|
readonly cache_control?: {
|
|
502
608
|
readonly type: "ephemeral";
|
|
503
|
-
readonly ttl?:
|
|
609
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
504
610
|
} | undefined;
|
|
505
611
|
} | {
|
|
506
612
|
readonly type: "tool_use";
|
|
@@ -509,7 +615,7 @@ export declare const routes: (Route<{
|
|
|
509
615
|
readonly input: unknown;
|
|
510
616
|
readonly cache_control?: {
|
|
511
617
|
readonly type: "ephemeral";
|
|
512
|
-
readonly ttl?:
|
|
618
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
513
619
|
} | undefined;
|
|
514
620
|
} | {
|
|
515
621
|
readonly type: "server_tool_use";
|
|
@@ -518,7 +624,7 @@ export declare const routes: (Route<{
|
|
|
518
624
|
readonly input: unknown;
|
|
519
625
|
readonly cache_control?: {
|
|
520
626
|
readonly type: "ephemeral";
|
|
521
|
-
readonly ttl?:
|
|
627
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
522
628
|
} | undefined;
|
|
523
629
|
} | {
|
|
524
630
|
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
@@ -526,7 +632,7 @@ export declare const routes: (Route<{
|
|
|
526
632
|
readonly content: unknown;
|
|
527
633
|
readonly cache_control?: {
|
|
528
634
|
readonly type: "ephemeral";
|
|
529
|
-
readonly ttl?:
|
|
635
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
530
636
|
} | undefined;
|
|
531
637
|
})[];
|
|
532
638
|
} | {
|
|
@@ -536,7 +642,7 @@ export declare const routes: (Route<{
|
|
|
536
642
|
readonly text: string;
|
|
537
643
|
readonly cache_control?: {
|
|
538
644
|
readonly type: "ephemeral";
|
|
539
|
-
readonly ttl?:
|
|
645
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
540
646
|
} | undefined;
|
|
541
647
|
}[];
|
|
542
648
|
readonly output_config?: {
|
|
@@ -584,7 +690,7 @@ export declare const routes: (Route<{
|
|
|
584
690
|
} | undefined;
|
|
585
691
|
readonly cache_control?: {
|
|
586
692
|
readonly type: "ephemeral";
|
|
587
|
-
readonly ttl?:
|
|
693
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
588
694
|
} | undefined;
|
|
589
695
|
readonly container?: string | {
|
|
590
696
|
readonly id?: string | null | undefined;
|
|
@@ -597,6 +703,7 @@ export declare const routes: (Route<{
|
|
|
597
703
|
readonly user_id?: string | null | undefined;
|
|
598
704
|
} | undefined;
|
|
599
705
|
readonly service_tier?: OpenString<"auto" | "standard_only"> | undefined;
|
|
706
|
+
readonly speed?: OpenString<"fast" | "standard"> | undefined;
|
|
600
707
|
readonly tools?: readonly ({
|
|
601
708
|
readonly type: "web_search";
|
|
602
709
|
readonly name: "web_search";
|
|
@@ -615,11 +722,11 @@ export declare const routes: (Route<{
|
|
|
615
722
|
};
|
|
616
723
|
readonly cache_control?: {
|
|
617
724
|
readonly type: "ephemeral";
|
|
618
|
-
readonly ttl?:
|
|
725
|
+
readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
|
|
619
726
|
} | undefined;
|
|
620
727
|
})[] | undefined;
|
|
621
728
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
|
|
622
|
-
export declare const configure: (input?:
|
|
729
|
+
export declare const configure: (input?: Config) => {
|
|
623
730
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
624
731
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
625
732
|
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
@@ -641,7 +748,8 @@ export declare const responses: (modelID: string | ModelID) => import("../schema
|
|
|
641
748
|
export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
642
749
|
export declare const messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
643
750
|
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<MetaImages.ImageOptions>;
|
|
644
|
-
export declare const model: ProviderPackage.
|
|
645
|
-
export declare const chatModel: ProviderPackage.
|
|
646
|
-
export declare const messagesModel: ProviderPackage.
|
|
751
|
+
export declare const model: ProviderPackage.Model<Settings, OpenResponsesProviderOptionsInput>;
|
|
752
|
+
export declare const chatModel: ProviderPackage.Model<Settings, OpenResponsesProviderOptionsInput>;
|
|
753
|
+
export declare const messagesModel: ProviderPackage.Model<Settings, MessagesOptionsInput>;
|
|
754
|
+
export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<MetaImages.ImageOptions>;
|
|
647
755
|
export * as Meta from "./meta.js";
|
package/dist/providers/meta.js
CHANGED
|
@@ -97,7 +97,8 @@ export const image = provider.image;
|
|
|
97
97
|
export const model = (modelID, settings) => fromSettings(settings).responses(modelID);
|
|
98
98
|
export const chatModel = (modelID, settings) => fromSettings(settings).chat(modelID);
|
|
99
99
|
export const messagesModel = (modelID, settings) => fromSettings(settings).messages(modelID);
|
|
100
|
-
|
|
100
|
+
export const imageModel = (modelID, settings) => fromSettings(settings).image(modelID);
|
|
101
|
+
function fromSettings({ apiKey, baseURL, body, headers, ...providerOptions } = {}) {
|
|
101
102
|
return configure({
|
|
102
103
|
apiKey,
|
|
103
104
|
baseURL,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ProviderPackage } from "../../provider-package.js";
|
|
2
2
|
import { MiniMax } from "../minimax.js";
|
|
3
3
|
export type Settings = MiniMax.Settings<MiniMax.ChatOptionsInput>;
|
|
4
|
-
export declare const model: ProviderPackage.
|
|
4
|
+
export declare const model: ProviderPackage.Model<Settings, MiniMax.ChatOptionsInput>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MiniMax } from "../minimax.js";
|
|
2
|
-
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => MiniMax.configure({
|
|
2
|
+
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions } = {}) => MiniMax.configure({
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { imageModel as model } from "../minimax.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ProviderPackage } from "../../provider-package.js";
|
|
2
2
|
import { MiniMax } from "../minimax.js";
|
|
3
3
|
export type Settings = MiniMax.Settings<MiniMax.ResponsesOptionsInput>;
|
|
4
|
-
export declare const model: ProviderPackage.
|
|
4
|
+
export declare const model: ProviderPackage.Model<Settings, MiniMax.ResponsesOptionsInput>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MiniMax } from "../minimax.js";
|
|
2
|
-
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => MiniMax.configure({
|
|
2
|
+
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions } = {}) => MiniMax.configure({
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|