@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
|
@@ -60,8 +60,20 @@ export declare const route: Route<{
|
|
|
60
60
|
readonly file_data: string;
|
|
61
61
|
};
|
|
62
62
|
})[];
|
|
63
|
+
} | {
|
|
64
|
+
readonly role: "tool";
|
|
65
|
+
readonly tool_call_id: string;
|
|
66
|
+
readonly content: string | readonly {
|
|
67
|
+
readonly type: "text";
|
|
68
|
+
readonly text: string;
|
|
69
|
+
readonly cache_control?: {
|
|
70
|
+
readonly type: "ephemeral";
|
|
71
|
+
readonly ttl?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
}[];
|
|
63
74
|
} | {
|
|
64
75
|
readonly [x: string]: unknown;
|
|
76
|
+
readonly role: "assistant";
|
|
65
77
|
readonly content: string | readonly {
|
|
66
78
|
readonly type: "text";
|
|
67
79
|
readonly text: string;
|
|
@@ -70,73 +82,61 @@ export declare const route: Route<{
|
|
|
70
82
|
readonly ttl?: string | undefined;
|
|
71
83
|
} | undefined;
|
|
72
84
|
}[] | null;
|
|
73
|
-
readonly role: "assistant";
|
|
74
|
-
readonly reasoning?: string | undefined;
|
|
75
|
-
readonly reasoning_content?: string | undefined;
|
|
76
|
-
readonly reasoning_text?: string | undefined;
|
|
77
85
|
readonly tool_calls?: readonly {
|
|
86
|
+
readonly id: string;
|
|
87
|
+
readonly type: "function";
|
|
78
88
|
readonly function: {
|
|
79
89
|
readonly name: string;
|
|
80
90
|
readonly arguments: string;
|
|
81
91
|
};
|
|
82
|
-
readonly id: string;
|
|
83
|
-
readonly type: "function";
|
|
84
92
|
readonly extra_content?: {
|
|
85
93
|
readonly google: {
|
|
86
94
|
readonly thought_signature: string;
|
|
87
95
|
};
|
|
88
96
|
} | undefined;
|
|
89
97
|
}[] | undefined;
|
|
98
|
+
readonly reasoning_content?: string | undefined;
|
|
99
|
+
readonly reasoning?: string | undefined;
|
|
100
|
+
readonly reasoning_text?: string | undefined;
|
|
90
101
|
readonly reasoning_details?: unknown;
|
|
91
|
-
} | {
|
|
92
|
-
readonly role: "tool";
|
|
93
|
-
readonly tool_call_id: string;
|
|
94
|
-
readonly content: string | readonly {
|
|
95
|
-
readonly type: "text";
|
|
96
|
-
readonly text: string;
|
|
97
|
-
readonly cache_control?: {
|
|
98
|
-
readonly type: "ephemeral";
|
|
99
|
-
readonly ttl?: string | undefined;
|
|
100
|
-
} | undefined;
|
|
101
|
-
}[];
|
|
102
102
|
})[];
|
|
103
|
-
readonly stream: true;
|
|
104
|
-
readonly max_completion_tokens?: number | undefined;
|
|
105
|
-
readonly max_tokens?: number | undefined;
|
|
106
|
-
readonly temperature?: number | undefined;
|
|
107
103
|
readonly tools?: readonly {
|
|
104
|
+
readonly type: "function";
|
|
108
105
|
readonly function: {
|
|
109
|
-
readonly description: string;
|
|
110
106
|
readonly name: string;
|
|
107
|
+
readonly description: string;
|
|
111
108
|
readonly parameters: {
|
|
112
109
|
readonly [x: string]: unknown;
|
|
113
110
|
};
|
|
114
111
|
readonly strict?: boolean | undefined;
|
|
115
112
|
};
|
|
116
|
-
readonly type: "function";
|
|
117
113
|
readonly cache_control?: {
|
|
118
114
|
readonly type: "ephemeral";
|
|
119
115
|
readonly ttl?: string | undefined;
|
|
120
116
|
} | undefined;
|
|
121
117
|
}[] | undefined;
|
|
122
|
-
readonly
|
|
123
|
-
readonly seed?: number | undefined;
|
|
124
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
118
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
125
119
|
readonly type: "function";
|
|
126
120
|
readonly function: {
|
|
127
121
|
readonly name: string;
|
|
128
122
|
};
|
|
129
123
|
} | undefined;
|
|
130
|
-
readonly
|
|
131
|
-
readonly frequency_penalty?: number | undefined;
|
|
132
|
-
readonly presence_penalty?: number | undefined;
|
|
133
|
-
readonly store?: boolean | undefined;
|
|
134
|
-
readonly prompt_cache_key?: string | undefined;
|
|
135
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
124
|
+
readonly stream: true;
|
|
136
125
|
readonly stream_options?: {
|
|
137
126
|
readonly include_usage: boolean;
|
|
138
127
|
} | undefined;
|
|
128
|
+
readonly store?: boolean | undefined;
|
|
129
|
+
readonly prompt_cache_key?: string | undefined;
|
|
130
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
139
131
|
readonly tool_stream?: boolean | undefined;
|
|
132
|
+
readonly max_completion_tokens?: number | undefined;
|
|
133
|
+
readonly max_tokens?: number | undefined;
|
|
134
|
+
readonly temperature?: number | undefined;
|
|
135
|
+
readonly top_p?: number | undefined;
|
|
136
|
+
readonly frequency_penalty?: number | undefined;
|
|
137
|
+
readonly presence_penalty?: number | undefined;
|
|
138
|
+
readonly seed?: number | undefined;
|
|
139
|
+
readonly stop?: readonly string[] | undefined;
|
|
140
140
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
141
141
|
export declare const routes: Route<{
|
|
142
142
|
readonly model: string;
|
|
@@ -182,8 +182,20 @@ export declare const routes: Route<{
|
|
|
182
182
|
readonly file_data: string;
|
|
183
183
|
};
|
|
184
184
|
})[];
|
|
185
|
+
} | {
|
|
186
|
+
readonly role: "tool";
|
|
187
|
+
readonly tool_call_id: string;
|
|
188
|
+
readonly content: string | readonly {
|
|
189
|
+
readonly type: "text";
|
|
190
|
+
readonly text: string;
|
|
191
|
+
readonly cache_control?: {
|
|
192
|
+
readonly type: "ephemeral";
|
|
193
|
+
readonly ttl?: string | undefined;
|
|
194
|
+
} | undefined;
|
|
195
|
+
}[];
|
|
185
196
|
} | {
|
|
186
197
|
readonly [x: string]: unknown;
|
|
198
|
+
readonly role: "assistant";
|
|
187
199
|
readonly content: string | readonly {
|
|
188
200
|
readonly type: "text";
|
|
189
201
|
readonly text: string;
|
|
@@ -192,86 +204,70 @@ export declare const routes: Route<{
|
|
|
192
204
|
readonly ttl?: string | undefined;
|
|
193
205
|
} | undefined;
|
|
194
206
|
}[] | null;
|
|
195
|
-
readonly role: "assistant";
|
|
196
|
-
readonly reasoning?: string | undefined;
|
|
197
|
-
readonly reasoning_content?: string | undefined;
|
|
198
|
-
readonly reasoning_text?: string | undefined;
|
|
199
207
|
readonly tool_calls?: readonly {
|
|
208
|
+
readonly id: string;
|
|
209
|
+
readonly type: "function";
|
|
200
210
|
readonly function: {
|
|
201
211
|
readonly name: string;
|
|
202
212
|
readonly arguments: string;
|
|
203
213
|
};
|
|
204
|
-
readonly id: string;
|
|
205
|
-
readonly type: "function";
|
|
206
214
|
readonly extra_content?: {
|
|
207
215
|
readonly google: {
|
|
208
216
|
readonly thought_signature: string;
|
|
209
217
|
};
|
|
210
218
|
} | undefined;
|
|
211
219
|
}[] | undefined;
|
|
220
|
+
readonly reasoning_content?: string | undefined;
|
|
221
|
+
readonly reasoning?: string | undefined;
|
|
222
|
+
readonly reasoning_text?: string | undefined;
|
|
212
223
|
readonly reasoning_details?: unknown;
|
|
213
|
-
} | {
|
|
214
|
-
readonly role: "tool";
|
|
215
|
-
readonly tool_call_id: string;
|
|
216
|
-
readonly content: string | readonly {
|
|
217
|
-
readonly type: "text";
|
|
218
|
-
readonly text: string;
|
|
219
|
-
readonly cache_control?: {
|
|
220
|
-
readonly type: "ephemeral";
|
|
221
|
-
readonly ttl?: string | undefined;
|
|
222
|
-
} | undefined;
|
|
223
|
-
}[];
|
|
224
224
|
})[];
|
|
225
|
-
readonly stream: true;
|
|
226
|
-
readonly max_completion_tokens?: number | undefined;
|
|
227
|
-
readonly max_tokens?: number | undefined;
|
|
228
|
-
readonly temperature?: number | undefined;
|
|
229
225
|
readonly tools?: readonly {
|
|
226
|
+
readonly type: "function";
|
|
230
227
|
readonly function: {
|
|
231
|
-
readonly description: string;
|
|
232
228
|
readonly name: string;
|
|
229
|
+
readonly description: string;
|
|
233
230
|
readonly parameters: {
|
|
234
231
|
readonly [x: string]: unknown;
|
|
235
232
|
};
|
|
236
233
|
readonly strict?: boolean | undefined;
|
|
237
234
|
};
|
|
238
|
-
readonly type: "function";
|
|
239
235
|
readonly cache_control?: {
|
|
240
236
|
readonly type: "ephemeral";
|
|
241
237
|
readonly ttl?: string | undefined;
|
|
242
238
|
} | undefined;
|
|
243
239
|
}[] | undefined;
|
|
244
|
-
readonly
|
|
245
|
-
readonly seed?: number | undefined;
|
|
246
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
240
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
247
241
|
readonly type: "function";
|
|
248
242
|
readonly function: {
|
|
249
243
|
readonly name: string;
|
|
250
244
|
};
|
|
251
245
|
} | undefined;
|
|
252
|
-
readonly
|
|
253
|
-
readonly frequency_penalty?: number | undefined;
|
|
254
|
-
readonly presence_penalty?: number | undefined;
|
|
255
|
-
readonly store?: boolean | undefined;
|
|
256
|
-
readonly prompt_cache_key?: string | undefined;
|
|
257
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
246
|
+
readonly stream: true;
|
|
258
247
|
readonly stream_options?: {
|
|
259
248
|
readonly include_usage: boolean;
|
|
260
249
|
} | undefined;
|
|
250
|
+
readonly store?: boolean | undefined;
|
|
251
|
+
readonly prompt_cache_key?: string | undefined;
|
|
252
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
261
253
|
readonly tool_stream?: boolean | undefined;
|
|
254
|
+
readonly max_completion_tokens?: number | undefined;
|
|
255
|
+
readonly max_tokens?: number | undefined;
|
|
256
|
+
readonly temperature?: number | undefined;
|
|
257
|
+
readonly top_p?: number | undefined;
|
|
258
|
+
readonly frequency_penalty?: number | undefined;
|
|
259
|
+
readonly presence_penalty?: number | undefined;
|
|
260
|
+
readonly seed?: number | undefined;
|
|
261
|
+
readonly stop?: readonly string[] | undefined;
|
|
262
262
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
263
263
|
export declare const configure: (input: LanguageModelOptions) => {
|
|
264
264
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
265
265
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
266
|
-
configure:
|
|
266
|
+
configure: typeof configure;
|
|
267
267
|
};
|
|
268
268
|
export declare const provider: {
|
|
269
269
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
270
|
-
configure:
|
|
271
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
272
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
273
|
-
configure: /*elided*/ any;
|
|
274
|
-
};
|
|
270
|
+
configure: typeof configure;
|
|
275
271
|
};
|
|
276
272
|
export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
277
273
|
export * as CloudflareWorkersAI from "./cloudflare-workers-ai.js";
|
|
@@ -19,7 +19,7 @@ export type Settings<Options = CohereChat.ProviderOptionsInput> = ProviderPackag
|
|
|
19
19
|
export declare const route: Route<{
|
|
20
20
|
readonly model: string;
|
|
21
21
|
readonly messages: readonly {
|
|
22
|
-
readonly role: "
|
|
22
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
23
23
|
readonly content?: string | readonly ({
|
|
24
24
|
readonly type: "text";
|
|
25
25
|
readonly text: string;
|
|
@@ -44,25 +44,25 @@ export declare const route: Route<{
|
|
|
44
44
|
readonly tool_plan?: string | undefined;
|
|
45
45
|
}[];
|
|
46
46
|
readonly stream: true;
|
|
47
|
-
readonly max_tokens?: number | undefined;
|
|
48
|
-
readonly temperature?: number | undefined;
|
|
49
47
|
readonly tools?: readonly {
|
|
50
48
|
readonly type: "function";
|
|
51
49
|
readonly function: {
|
|
52
50
|
readonly name: string;
|
|
53
|
-
readonly parameters: unknown;
|
|
54
51
|
readonly description?: string | undefined;
|
|
52
|
+
readonly parameters: unknown;
|
|
55
53
|
};
|
|
56
54
|
}[] | undefined;
|
|
57
|
-
readonly
|
|
55
|
+
readonly tool_choice?: "NONE" | "REQUIRED" | undefined;
|
|
58
56
|
readonly thinking?: {
|
|
59
57
|
readonly type: string;
|
|
60
58
|
readonly token_budget?: number | undefined;
|
|
61
59
|
} | undefined;
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
60
|
+
readonly max_tokens?: number | undefined;
|
|
61
|
+
readonly temperature?: number | undefined;
|
|
64
62
|
readonly p?: number | undefined;
|
|
65
63
|
readonly k?: number | undefined;
|
|
64
|
+
readonly seed?: number | undefined;
|
|
65
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
66
66
|
readonly frequency_penalty?: number | undefined;
|
|
67
67
|
readonly presence_penalty?: number | undefined;
|
|
68
68
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
@@ -110,8 +110,20 @@ export declare const chatRoute: Route<{
|
|
|
110
110
|
readonly file_data: string;
|
|
111
111
|
};
|
|
112
112
|
})[];
|
|
113
|
+
} | {
|
|
114
|
+
readonly role: "tool";
|
|
115
|
+
readonly tool_call_id: string;
|
|
116
|
+
readonly content: string | readonly {
|
|
117
|
+
readonly type: "text";
|
|
118
|
+
readonly text: string;
|
|
119
|
+
readonly cache_control?: {
|
|
120
|
+
readonly type: "ephemeral";
|
|
121
|
+
readonly ttl?: string | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
}[];
|
|
113
124
|
} | {
|
|
114
125
|
readonly [x: string]: unknown;
|
|
126
|
+
readonly role: "assistant";
|
|
115
127
|
readonly content: string | readonly {
|
|
116
128
|
readonly type: "text";
|
|
117
129
|
readonly text: string;
|
|
@@ -120,124 +132,63 @@ export declare const chatRoute: Route<{
|
|
|
120
132
|
readonly ttl?: string | undefined;
|
|
121
133
|
} | undefined;
|
|
122
134
|
}[] | null;
|
|
123
|
-
readonly role: "assistant";
|
|
124
|
-
readonly reasoning?: string | undefined;
|
|
125
|
-
readonly reasoning_content?: string | undefined;
|
|
126
|
-
readonly reasoning_text?: string | undefined;
|
|
127
135
|
readonly tool_calls?: readonly {
|
|
136
|
+
readonly id: string;
|
|
137
|
+
readonly type: "function";
|
|
128
138
|
readonly function: {
|
|
129
139
|
readonly name: string;
|
|
130
140
|
readonly arguments: string;
|
|
131
141
|
};
|
|
132
|
-
readonly id: string;
|
|
133
|
-
readonly type: "function";
|
|
134
142
|
readonly extra_content?: {
|
|
135
143
|
readonly google: {
|
|
136
144
|
readonly thought_signature: string;
|
|
137
145
|
};
|
|
138
146
|
} | undefined;
|
|
139
147
|
}[] | undefined;
|
|
148
|
+
readonly reasoning_content?: string | undefined;
|
|
149
|
+
readonly reasoning?: string | undefined;
|
|
150
|
+
readonly reasoning_text?: string | undefined;
|
|
140
151
|
readonly reasoning_details?: unknown;
|
|
141
|
-
} | {
|
|
142
|
-
readonly role: "tool";
|
|
143
|
-
readonly tool_call_id: string;
|
|
144
|
-
readonly content: string | readonly {
|
|
145
|
-
readonly type: "text";
|
|
146
|
-
readonly text: string;
|
|
147
|
-
readonly cache_control?: {
|
|
148
|
-
readonly type: "ephemeral";
|
|
149
|
-
readonly ttl?: string | undefined;
|
|
150
|
-
} | undefined;
|
|
151
|
-
}[];
|
|
152
152
|
})[];
|
|
153
|
-
readonly stream: true;
|
|
154
|
-
readonly max_completion_tokens?: number | undefined;
|
|
155
|
-
readonly max_tokens?: number | undefined;
|
|
156
|
-
readonly temperature?: number | undefined;
|
|
157
153
|
readonly tools?: readonly {
|
|
154
|
+
readonly type: "function";
|
|
158
155
|
readonly function: {
|
|
159
|
-
readonly description: string;
|
|
160
156
|
readonly name: string;
|
|
157
|
+
readonly description: string;
|
|
161
158
|
readonly parameters: {
|
|
162
159
|
readonly [x: string]: unknown;
|
|
163
160
|
};
|
|
164
161
|
readonly strict?: boolean | undefined;
|
|
165
162
|
};
|
|
166
|
-
readonly type: "function";
|
|
167
163
|
readonly cache_control?: {
|
|
168
164
|
readonly type: "ephemeral";
|
|
169
165
|
readonly ttl?: string | undefined;
|
|
170
166
|
} | undefined;
|
|
171
167
|
}[] | undefined;
|
|
172
|
-
readonly
|
|
173
|
-
readonly seed?: number | undefined;
|
|
174
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
168
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
175
169
|
readonly type: "function";
|
|
176
170
|
readonly function: {
|
|
177
171
|
readonly name: string;
|
|
178
172
|
};
|
|
179
173
|
} | undefined;
|
|
180
|
-
readonly
|
|
181
|
-
readonly frequency_penalty?: number | undefined;
|
|
182
|
-
readonly presence_penalty?: number | undefined;
|
|
183
|
-
readonly store?: boolean | undefined;
|
|
184
|
-
readonly prompt_cache_key?: string | undefined;
|
|
185
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
174
|
+
readonly stream: true;
|
|
186
175
|
readonly stream_options?: {
|
|
187
176
|
readonly include_usage: boolean;
|
|
188
177
|
} | undefined;
|
|
178
|
+
readonly store?: boolean | undefined;
|
|
179
|
+
readonly prompt_cache_key?: string | undefined;
|
|
180
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
189
181
|
readonly tool_stream?: boolean | undefined;
|
|
190
|
-
|
|
191
|
-
export declare const routes: (Route<{
|
|
192
|
-
readonly model: string;
|
|
193
|
-
readonly messages: readonly {
|
|
194
|
-
readonly role: "tool" | "system" | "user" | "assistant";
|
|
195
|
-
readonly content?: string | readonly ({
|
|
196
|
-
readonly type: "text";
|
|
197
|
-
readonly text: string;
|
|
198
|
-
} | {
|
|
199
|
-
readonly type: "thinking";
|
|
200
|
-
readonly thinking: string;
|
|
201
|
-
} | {
|
|
202
|
-
readonly type: "image_url";
|
|
203
|
-
readonly image_url: {
|
|
204
|
-
readonly url: string;
|
|
205
|
-
};
|
|
206
|
-
})[] | undefined;
|
|
207
|
-
readonly tool_calls?: readonly {
|
|
208
|
-
readonly id: string;
|
|
209
|
-
readonly type: "function";
|
|
210
|
-
readonly function: {
|
|
211
|
-
readonly name: string;
|
|
212
|
-
readonly arguments: string;
|
|
213
|
-
};
|
|
214
|
-
}[] | undefined;
|
|
215
|
-
readonly tool_call_id?: string | undefined;
|
|
216
|
-
readonly tool_plan?: string | undefined;
|
|
217
|
-
}[];
|
|
218
|
-
readonly stream: true;
|
|
182
|
+
readonly max_completion_tokens?: number | undefined;
|
|
219
183
|
readonly max_tokens?: number | undefined;
|
|
220
184
|
readonly temperature?: number | undefined;
|
|
221
|
-
readonly
|
|
222
|
-
readonly type: "function";
|
|
223
|
-
readonly function: {
|
|
224
|
-
readonly name: string;
|
|
225
|
-
readonly parameters: unknown;
|
|
226
|
-
readonly description?: string | undefined;
|
|
227
|
-
};
|
|
228
|
-
}[] | undefined;
|
|
229
|
-
readonly seed?: number | undefined;
|
|
230
|
-
readonly thinking?: {
|
|
231
|
-
readonly type: string;
|
|
232
|
-
readonly token_budget?: number | undefined;
|
|
233
|
-
} | undefined;
|
|
234
|
-
readonly tool_choice?: "NONE" | "REQUIRED" | undefined;
|
|
235
|
-
readonly stop_sequences?: readonly string[] | undefined;
|
|
236
|
-
readonly p?: number | undefined;
|
|
237
|
-
readonly k?: number | undefined;
|
|
185
|
+
readonly top_p?: number | undefined;
|
|
238
186
|
readonly frequency_penalty?: number | undefined;
|
|
239
187
|
readonly presence_penalty?: number | undefined;
|
|
240
|
-
|
|
188
|
+
readonly seed?: number | undefined;
|
|
189
|
+
readonly stop?: readonly string[] | undefined;
|
|
190
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
191
|
+
export declare const routes: (Route<{
|
|
241
192
|
readonly model: string;
|
|
242
193
|
readonly messages: readonly ({
|
|
243
194
|
readonly role: "system";
|
|
@@ -281,8 +232,20 @@ export declare const routes: (Route<{
|
|
|
281
232
|
readonly file_data: string;
|
|
282
233
|
};
|
|
283
234
|
})[];
|
|
235
|
+
} | {
|
|
236
|
+
readonly role: "tool";
|
|
237
|
+
readonly tool_call_id: string;
|
|
238
|
+
readonly content: string | readonly {
|
|
239
|
+
readonly type: "text";
|
|
240
|
+
readonly text: string;
|
|
241
|
+
readonly cache_control?: {
|
|
242
|
+
readonly type: "ephemeral";
|
|
243
|
+
readonly ttl?: string | undefined;
|
|
244
|
+
} | undefined;
|
|
245
|
+
}[];
|
|
284
246
|
} | {
|
|
285
247
|
readonly [x: string]: unknown;
|
|
248
|
+
readonly role: "assistant";
|
|
286
249
|
readonly content: string | readonly {
|
|
287
250
|
readonly type: "text";
|
|
288
251
|
readonly text: string;
|
|
@@ -291,105 +254,132 @@ export declare const routes: (Route<{
|
|
|
291
254
|
readonly ttl?: string | undefined;
|
|
292
255
|
} | undefined;
|
|
293
256
|
}[] | null;
|
|
294
|
-
readonly role: "assistant";
|
|
295
|
-
readonly reasoning?: string | undefined;
|
|
296
|
-
readonly reasoning_content?: string | undefined;
|
|
297
|
-
readonly reasoning_text?: string | undefined;
|
|
298
257
|
readonly tool_calls?: readonly {
|
|
258
|
+
readonly id: string;
|
|
259
|
+
readonly type: "function";
|
|
299
260
|
readonly function: {
|
|
300
261
|
readonly name: string;
|
|
301
262
|
readonly arguments: string;
|
|
302
263
|
};
|
|
303
|
-
readonly id: string;
|
|
304
|
-
readonly type: "function";
|
|
305
264
|
readonly extra_content?: {
|
|
306
265
|
readonly google: {
|
|
307
266
|
readonly thought_signature: string;
|
|
308
267
|
};
|
|
309
268
|
} | undefined;
|
|
310
269
|
}[] | undefined;
|
|
270
|
+
readonly reasoning_content?: string | undefined;
|
|
271
|
+
readonly reasoning?: string | undefined;
|
|
272
|
+
readonly reasoning_text?: string | undefined;
|
|
311
273
|
readonly reasoning_details?: unknown;
|
|
312
|
-
} | {
|
|
313
|
-
readonly role: "tool";
|
|
314
|
-
readonly tool_call_id: string;
|
|
315
|
-
readonly content: string | readonly {
|
|
316
|
-
readonly type: "text";
|
|
317
|
-
readonly text: string;
|
|
318
|
-
readonly cache_control?: {
|
|
319
|
-
readonly type: "ephemeral";
|
|
320
|
-
readonly ttl?: string | undefined;
|
|
321
|
-
} | undefined;
|
|
322
|
-
}[];
|
|
323
274
|
})[];
|
|
324
|
-
readonly stream: true;
|
|
325
|
-
readonly max_completion_tokens?: number | undefined;
|
|
326
|
-
readonly max_tokens?: number | undefined;
|
|
327
|
-
readonly temperature?: number | undefined;
|
|
328
275
|
readonly tools?: readonly {
|
|
276
|
+
readonly type: "function";
|
|
329
277
|
readonly function: {
|
|
330
|
-
readonly description: string;
|
|
331
278
|
readonly name: string;
|
|
279
|
+
readonly description: string;
|
|
332
280
|
readonly parameters: {
|
|
333
281
|
readonly [x: string]: unknown;
|
|
334
282
|
};
|
|
335
283
|
readonly strict?: boolean | undefined;
|
|
336
284
|
};
|
|
337
|
-
readonly type: "function";
|
|
338
285
|
readonly cache_control?: {
|
|
339
286
|
readonly type: "ephemeral";
|
|
340
287
|
readonly ttl?: string | undefined;
|
|
341
288
|
} | undefined;
|
|
342
289
|
}[] | undefined;
|
|
343
|
-
readonly
|
|
344
|
-
readonly seed?: number | undefined;
|
|
345
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
290
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
346
291
|
readonly type: "function";
|
|
347
292
|
readonly function: {
|
|
348
293
|
readonly name: string;
|
|
349
294
|
};
|
|
350
295
|
} | undefined;
|
|
351
|
-
readonly
|
|
352
|
-
readonly frequency_penalty?: number | undefined;
|
|
353
|
-
readonly presence_penalty?: number | undefined;
|
|
354
|
-
readonly store?: boolean | undefined;
|
|
355
|
-
readonly prompt_cache_key?: string | undefined;
|
|
356
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
296
|
+
readonly stream: true;
|
|
357
297
|
readonly stream_options?: {
|
|
358
298
|
readonly include_usage: boolean;
|
|
359
299
|
} | undefined;
|
|
300
|
+
readonly store?: boolean | undefined;
|
|
301
|
+
readonly prompt_cache_key?: string | undefined;
|
|
302
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
360
303
|
readonly tool_stream?: boolean | undefined;
|
|
304
|
+
readonly max_completion_tokens?: number | undefined;
|
|
305
|
+
readonly max_tokens?: number | undefined;
|
|
306
|
+
readonly temperature?: number | undefined;
|
|
307
|
+
readonly top_p?: number | undefined;
|
|
308
|
+
readonly frequency_penalty?: number | undefined;
|
|
309
|
+
readonly presence_penalty?: number | undefined;
|
|
310
|
+
readonly seed?: number | undefined;
|
|
311
|
+
readonly stop?: readonly string[] | undefined;
|
|
312
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
313
|
+
readonly model: string;
|
|
314
|
+
readonly messages: readonly {
|
|
315
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
316
|
+
readonly content?: string | readonly ({
|
|
317
|
+
readonly type: "text";
|
|
318
|
+
readonly text: string;
|
|
319
|
+
} | {
|
|
320
|
+
readonly type: "thinking";
|
|
321
|
+
readonly thinking: string;
|
|
322
|
+
} | {
|
|
323
|
+
readonly type: "image_url";
|
|
324
|
+
readonly image_url: {
|
|
325
|
+
readonly url: string;
|
|
326
|
+
};
|
|
327
|
+
})[] | undefined;
|
|
328
|
+
readonly tool_calls?: readonly {
|
|
329
|
+
readonly id: string;
|
|
330
|
+
readonly type: "function";
|
|
331
|
+
readonly function: {
|
|
332
|
+
readonly name: string;
|
|
333
|
+
readonly arguments: string;
|
|
334
|
+
};
|
|
335
|
+
}[] | undefined;
|
|
336
|
+
readonly tool_call_id?: string | undefined;
|
|
337
|
+
readonly tool_plan?: string | undefined;
|
|
338
|
+
}[];
|
|
339
|
+
readonly stream: true;
|
|
340
|
+
readonly tools?: readonly {
|
|
341
|
+
readonly type: "function";
|
|
342
|
+
readonly function: {
|
|
343
|
+
readonly name: string;
|
|
344
|
+
readonly description?: string | undefined;
|
|
345
|
+
readonly parameters: unknown;
|
|
346
|
+
};
|
|
347
|
+
}[] | undefined;
|
|
348
|
+
readonly tool_choice?: "NONE" | "REQUIRED" | undefined;
|
|
349
|
+
readonly thinking?: {
|
|
350
|
+
readonly type: string;
|
|
351
|
+
readonly token_budget?: number | undefined;
|
|
352
|
+
} | undefined;
|
|
353
|
+
readonly max_tokens?: number | undefined;
|
|
354
|
+
readonly temperature?: number | undefined;
|
|
355
|
+
readonly p?: number | undefined;
|
|
356
|
+
readonly k?: number | undefined;
|
|
357
|
+
readonly seed?: number | undefined;
|
|
358
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
359
|
+
readonly frequency_penalty?: number | undefined;
|
|
360
|
+
readonly presence_penalty?: number | undefined;
|
|
361
361
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
|
|
362
362
|
export declare const configure: (input?: LanguageModelOptions) => {
|
|
363
363
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
364
364
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
365
365
|
readonly thinking?: {
|
|
366
|
-
readonly type?: "
|
|
366
|
+
readonly type?: "disabled" | "enabled" | undefined;
|
|
367
367
|
readonly tokenBudget?: number | undefined;
|
|
368
368
|
} | undefined;
|
|
369
369
|
}, import("../route/client.js").CompactionOperations | undefined>;
|
|
370
370
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
371
|
-
configure:
|
|
371
|
+
configure: typeof configure;
|
|
372
372
|
};
|
|
373
373
|
export declare const provider: {
|
|
374
374
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
375
375
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
376
376
|
readonly thinking?: {
|
|
377
|
-
readonly type?: "
|
|
377
|
+
readonly type?: "disabled" | "enabled" | undefined;
|
|
378
378
|
readonly tokenBudget?: number | undefined;
|
|
379
379
|
} | undefined;
|
|
380
380
|
}, import("../route/client.js").CompactionOperations | undefined>;
|
|
381
381
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
382
|
-
configure:
|
|
383
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
384
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
|
385
|
-
readonly thinking?: {
|
|
386
|
-
readonly type?: "enabled" | "disabled" | undefined;
|
|
387
|
-
readonly tokenBudget?: number | undefined;
|
|
388
|
-
} | undefined;
|
|
389
|
-
}, import("../route/client.js").CompactionOperations | undefined>;
|
|
390
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
391
|
-
configure: /*elided*/ any;
|
|
392
|
-
};
|
|
382
|
+
configure: typeof configure;
|
|
393
383
|
};
|
|
394
384
|
export declare const model: ProviderPackage.Definition<Settings, CohereChat.ProviderOptionsInput>["model"];
|
|
395
385
|
export * as Cohere from "./cohere.js";
|
package/dist/providers/cohere.js
CHANGED
|
@@ -12,18 +12,13 @@ export declare const configure: (input?: Config) => {
|
|
|
12
12
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
13
13
|
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/deepgram-speech.js").DeepgramSpeechOptions>;
|
|
14
14
|
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/deepgram-transcription.js").DeepgramTranscriptionOptions>;
|
|
15
|
-
configure:
|
|
15
|
+
configure: typeof configure;
|
|
16
16
|
};
|
|
17
17
|
export declare const provider: {
|
|
18
18
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
19
19
|
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/deepgram-speech.js").DeepgramSpeechOptions>;
|
|
20
20
|
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/deepgram-transcription.js").DeepgramTranscriptionOptions>;
|
|
21
|
-
configure:
|
|
22
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
23
|
-
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/deepgram-speech.js").DeepgramSpeechOptions>;
|
|
24
|
-
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/deepgram-transcription.js").DeepgramTranscriptionOptions>;
|
|
25
|
-
configure: /*elided*/ any;
|
|
26
|
-
};
|
|
21
|
+
configure: typeof configure;
|
|
27
22
|
};
|
|
28
23
|
export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/deepgram-speech.js").DeepgramSpeechOptions>;
|
|
29
24
|
export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/deepgram-transcription.js").DeepgramTranscriptionOptions>;
|