@opencode/ai 2.0.31 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +47 -0
- package/dist/experimental/realtime.js +99 -0
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/experimental.d.ts +2 -0
- package/dist/experimental.js +1 -0
- 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/gemini.js +11 -1
- 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
|
@@ -56,8 +56,20 @@ export declare const route: Route<{
|
|
|
56
56
|
readonly file_data: string;
|
|
57
57
|
};
|
|
58
58
|
})[];
|
|
59
|
+
} | {
|
|
60
|
+
readonly role: "tool";
|
|
61
|
+
readonly tool_call_id: string;
|
|
62
|
+
readonly content: string | readonly {
|
|
63
|
+
readonly type: "text";
|
|
64
|
+
readonly text: string;
|
|
65
|
+
readonly cache_control?: {
|
|
66
|
+
readonly type: "ephemeral";
|
|
67
|
+
readonly ttl?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
}[];
|
|
59
70
|
} | {
|
|
60
71
|
readonly [x: string]: unknown;
|
|
72
|
+
readonly role: "assistant";
|
|
61
73
|
readonly content: string | readonly {
|
|
62
74
|
readonly type: "text";
|
|
63
75
|
readonly text: string;
|
|
@@ -66,73 +78,61 @@ export declare const route: Route<{
|
|
|
66
78
|
readonly ttl?: string | undefined;
|
|
67
79
|
} | undefined;
|
|
68
80
|
}[] | null;
|
|
69
|
-
readonly role: "assistant";
|
|
70
|
-
readonly reasoning?: string | undefined;
|
|
71
|
-
readonly reasoning_content?: string | undefined;
|
|
72
|
-
readonly reasoning_text?: string | undefined;
|
|
73
81
|
readonly tool_calls?: readonly {
|
|
82
|
+
readonly id: string;
|
|
83
|
+
readonly type: "function";
|
|
74
84
|
readonly function: {
|
|
75
85
|
readonly name: string;
|
|
76
86
|
readonly arguments: string;
|
|
77
87
|
};
|
|
78
|
-
readonly id: string;
|
|
79
|
-
readonly type: "function";
|
|
80
88
|
readonly extra_content?: {
|
|
81
89
|
readonly google: {
|
|
82
90
|
readonly thought_signature: string;
|
|
83
91
|
};
|
|
84
92
|
} | undefined;
|
|
85
93
|
}[] | undefined;
|
|
94
|
+
readonly reasoning_content?: string | undefined;
|
|
95
|
+
readonly reasoning?: string | undefined;
|
|
96
|
+
readonly reasoning_text?: string | undefined;
|
|
86
97
|
readonly reasoning_details?: unknown;
|
|
87
|
-
} | {
|
|
88
|
-
readonly role: "tool";
|
|
89
|
-
readonly tool_call_id: string;
|
|
90
|
-
readonly content: string | readonly {
|
|
91
|
-
readonly type: "text";
|
|
92
|
-
readonly text: string;
|
|
93
|
-
readonly cache_control?: {
|
|
94
|
-
readonly type: "ephemeral";
|
|
95
|
-
readonly ttl?: string | undefined;
|
|
96
|
-
} | undefined;
|
|
97
|
-
}[];
|
|
98
98
|
})[];
|
|
99
|
-
readonly stream: true;
|
|
100
|
-
readonly max_completion_tokens?: number | undefined;
|
|
101
|
-
readonly max_tokens?: number | undefined;
|
|
102
|
-
readonly temperature?: number | undefined;
|
|
103
99
|
readonly tools?: readonly {
|
|
100
|
+
readonly type: "function";
|
|
104
101
|
readonly function: {
|
|
105
|
-
readonly description: string;
|
|
106
102
|
readonly name: string;
|
|
103
|
+
readonly description: string;
|
|
107
104
|
readonly parameters: {
|
|
108
105
|
readonly [x: string]: unknown;
|
|
109
106
|
};
|
|
110
107
|
readonly strict?: boolean | undefined;
|
|
111
108
|
};
|
|
112
|
-
readonly type: "function";
|
|
113
109
|
readonly cache_control?: {
|
|
114
110
|
readonly type: "ephemeral";
|
|
115
111
|
readonly ttl?: string | undefined;
|
|
116
112
|
} | undefined;
|
|
117
113
|
}[] | undefined;
|
|
118
|
-
readonly
|
|
119
|
-
readonly seed?: number | undefined;
|
|
120
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
114
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
121
115
|
readonly type: "function";
|
|
122
116
|
readonly function: {
|
|
123
117
|
readonly name: string;
|
|
124
118
|
};
|
|
125
119
|
} | undefined;
|
|
126
|
-
readonly
|
|
127
|
-
readonly frequency_penalty?: number | undefined;
|
|
128
|
-
readonly presence_penalty?: number | undefined;
|
|
129
|
-
readonly store?: boolean | undefined;
|
|
130
|
-
readonly prompt_cache_key?: string | undefined;
|
|
131
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
120
|
+
readonly stream: true;
|
|
132
121
|
readonly stream_options?: {
|
|
133
122
|
readonly include_usage: boolean;
|
|
134
123
|
} | undefined;
|
|
124
|
+
readonly store?: boolean | undefined;
|
|
125
|
+
readonly prompt_cache_key?: string | undefined;
|
|
126
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
135
127
|
readonly tool_stream?: boolean | undefined;
|
|
128
|
+
readonly max_completion_tokens?: number | undefined;
|
|
129
|
+
readonly max_tokens?: number | undefined;
|
|
130
|
+
readonly temperature?: number | undefined;
|
|
131
|
+
readonly top_p?: number | undefined;
|
|
132
|
+
readonly frequency_penalty?: number | undefined;
|
|
133
|
+
readonly presence_penalty?: number | undefined;
|
|
134
|
+
readonly seed?: number | undefined;
|
|
135
|
+
readonly stop?: readonly string[] | undefined;
|
|
136
136
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
|
|
137
137
|
export declare const routes: Route<{
|
|
138
138
|
readonly model: string;
|
|
@@ -178,8 +178,20 @@ export declare const routes: Route<{
|
|
|
178
178
|
readonly file_data: string;
|
|
179
179
|
};
|
|
180
180
|
})[];
|
|
181
|
+
} | {
|
|
182
|
+
readonly role: "tool";
|
|
183
|
+
readonly tool_call_id: string;
|
|
184
|
+
readonly content: string | readonly {
|
|
185
|
+
readonly type: "text";
|
|
186
|
+
readonly text: string;
|
|
187
|
+
readonly cache_control?: {
|
|
188
|
+
readonly type: "ephemeral";
|
|
189
|
+
readonly ttl?: string | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
}[];
|
|
181
192
|
} | {
|
|
182
193
|
readonly [x: string]: unknown;
|
|
194
|
+
readonly role: "assistant";
|
|
183
195
|
readonly content: string | readonly {
|
|
184
196
|
readonly type: "text";
|
|
185
197
|
readonly text: string;
|
|
@@ -188,86 +200,70 @@ export declare const routes: Route<{
|
|
|
188
200
|
readonly ttl?: string | undefined;
|
|
189
201
|
} | undefined;
|
|
190
202
|
}[] | null;
|
|
191
|
-
readonly role: "assistant";
|
|
192
|
-
readonly reasoning?: string | undefined;
|
|
193
|
-
readonly reasoning_content?: string | undefined;
|
|
194
|
-
readonly reasoning_text?: string | undefined;
|
|
195
203
|
readonly tool_calls?: readonly {
|
|
204
|
+
readonly id: string;
|
|
205
|
+
readonly type: "function";
|
|
196
206
|
readonly function: {
|
|
197
207
|
readonly name: string;
|
|
198
208
|
readonly arguments: string;
|
|
199
209
|
};
|
|
200
|
-
readonly id: string;
|
|
201
|
-
readonly type: "function";
|
|
202
210
|
readonly extra_content?: {
|
|
203
211
|
readonly google: {
|
|
204
212
|
readonly thought_signature: string;
|
|
205
213
|
};
|
|
206
214
|
} | undefined;
|
|
207
215
|
}[] | undefined;
|
|
216
|
+
readonly reasoning_content?: string | undefined;
|
|
217
|
+
readonly reasoning?: string | undefined;
|
|
218
|
+
readonly reasoning_text?: string | undefined;
|
|
208
219
|
readonly reasoning_details?: unknown;
|
|
209
|
-
} | {
|
|
210
|
-
readonly role: "tool";
|
|
211
|
-
readonly tool_call_id: string;
|
|
212
|
-
readonly content: string | readonly {
|
|
213
|
-
readonly type: "text";
|
|
214
|
-
readonly text: string;
|
|
215
|
-
readonly cache_control?: {
|
|
216
|
-
readonly type: "ephemeral";
|
|
217
|
-
readonly ttl?: string | undefined;
|
|
218
|
-
} | undefined;
|
|
219
|
-
}[];
|
|
220
220
|
})[];
|
|
221
|
-
readonly stream: true;
|
|
222
|
-
readonly max_completion_tokens?: number | undefined;
|
|
223
|
-
readonly max_tokens?: number | undefined;
|
|
224
|
-
readonly temperature?: number | undefined;
|
|
225
221
|
readonly tools?: readonly {
|
|
222
|
+
readonly type: "function";
|
|
226
223
|
readonly function: {
|
|
227
|
-
readonly description: string;
|
|
228
224
|
readonly name: string;
|
|
225
|
+
readonly description: string;
|
|
229
226
|
readonly parameters: {
|
|
230
227
|
readonly [x: string]: unknown;
|
|
231
228
|
};
|
|
232
229
|
readonly strict?: boolean | undefined;
|
|
233
230
|
};
|
|
234
|
-
readonly type: "function";
|
|
235
231
|
readonly cache_control?: {
|
|
236
232
|
readonly type: "ephemeral";
|
|
237
233
|
readonly ttl?: string | undefined;
|
|
238
234
|
} | undefined;
|
|
239
235
|
}[] | undefined;
|
|
240
|
-
readonly
|
|
241
|
-
readonly seed?: number | undefined;
|
|
242
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
236
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
243
237
|
readonly type: "function";
|
|
244
238
|
readonly function: {
|
|
245
239
|
readonly name: string;
|
|
246
240
|
};
|
|
247
241
|
} | undefined;
|
|
248
|
-
readonly
|
|
249
|
-
readonly frequency_penalty?: number | undefined;
|
|
250
|
-
readonly presence_penalty?: number | undefined;
|
|
251
|
-
readonly store?: boolean | undefined;
|
|
252
|
-
readonly prompt_cache_key?: string | undefined;
|
|
253
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
242
|
+
readonly stream: true;
|
|
254
243
|
readonly stream_options?: {
|
|
255
244
|
readonly include_usage: boolean;
|
|
256
245
|
} | undefined;
|
|
246
|
+
readonly store?: boolean | undefined;
|
|
247
|
+
readonly prompt_cache_key?: string | undefined;
|
|
248
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
257
249
|
readonly tool_stream?: boolean | undefined;
|
|
250
|
+
readonly max_completion_tokens?: number | undefined;
|
|
251
|
+
readonly max_tokens?: number | undefined;
|
|
252
|
+
readonly temperature?: number | undefined;
|
|
253
|
+
readonly top_p?: number | undefined;
|
|
254
|
+
readonly frequency_penalty?: number | undefined;
|
|
255
|
+
readonly presence_penalty?: number | undefined;
|
|
256
|
+
readonly seed?: number | undefined;
|
|
257
|
+
readonly stop?: readonly string[] | undefined;
|
|
258
258
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
259
259
|
export declare const configure: (input?: LanguageModelOptions) => {
|
|
260
260
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
261
261
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
262
|
-
configure:
|
|
262
|
+
configure: typeof configure;
|
|
263
263
|
};
|
|
264
264
|
export declare const provider: {
|
|
265
265
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
266
266
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
267
|
-
configure:
|
|
268
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
269
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
270
|
-
configure: /*elided*/ any;
|
|
271
|
-
};
|
|
267
|
+
configure: typeof configure;
|
|
272
268
|
};
|
|
273
269
|
export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
@@ -25,7 +25,7 @@ export const configure = (input = {}) => {
|
|
|
25
25
|
id,
|
|
26
26
|
model: (modelID) => configured.model({
|
|
27
27
|
id: modelID,
|
|
28
|
-
compatibility: { maxTokensField: "max_tokens",
|
|
28
|
+
compatibility: { maxTokensField: "max_tokens", supportsStrictMode: false },
|
|
29
29
|
}),
|
|
30
30
|
configure,
|
|
31
31
|
};
|
|
@@ -11,20 +11,14 @@ export declare const configure: (input?: Options) => {
|
|
|
11
11
|
experimental: {
|
|
12
12
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<import("../experimental.js").EvaluationOptions>;
|
|
13
13
|
};
|
|
14
|
-
configure:
|
|
14
|
+
configure: typeof configure;
|
|
15
15
|
};
|
|
16
16
|
export declare const provider: {
|
|
17
17
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
18
18
|
experimental: {
|
|
19
19
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<import("../experimental.js").EvaluationOptions>;
|
|
20
20
|
};
|
|
21
|
-
configure:
|
|
22
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
23
|
-
experimental: {
|
|
24
|
-
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<import("../experimental.js").EvaluationOptions>;
|
|
25
|
-
};
|
|
26
|
-
configure: /*elided*/ any;
|
|
27
|
-
};
|
|
21
|
+
configure: typeof configure;
|
|
28
22
|
};
|
|
29
23
|
export declare const experimental: {
|
|
30
24
|
evaluation: (modelID: string | ModelID) => import("../experimental.js").EvaluationModel<import("../experimental.js").EvaluationOptions>;
|
|
@@ -17,6 +17,43 @@ export type Settings = ProviderPackage.Settings & ChatOptionsInput & {
|
|
|
17
17
|
};
|
|
18
18
|
export declare const routes: Route<{
|
|
19
19
|
readonly model: string;
|
|
20
|
+
readonly tools?: readonly {
|
|
21
|
+
readonly type: "function";
|
|
22
|
+
readonly function: {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly description: string;
|
|
25
|
+
readonly parameters: {
|
|
26
|
+
readonly [x: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
readonly strict?: boolean | undefined;
|
|
29
|
+
};
|
|
30
|
+
readonly cache_control?: {
|
|
31
|
+
readonly type: "ephemeral";
|
|
32
|
+
readonly ttl?: string | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
36
|
+
readonly type: "function";
|
|
37
|
+
readonly function: {
|
|
38
|
+
readonly name: string;
|
|
39
|
+
};
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly stream: true;
|
|
42
|
+
readonly stream_options?: {
|
|
43
|
+
readonly include_usage: boolean;
|
|
44
|
+
} | undefined;
|
|
45
|
+
readonly store?: boolean | undefined;
|
|
46
|
+
readonly prompt_cache_key?: string | undefined;
|
|
47
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
48
|
+
readonly tool_stream?: boolean | undefined;
|
|
49
|
+
readonly max_completion_tokens?: number | undefined;
|
|
50
|
+
readonly max_tokens?: number | undefined;
|
|
51
|
+
readonly temperature?: number | undefined;
|
|
52
|
+
readonly top_p?: number | undefined;
|
|
53
|
+
readonly frequency_penalty?: number | undefined;
|
|
54
|
+
readonly presence_penalty?: number | undefined;
|
|
55
|
+
readonly seed?: number | undefined;
|
|
56
|
+
readonly stop?: readonly string[] | undefined;
|
|
20
57
|
readonly messages: readonly ({
|
|
21
58
|
readonly role: "system";
|
|
22
59
|
readonly content: string | readonly ({
|
|
@@ -72,6 +109,7 @@ export declare const routes: Route<{
|
|
|
72
109
|
}[];
|
|
73
110
|
} | {
|
|
74
111
|
readonly [x: string]: unknown;
|
|
112
|
+
readonly role: "assistant";
|
|
75
113
|
readonly content: string | readonly {
|
|
76
114
|
readonly type: "text";
|
|
77
115
|
readonly text: string;
|
|
@@ -80,103 +118,60 @@ export declare const routes: Route<{
|
|
|
80
118
|
readonly ttl?: string | undefined;
|
|
81
119
|
} | undefined;
|
|
82
120
|
}[] | null;
|
|
83
|
-
readonly role: "assistant";
|
|
84
|
-
readonly reasoning?: string | undefined;
|
|
85
121
|
readonly reasoning_content?: string | undefined;
|
|
122
|
+
readonly reasoning?: string | undefined;
|
|
86
123
|
readonly reasoning_text?: string | undefined;
|
|
124
|
+
readonly reasoning_details?: unknown;
|
|
87
125
|
readonly tool_calls?: readonly {
|
|
126
|
+
readonly id: string;
|
|
127
|
+
readonly type: "function";
|
|
88
128
|
readonly function: {
|
|
89
129
|
readonly name: string;
|
|
90
130
|
readonly arguments: string;
|
|
91
131
|
};
|
|
92
|
-
readonly id: string;
|
|
93
|
-
readonly type: "function";
|
|
94
|
-
readonly thought_signature?: string | undefined;
|
|
95
132
|
readonly extra_content?: {
|
|
96
133
|
readonly google: {
|
|
97
134
|
readonly thought_signature: string;
|
|
98
135
|
};
|
|
99
136
|
} | undefined;
|
|
137
|
+
readonly thought_signature?: string | undefined;
|
|
100
138
|
}[] | undefined;
|
|
101
139
|
readonly thought_signature?: string | undefined;
|
|
102
|
-
readonly reasoning_details?: unknown;
|
|
103
140
|
})[];
|
|
104
|
-
readonly stream: true;
|
|
105
|
-
readonly venice_parameters: {
|
|
106
|
-
readonly [x: string]: string | boolean;
|
|
107
|
-
};
|
|
108
141
|
readonly reasoning?: {
|
|
142
|
+
readonly effort?: string | undefined;
|
|
109
143
|
readonly enabled?: boolean | undefined;
|
|
110
144
|
readonly summary?: string | undefined;
|
|
111
|
-
readonly effort?: string | undefined;
|
|
112
145
|
} | undefined;
|
|
113
|
-
readonly
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
readonly tools?: readonly {
|
|
117
|
-
readonly function: {
|
|
118
|
-
readonly description: string;
|
|
119
|
-
readonly name: string;
|
|
120
|
-
readonly parameters: {
|
|
121
|
-
readonly [x: string]: unknown;
|
|
122
|
-
};
|
|
123
|
-
readonly strict?: boolean | undefined;
|
|
124
|
-
};
|
|
125
|
-
readonly type: "function";
|
|
126
|
-
readonly cache_control?: {
|
|
127
|
-
readonly type: "ephemeral";
|
|
128
|
-
readonly ttl?: string | undefined;
|
|
129
|
-
} | undefined;
|
|
130
|
-
}[] | undefined;
|
|
131
|
-
readonly stop?: readonly string[] | undefined;
|
|
132
|
-
readonly user?: string | undefined;
|
|
133
|
-
readonly seed?: number | undefined;
|
|
134
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
135
|
-
readonly type: "function";
|
|
136
|
-
readonly function: {
|
|
137
|
-
readonly name: string;
|
|
138
|
-
};
|
|
139
|
-
} | undefined;
|
|
140
|
-
readonly top_p?: number | undefined;
|
|
141
|
-
readonly top_k?: number | undefined;
|
|
142
|
-
readonly frequency_penalty?: number | undefined;
|
|
143
|
-
readonly presence_penalty?: number | undefined;
|
|
144
|
-
readonly store?: boolean | undefined;
|
|
145
|
-
readonly prompt_cache_key?: string | undefined;
|
|
146
|
-
readonly parallel_tool_calls?: boolean | undefined;
|
|
147
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
148
|
-
readonly stream_options?: {
|
|
149
|
-
readonly include_usage: boolean;
|
|
150
|
-
} | undefined;
|
|
151
|
-
readonly tool_stream?: boolean | undefined;
|
|
152
|
-
readonly top_logprobs?: number | undefined;
|
|
146
|
+
readonly venice_parameters: {
|
|
147
|
+
readonly [x: string]: string | boolean;
|
|
148
|
+
};
|
|
153
149
|
readonly prompt_cache_retention?: string | undefined;
|
|
154
|
-
readonly
|
|
155
|
-
readonly response_format?: {
|
|
156
|
-
readonly [x: string]: unknown;
|
|
157
|
-
} | undefined;
|
|
158
|
-
readonly logprobs?: boolean | undefined;
|
|
150
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
159
151
|
readonly min_p?: number | undefined;
|
|
152
|
+
readonly top_k?: number | undefined;
|
|
153
|
+
readonly repetition_penalty?: number | undefined;
|
|
160
154
|
readonly stop_token_ids?: readonly number[] | undefined;
|
|
155
|
+
readonly logprobs?: boolean | undefined;
|
|
156
|
+
readonly top_logprobs?: number | undefined;
|
|
161
157
|
readonly max_temp?: number | undefined;
|
|
162
158
|
readonly min_temp?: number | undefined;
|
|
159
|
+
readonly response_format?: {
|
|
160
|
+
readonly [x: string]: unknown;
|
|
161
|
+
} | undefined;
|
|
162
|
+
readonly user?: string | undefined;
|
|
163
163
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
164
164
|
export declare const configure: (input?: Config) => {
|
|
165
165
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
166
166
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
167
167
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
168
|
-
configure:
|
|
168
|
+
configure: typeof configure;
|
|
169
169
|
};
|
|
170
170
|
export declare const provider: {
|
|
171
171
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
172
172
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
173
173
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
174
|
-
configure:
|
|
175
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
176
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
177
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
178
|
-
configure: /*elided*/ any;
|
|
179
|
-
};
|
|
174
|
+
configure: typeof configure;
|
|
180
175
|
};
|
|
181
176
|
export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
182
177
|
export declare const model: ProviderPackage.Definition<Settings, ChatOptionsInput>["model"];
|
|
@@ -87,7 +87,7 @@ export declare const configure: (input?: Options) => {
|
|
|
87
87
|
experimental: {
|
|
88
88
|
evaluation: (modelID: string | ModelID) => EvaluationModel<EvaluationOptions>;
|
|
89
89
|
};
|
|
90
|
-
configure:
|
|
90
|
+
configure: typeof configure;
|
|
91
91
|
};
|
|
92
92
|
export declare const provider: {
|
|
93
93
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -98,17 +98,7 @@ export declare const provider: {
|
|
|
98
98
|
experimental: {
|
|
99
99
|
evaluation: (modelID: string | ModelID) => EvaluationModel<EvaluationOptions>;
|
|
100
100
|
};
|
|
101
|
-
configure:
|
|
102
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
103
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
104
|
-
messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
105
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
106
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
107
|
-
experimental: {
|
|
108
|
-
evaluation: (modelID: string | ModelID) => EvaluationModel<EvaluationOptions>;
|
|
109
|
-
};
|
|
110
|
-
configure: /*elided*/ any;
|
|
111
|
-
};
|
|
101
|
+
configure: typeof configure;
|
|
112
102
|
};
|
|
113
103
|
export declare const experimental: {
|
|
114
104
|
evaluation: (modelID: string | ModelID) => EvaluationModel<EvaluationOptions>;
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -20,7 +20,9 @@ export type { XAIVideoOptions } from "../protocols/xai-video.js";
|
|
|
20
20
|
declare const responsesRoute: Route<unknown, import("../protocols/open-responses-channel.js").Prepared, {
|
|
21
21
|
endpoint: import("../route/client.js").CompactOperation;
|
|
22
22
|
}>;
|
|
23
|
-
export declare const routes: (Route<{
|
|
23
|
+
export declare const routes: (Route<unknown, import("../protocols/open-responses-channel.js").Prepared, {
|
|
24
|
+
endpoint: import("../route/client.js").CompactOperation;
|
|
25
|
+
}> | Route<{
|
|
24
26
|
readonly model: string;
|
|
25
27
|
readonly messages: readonly ({
|
|
26
28
|
readonly role: "system";
|
|
@@ -64,8 +66,20 @@ export declare const routes: (Route<{
|
|
|
64
66
|
readonly file_data: string;
|
|
65
67
|
};
|
|
66
68
|
})[];
|
|
69
|
+
} | {
|
|
70
|
+
readonly role: "tool";
|
|
71
|
+
readonly tool_call_id: string;
|
|
72
|
+
readonly content: string | readonly {
|
|
73
|
+
readonly type: "text";
|
|
74
|
+
readonly text: string;
|
|
75
|
+
readonly cache_control?: {
|
|
76
|
+
readonly type: "ephemeral";
|
|
77
|
+
readonly ttl?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
}[];
|
|
67
80
|
} | {
|
|
68
81
|
readonly [x: string]: unknown;
|
|
82
|
+
readonly role: "assistant";
|
|
69
83
|
readonly content: string | readonly {
|
|
70
84
|
readonly type: "text";
|
|
71
85
|
readonly text: string;
|
|
@@ -74,76 +88,62 @@ export declare const routes: (Route<{
|
|
|
74
88
|
readonly ttl?: string | undefined;
|
|
75
89
|
} | undefined;
|
|
76
90
|
}[] | null;
|
|
77
|
-
readonly role: "assistant";
|
|
78
|
-
readonly reasoning?: string | undefined;
|
|
79
|
-
readonly reasoning_content?: string | undefined;
|
|
80
|
-
readonly reasoning_text?: string | undefined;
|
|
81
91
|
readonly tool_calls?: readonly {
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly type: "function";
|
|
82
94
|
readonly function: {
|
|
83
95
|
readonly name: string;
|
|
84
96
|
readonly arguments: string;
|
|
85
97
|
};
|
|
86
|
-
readonly id: string;
|
|
87
|
-
readonly type: "function";
|
|
88
98
|
readonly extra_content?: {
|
|
89
99
|
readonly google: {
|
|
90
100
|
readonly thought_signature: string;
|
|
91
101
|
};
|
|
92
102
|
} | undefined;
|
|
93
103
|
}[] | undefined;
|
|
104
|
+
readonly reasoning_content?: string | undefined;
|
|
105
|
+
readonly reasoning?: string | undefined;
|
|
106
|
+
readonly reasoning_text?: string | undefined;
|
|
94
107
|
readonly reasoning_details?: unknown;
|
|
95
|
-
} | {
|
|
96
|
-
readonly role: "tool";
|
|
97
|
-
readonly tool_call_id: string;
|
|
98
|
-
readonly content: string | readonly {
|
|
99
|
-
readonly type: "text";
|
|
100
|
-
readonly text: string;
|
|
101
|
-
readonly cache_control?: {
|
|
102
|
-
readonly type: "ephemeral";
|
|
103
|
-
readonly ttl?: string | undefined;
|
|
104
|
-
} | undefined;
|
|
105
|
-
}[];
|
|
106
108
|
})[];
|
|
107
|
-
readonly stream: true;
|
|
108
|
-
readonly max_completion_tokens?: number | undefined;
|
|
109
|
-
readonly max_tokens?: number | undefined;
|
|
110
|
-
readonly temperature?: number | undefined;
|
|
111
109
|
readonly tools?: readonly {
|
|
110
|
+
readonly type: "function";
|
|
112
111
|
readonly function: {
|
|
113
|
-
readonly description: string;
|
|
114
112
|
readonly name: string;
|
|
113
|
+
readonly description: string;
|
|
115
114
|
readonly parameters: {
|
|
116
115
|
readonly [x: string]: unknown;
|
|
117
116
|
};
|
|
118
117
|
readonly strict?: boolean | undefined;
|
|
119
118
|
};
|
|
120
|
-
readonly type: "function";
|
|
121
119
|
readonly cache_control?: {
|
|
122
120
|
readonly type: "ephemeral";
|
|
123
121
|
readonly ttl?: string | undefined;
|
|
124
122
|
} | undefined;
|
|
125
123
|
}[] | undefined;
|
|
126
|
-
readonly
|
|
127
|
-
readonly seed?: number | undefined;
|
|
128
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
124
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
129
125
|
readonly type: "function";
|
|
130
126
|
readonly function: {
|
|
131
127
|
readonly name: string;
|
|
132
128
|
};
|
|
133
129
|
} | undefined;
|
|
134
|
-
readonly
|
|
135
|
-
readonly frequency_penalty?: number | undefined;
|
|
136
|
-
readonly presence_penalty?: number | undefined;
|
|
137
|
-
readonly store?: boolean | undefined;
|
|
138
|
-
readonly prompt_cache_key?: string | undefined;
|
|
139
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
130
|
+
readonly stream: true;
|
|
140
131
|
readonly stream_options?: {
|
|
141
132
|
readonly include_usage: boolean;
|
|
142
133
|
} | undefined;
|
|
134
|
+
readonly store?: boolean | undefined;
|
|
135
|
+
readonly prompt_cache_key?: string | undefined;
|
|
136
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
143
137
|
readonly tool_stream?: boolean | undefined;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
readonly max_completion_tokens?: number | undefined;
|
|
139
|
+
readonly max_tokens?: number | undefined;
|
|
140
|
+
readonly temperature?: number | undefined;
|
|
141
|
+
readonly top_p?: number | undefined;
|
|
142
|
+
readonly frequency_penalty?: number | undefined;
|
|
143
|
+
readonly presence_penalty?: number | undefined;
|
|
144
|
+
readonly seed?: number | undefined;
|
|
145
|
+
readonly stop?: readonly string[] | undefined;
|
|
146
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
|
|
147
147
|
export declare const configure: (input?: LanguageModelOptions) => {
|
|
148
148
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
149
149
|
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, {
|
|
@@ -155,7 +155,7 @@ export declare const configure: (input?: LanguageModelOptions) => {
|
|
|
155
155
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
156
156
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
|
157
157
|
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/xai-video.js").XAIVideoOptions>;
|
|
158
|
-
configure:
|
|
158
|
+
configure: typeof configure;
|
|
159
159
|
};
|
|
160
160
|
export declare const provider: {
|
|
161
161
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -168,19 +168,7 @@ export declare const provider: {
|
|
|
168
168
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
169
169
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
|
170
170
|
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/xai-video.js").XAIVideoOptions>;
|
|
171
|
-
configure:
|
|
172
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
173
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, {
|
|
174
|
-
endpoint: import("../route/client.js").CompactOperation;
|
|
175
|
-
}>;
|
|
176
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, {
|
|
177
|
-
endpoint: import("../route/client.js").CompactOperation;
|
|
178
|
-
}>;
|
|
179
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
180
|
-
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
|
181
|
-
video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/xai-video.js").XAIVideoOptions>;
|
|
182
|
-
configure: /*elided*/ any;
|
|
183
|
-
};
|
|
171
|
+
configure: typeof configure;
|
|
184
172
|
};
|
|
185
173
|
export declare const model: ProviderPackage.Definition<Settings, XAIProviderOptionsInput, typeof responsesRoute.compact>["model"];
|
|
186
174
|
export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput, {
|