@opencode-ai/ai 0.0.0-beta-17963 → 0.0.0-beta-18027
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/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/gemini.d.ts +40 -40
- package/dist/protocols/gemini.js +68 -50
- package/dist/protocols/open-responses.d.ts +6 -6
- package/dist/protocols/open-responses.js +10 -3
- package/dist/protocols/openai-chat.d.ts +42 -2
- package/dist/protocols/openai-chat.js +34 -5
- package/dist/protocols/openai-compatible-responses.d.ts +1 -1
- package/dist/protocols/openai-responses.d.ts +6 -6
- package/dist/protocols/openai-responses.js +1 -2
- package/dist/protocols/utils/open-responses-options.d.ts +4 -3
- package/dist/protocols/utils/open-responses-options.js +2 -1
- package/dist/protocols/utils/openai-options.d.ts +3 -3
- package/dist/protocols/utils/openai-options.js +1 -1
- package/dist/protocols/xai-responses.d.ts +1 -1
- package/dist/providers/amazon-bedrock-mantle.d.ts +11 -11
- package/dist/providers/azure.d.ts +8 -8
- package/dist/providers/cloudflare.d.ts +2 -2
- package/dist/providers/google-vertex-chat.d.ts +2 -2
- package/dist/providers/google-vertex-responses.d.ts +1 -1
- package/dist/providers/google-vertex.d.ts +7 -7
- package/dist/providers/google-vertex.js +13 -1
- package/dist/providers/google.d.ts +7 -7
- package/dist/providers/openai-compatible-responses.d.ts +1 -1
- package/dist/providers/openai-compatible.d.ts +9 -9
- package/dist/providers/openai-options.d.ts +6 -2
- package/dist/providers/openai.d.ts +12 -12
- package/dist/providers/openrouter.d.ts +22 -0
- package/dist/providers/xai.d.ts +11 -11
- package/package.json +5 -5
|
@@ -227,7 +227,7 @@ export declare const routes: (Route<{
|
|
|
227
227
|
readonly presence_penalty?: number | undefined;
|
|
228
228
|
readonly safety_identifier?: string | undefined;
|
|
229
229
|
readonly top_logprobs?: number | undefined;
|
|
230
|
-
readonly service_tier?: "
|
|
230
|
+
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
231
231
|
readonly max_output_tokens?: number | undefined;
|
|
232
232
|
readonly max_tool_calls?: number | undefined;
|
|
233
233
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
@@ -258,29 +258,29 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
258
258
|
}
|
|
259
259
|
export declare const configure: (input?: Config) => {
|
|
260
260
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
261
|
-
model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
262
|
-
responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
263
|
-
chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
261
|
+
model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
262
|
+
responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
263
|
+
chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
264
264
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
265
265
|
configure: (input?: Config) => /*elided*/ any;
|
|
266
266
|
};
|
|
267
267
|
export declare const provider: {
|
|
268
268
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
269
|
-
model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
270
|
-
responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
271
|
-
chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
269
|
+
model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
270
|
+
responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
271
|
+
chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
272
272
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
273
273
|
configure: (input?: Config) => {
|
|
274
274
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
275
|
-
model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
276
|
-
responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
277
|
-
chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
275
|
+
model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
276
|
+
responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
277
|
+
chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
278
278
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
279
279
|
configure: /*elided*/ any;
|
|
280
280
|
};
|
|
281
281
|
};
|
|
282
282
|
export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
283
283
|
export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
284
|
-
export declare const responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
285
|
-
export declare const chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./
|
|
284
|
+
export declare const responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
285
|
+
export declare const chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput>;
|
|
286
286
|
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
@@ -288,6 +288,8 @@ export declare const protocol: Protocol<{
|
|
|
288
288
|
readonly prompt_tokens?: number | null | undefined;
|
|
289
289
|
readonly completion_tokens?: number | null | undefined;
|
|
290
290
|
readonly total_tokens?: number | null | undefined;
|
|
291
|
+
readonly cached_tokens?: number | null | undefined;
|
|
292
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
291
293
|
readonly prompt_tokens_details?: {
|
|
292
294
|
readonly [x: string]: unknown;
|
|
293
295
|
readonly cached_tokens?: number | null | undefined;
|
|
@@ -301,6 +303,7 @@ export declare const protocol: Protocol<{
|
|
|
301
303
|
} | null | undefined;
|
|
302
304
|
} | null | undefined;
|
|
303
305
|
readonly choices?: readonly {
|
|
306
|
+
readonly [x: string]: unknown;
|
|
304
307
|
readonly delta?: {
|
|
305
308
|
readonly [x: string]: unknown;
|
|
306
309
|
readonly reasoning?: string | null | undefined;
|
|
@@ -318,6 +321,25 @@ export declare const protocol: Protocol<{
|
|
|
318
321
|
}[] | null | undefined;
|
|
319
322
|
readonly reasoning_details?: unknown;
|
|
320
323
|
} | null | undefined;
|
|
324
|
+
readonly usage?: {
|
|
325
|
+
readonly [x: string]: unknown;
|
|
326
|
+
readonly prompt_tokens?: number | null | undefined;
|
|
327
|
+
readonly completion_tokens?: number | null | undefined;
|
|
328
|
+
readonly total_tokens?: number | null | undefined;
|
|
329
|
+
readonly cached_tokens?: number | null | undefined;
|
|
330
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
331
|
+
readonly prompt_tokens_details?: {
|
|
332
|
+
readonly [x: string]: unknown;
|
|
333
|
+
readonly cached_tokens?: number | null | undefined;
|
|
334
|
+
readonly cache_write_tokens?: number | null | undefined;
|
|
335
|
+
} | null | undefined;
|
|
336
|
+
readonly completion_tokens_details?: {
|
|
337
|
+
readonly [x: string]: unknown;
|
|
338
|
+
readonly reasoning_tokens?: number | null | undefined;
|
|
339
|
+
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
340
|
+
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
341
|
+
} | null | undefined;
|
|
342
|
+
} | null | undefined;
|
|
321
343
|
readonly finish_reason?: string | null | undefined;
|
|
322
344
|
readonly native_finish_reason?: string | null | undefined;
|
|
323
345
|
}[] | null | undefined;
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -114,28 +114,28 @@ export declare const routes: (Route<{
|
|
|
114
114
|
}, import("../route/transport/http.js").HttpPrepared<string>> | Route<unknown, import("../protocols/open-responses-channel.js").Prepared>)[];
|
|
115
115
|
export declare const configure: (input?: LanguageModelOptions) => {
|
|
116
116
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
117
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
118
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
119
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
117
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
118
|
+
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
119
|
+
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
120
120
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
|
121
121
|
configure: (input?: LanguageModelOptions) => /*elided*/ any;
|
|
122
122
|
};
|
|
123
123
|
export declare const provider: {
|
|
124
124
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
125
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
126
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
127
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
125
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
126
|
+
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
127
|
+
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
128
128
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
|
129
129
|
configure: (input?: LanguageModelOptions) => {
|
|
130
130
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
131
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
132
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
133
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
131
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
132
|
+
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
133
|
+
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
134
134
|
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
|
135
135
|
configure: /*elided*/ any;
|
|
136
136
|
};
|
|
137
137
|
};
|
|
138
138
|
export declare const model: ProviderPackage.Definition<Settings, XAIProviderOptionsInput>["model"];
|
|
139
|
-
export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
140
|
-
export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<
|
|
139
|
+
export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
140
|
+
export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIOptionsInput>;
|
|
141
141
|
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-beta-
|
|
3
|
+
"version": "0.0.0-beta-18027",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
|
-
"@effect/platform-node": "4.0.0-rc.
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-beta-
|
|
32
|
+
"@effect/platform-node": "4.0.0-rc.111",
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-beta-18027",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.3.13",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@smithy/eventstream-codec": "4.2.14",
|
|
41
41
|
"@smithy/util-utf8": "4.2.2",
|
|
42
|
-
"@opencode-ai/schema": "0.0.0-beta-
|
|
42
|
+
"@opencode-ai/schema": "0.0.0-beta-18027",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
|
-
"effect": "4.0.0-rc.
|
|
44
|
+
"effect": "4.0.0-rc.111",
|
|
45
45
|
"google-auth-library": "10.5.0"
|
|
46
46
|
}
|
|
47
47
|
}
|