@opencode/ai 2.0.32 → 2.1.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/dist/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +6 -14
- package/dist/experimental/realtime.js +28 -3
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -70,7 +70,7 @@ export const configure = (input = {}) => {
|
|
|
70
70
|
const messages = (modelID) => messagesRoute.with(defaults).model({ id: modelID });
|
|
71
71
|
const chat = (modelID) => chatRoute.with(defaults).model({
|
|
72
72
|
id: modelID,
|
|
73
|
-
compatibility: {
|
|
73
|
+
compatibility: { supportsStrictMode: false },
|
|
74
74
|
});
|
|
75
75
|
const responses = (modelID) => responsesRoute.with(defaults).model({ id: modelID });
|
|
76
76
|
return { id, model: messages, messages, chat, responses, configure };
|
|
@@ -34,7 +34,11 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
34
34
|
readonly document_url: string;
|
|
35
35
|
})[];
|
|
36
36
|
} | {
|
|
37
|
+
readonly role: "assistant";
|
|
37
38
|
readonly content: string | readonly ({
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
readonly text: string;
|
|
41
|
+
} | {
|
|
38
42
|
readonly [x: string]: unknown;
|
|
39
43
|
readonly type: "thinking";
|
|
40
44
|
readonly thinking: readonly {
|
|
@@ -42,11 +46,7 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
42
46
|
readonly type?: string | undefined;
|
|
43
47
|
readonly text?: string | undefined;
|
|
44
48
|
}[];
|
|
45
|
-
} | {
|
|
46
|
-
readonly type: "text";
|
|
47
|
-
readonly text: string;
|
|
48
49
|
})[];
|
|
49
|
-
readonly role: "assistant";
|
|
50
50
|
readonly tool_calls?: readonly {
|
|
51
51
|
readonly id: string;
|
|
52
52
|
readonly type: "function";
|
|
@@ -71,9 +71,6 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
71
71
|
readonly document_url: string;
|
|
72
72
|
})[];
|
|
73
73
|
})[];
|
|
74
|
-
readonly stream: true;
|
|
75
|
-
readonly max_tokens?: number | undefined;
|
|
76
|
-
readonly temperature?: number | undefined;
|
|
77
74
|
readonly tools?: readonly {
|
|
78
75
|
readonly type: "function";
|
|
79
76
|
readonly function: {
|
|
@@ -85,17 +82,20 @@ export declare const route: import("../route/client.js").Route<{
|
|
|
85
82
|
readonly strict: false;
|
|
86
83
|
};
|
|
87
84
|
}[] | undefined;
|
|
88
|
-
readonly
|
|
89
|
-
readonly tool_choice?: "auto" | "none" | "any" | {
|
|
85
|
+
readonly tool_choice?: "any" | "auto" | "none" | {
|
|
90
86
|
readonly type: "function";
|
|
91
87
|
readonly function: {
|
|
92
88
|
readonly name: string;
|
|
93
89
|
};
|
|
94
90
|
} | undefined;
|
|
91
|
+
readonly stream: true;
|
|
92
|
+
readonly max_tokens?: number | undefined;
|
|
93
|
+
readonly random_seed?: number | undefined;
|
|
94
|
+
readonly temperature?: number | undefined;
|
|
95
95
|
readonly top_p?: number | undefined;
|
|
96
96
|
readonly frequency_penalty?: number | undefined;
|
|
97
97
|
readonly presence_penalty?: number | undefined;
|
|
98
|
-
readonly
|
|
98
|
+
readonly stop?: readonly string[] | undefined;
|
|
99
99
|
readonly prompt_cache_key?: string | undefined;
|
|
100
100
|
readonly safe_prompt?: boolean | undefined;
|
|
101
101
|
readonly document_image_limit?: number | undefined;
|
|
@@ -125,7 +125,11 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
125
125
|
readonly document_url: string;
|
|
126
126
|
})[];
|
|
127
127
|
} | {
|
|
128
|
+
readonly role: "assistant";
|
|
128
129
|
readonly content: string | readonly ({
|
|
130
|
+
readonly type: "text";
|
|
131
|
+
readonly text: string;
|
|
132
|
+
} | {
|
|
129
133
|
readonly [x: string]: unknown;
|
|
130
134
|
readonly type: "thinking";
|
|
131
135
|
readonly thinking: readonly {
|
|
@@ -133,11 +137,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
133
137
|
readonly type?: string | undefined;
|
|
134
138
|
readonly text?: string | undefined;
|
|
135
139
|
}[];
|
|
136
|
-
} | {
|
|
137
|
-
readonly type: "text";
|
|
138
|
-
readonly text: string;
|
|
139
140
|
})[];
|
|
140
|
-
readonly role: "assistant";
|
|
141
141
|
readonly tool_calls?: readonly {
|
|
142
142
|
readonly id: string;
|
|
143
143
|
readonly type: "function";
|
|
@@ -162,9 +162,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
162
162
|
readonly document_url: string;
|
|
163
163
|
})[];
|
|
164
164
|
})[];
|
|
165
|
-
readonly stream: true;
|
|
166
|
-
readonly max_tokens?: number | undefined;
|
|
167
|
-
readonly temperature?: number | undefined;
|
|
168
165
|
readonly tools?: readonly {
|
|
169
166
|
readonly type: "function";
|
|
170
167
|
readonly function: {
|
|
@@ -176,17 +173,20 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
176
173
|
readonly strict: false;
|
|
177
174
|
};
|
|
178
175
|
}[] | undefined;
|
|
179
|
-
readonly
|
|
180
|
-
readonly tool_choice?: "auto" | "none" | "any" | {
|
|
176
|
+
readonly tool_choice?: "any" | "auto" | "none" | {
|
|
181
177
|
readonly type: "function";
|
|
182
178
|
readonly function: {
|
|
183
179
|
readonly name: string;
|
|
184
180
|
};
|
|
185
181
|
} | undefined;
|
|
182
|
+
readonly stream: true;
|
|
183
|
+
readonly max_tokens?: number | undefined;
|
|
184
|
+
readonly random_seed?: number | undefined;
|
|
185
|
+
readonly temperature?: number | undefined;
|
|
186
186
|
readonly top_p?: number | undefined;
|
|
187
187
|
readonly frequency_penalty?: number | undefined;
|
|
188
188
|
readonly presence_penalty?: number | undefined;
|
|
189
|
-
readonly
|
|
189
|
+
readonly stop?: readonly string[] | undefined;
|
|
190
190
|
readonly prompt_cache_key?: string | undefined;
|
|
191
191
|
readonly safe_prompt?: boolean | undefined;
|
|
192
192
|
readonly document_image_limit?: number | undefined;
|
|
@@ -198,16 +198,12 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
198
198
|
export declare const configure: (input?: LanguageModelOptions) => {
|
|
199
199
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
200
200
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
201
|
-
configure:
|
|
201
|
+
configure: typeof configure;
|
|
202
202
|
};
|
|
203
203
|
export declare const provider: {
|
|
204
204
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
205
205
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
206
|
-
configure:
|
|
207
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
208
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
209
|
-
configure: /*elided*/ any;
|
|
210
|
-
};
|
|
206
|
+
configure: typeof configure;
|
|
211
207
|
};
|
|
212
208
|
export declare const model: ProviderPackage.Definition<Settings, ProviderOptions>["model"];
|
|
213
209
|
export * as Mistral from "./mistral.js";
|