@opencode-ai/ai 0.0.0-beta-18045 → 0.0.0-beta-18135
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.d.ts +259 -17
- package/dist/protocols/anthropic-messages.js +337 -24
- package/dist/protocols/gemini.d.ts +4 -31
- package/dist/protocols/gemini.js +23 -4
- package/dist/protocols/open-responses.d.ts +8 -4
- package/dist/protocols/open-responses.js +73 -38
- package/dist/protocols/openai-chat.d.ts +25 -11
- package/dist/protocols/openai-chat.js +124 -8
- package/dist/protocols/openai-compatible-chat.d.ts +3 -1
- package/dist/protocols/openai-compatible-responses.d.ts +1 -1
- package/dist/protocols/openai-responses.d.ts +5 -5
- package/dist/protocols/openai-responses.js +21 -5
- package/dist/protocols/utils/bedrock-media.d.ts +1 -0
- package/dist/protocols/xai-responses.d.ts +1 -1
- package/dist/protocols/xai-responses.js +2 -10
- package/dist/providers/amazon-bedrock-mantle.d.ts +4 -2
- package/dist/providers/anthropic-compatible.d.ts +75 -4
- package/dist/providers/anthropic.d.ts +75 -4
- package/dist/providers/azure.d.ts +4 -2
- package/dist/providers/cloudflare.d.ts +9 -3
- package/dist/providers/google-vertex-chat.d.ts +3 -1
- package/dist/providers/google-vertex-messages.d.ts +75 -4
- package/dist/providers/google-vertex-responses.d.ts +1 -1
- package/dist/providers/google-vertex.d.ts +1 -1
- package/dist/providers/google.d.ts +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +1 -1
- package/dist/providers/openai-compatible.d.ts +3 -1
- package/dist/providers/openai.d.ts +4 -2
- package/dist/providers/openrouter.d.ts +11 -3
- package/dist/providers/xai.d.ts +3 -1
- package/dist/schema/messages.d.ts +4 -0
- package/dist/schema/messages.js +2 -0
- package/dist/schema/options.d.ts +5 -0
- package/dist/schema/options.js +5 -0
- package/package.json +3 -3
|
@@ -34,6 +34,7 @@ export declare const MediaPart: Schema.Struct<{
|
|
|
34
34
|
readonly mediaType: Schema.String;
|
|
35
35
|
readonly data: Schema.Union<readonly [Schema.String, Schema.Uint8Array]>;
|
|
36
36
|
readonly filename: Schema.optional<Schema.String>;
|
|
37
|
+
readonly cache: Schema.optional<typeof CacheHint>;
|
|
37
38
|
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
38
39
|
}>;
|
|
39
40
|
export type MediaPart = Schema.Schema.Type<typeof MediaPart>;
|
|
@@ -175,6 +176,7 @@ export declare const ContentPart: Schema.toTaggedUnion<"type", readonly [Schema.
|
|
|
175
176
|
readonly mediaType: Schema.String;
|
|
176
177
|
readonly data: Schema.Union<readonly [Schema.String, Schema.Uint8Array]>;
|
|
177
178
|
readonly filename: Schema.optional<Schema.String>;
|
|
179
|
+
readonly cache: Schema.optional<typeof CacheHint>;
|
|
178
180
|
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
179
181
|
}>, Schema.Struct<{
|
|
180
182
|
readonly type: Schema.Literal<"tool-call">;
|
|
@@ -247,6 +249,7 @@ declare const Message_base: Schema.Class<Message, Schema.Struct<{
|
|
|
247
249
|
readonly mediaType: Schema.String;
|
|
248
250
|
readonly data: Schema.Union<readonly [Schema.String, Schema.Uint8Array]>;
|
|
249
251
|
readonly filename: Schema.optional<Schema.String>;
|
|
252
|
+
readonly cache: Schema.optional<typeof CacheHint>;
|
|
250
253
|
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
251
254
|
}>, Schema.Struct<{
|
|
252
255
|
readonly type: Schema.Literal<"tool-call">;
|
|
@@ -348,6 +351,7 @@ export declare namespace ToolDefinition {
|
|
|
348
351
|
declare const ToolChoice_base: Schema.Class<ToolChoice, Schema.Struct<{
|
|
349
352
|
readonly type: Schema.Literals<readonly ["auto", "none", "required", "tool"]>;
|
|
350
353
|
readonly name: Schema.optional<Schema.String>;
|
|
354
|
+
readonly disableParallelToolUse: Schema.optional<Schema.Boolean>;
|
|
351
355
|
}>, {}>;
|
|
352
356
|
export declare class ToolChoice extends ToolChoice_base {
|
|
353
357
|
}
|
package/dist/schema/messages.js
CHANGED
|
@@ -33,6 +33,7 @@ export const MediaPart = Schema.Struct({
|
|
|
33
33
|
mediaType: Schema.String,
|
|
34
34
|
data: Schema.Union([Schema.String, Schema.Uint8Array]),
|
|
35
35
|
filename: Schema.optional(Schema.String),
|
|
36
|
+
cache: Schema.optional(CacheHint),
|
|
36
37
|
metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
37
38
|
}).annotate({ identifier: "LLM.Content.Media" });
|
|
38
39
|
const isToolResultValue = (value) => isRecord(value) &&
|
|
@@ -187,6 +188,7 @@ export class ToolDefinition extends Schema.Class("LLM.ToolDefinition")({
|
|
|
187
188
|
export class ToolChoice extends Schema.Class("LLM.ToolChoice")({
|
|
188
189
|
type: Schema.Literals(["auto", "none", "required", "tool"]),
|
|
189
190
|
name: Schema.optional(Schema.String),
|
|
191
|
+
disableParallelToolUse: Schema.optional(Schema.Boolean),
|
|
190
192
|
}) {
|
|
191
193
|
}
|
|
192
194
|
(function (ToolChoice) {
|
package/dist/schema/options.d.ts
CHANGED
|
@@ -74,6 +74,11 @@ declare const LanguageModelCompatibility_base: Schema.Class<LanguageModelCompati
|
|
|
74
74
|
readonly reasoningField: Schema.optional<Schema.String>;
|
|
75
75
|
readonly maxTokensField: Schema.optional<Schema.Literals<readonly ["max_completion_tokens", "max_tokens"]>>;
|
|
76
76
|
readonly requireFinishReason: Schema.optional<Schema.Boolean>;
|
|
77
|
+
readonly supportsStore: Schema.optional<Schema.Boolean>;
|
|
78
|
+
readonly supportsUsageInStreaming: Schema.optional<Schema.Boolean>;
|
|
79
|
+
readonly supportsStrictMode: Schema.optional<Schema.Boolean>;
|
|
80
|
+
readonly zaiToolStream: Schema.optional<Schema.Boolean>;
|
|
81
|
+
readonly requireSignature: Schema.optional<Schema.Boolean>;
|
|
77
82
|
}>, {}>;
|
|
78
83
|
export declare class LanguageModelCompatibility extends LanguageModelCompatibility_base {
|
|
79
84
|
}
|
package/dist/schema/options.js
CHANGED
|
@@ -101,6 +101,11 @@ export class LanguageModelCompatibility extends Schema.Class("LLM.LanguageModelC
|
|
|
101
101
|
reasoningField: Schema.optional(Schema.String),
|
|
102
102
|
maxTokensField: Schema.optional(LanguageModelMaxTokensFieldCompatibility),
|
|
103
103
|
requireFinishReason: Schema.optional(Schema.Boolean),
|
|
104
|
+
supportsStore: Schema.optional(Schema.Boolean),
|
|
105
|
+
supportsUsageInStreaming: Schema.optional(Schema.Boolean),
|
|
106
|
+
supportsStrictMode: Schema.optional(Schema.Boolean),
|
|
107
|
+
zaiToolStream: Schema.optional(Schema.Boolean),
|
|
108
|
+
requireSignature: Schema.optional(Schema.Boolean),
|
|
104
109
|
}) {
|
|
105
110
|
}
|
|
106
111
|
(function (LanguageModelCompatibility) {
|
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-18135",
|
|
4
4
|
"name": "@opencode-ai/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
33
|
-
"@opencode-ai/http-recorder": "0.0.0-beta-
|
|
33
|
+
"@opencode-ai/http-recorder": "0.0.0-beta-18135",
|
|
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,7 +39,7 @@
|
|
|
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-18135",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-rc.111",
|
|
45
45
|
"google-auth-library": "10.5.0"
|