@opencode-ai/ai 0.0.0-beta-18050 → 0.0.0-beta-18138
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/utils/partial-json-options.d.ts +62 -0
- package/dist/protocols/utils/partial-json-options.js +52 -0
- package/dist/protocols/utils/partial-json.d.ts +8 -0
- package/dist/protocols/utils/partial-json.js +224 -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
|
@@ -94,11 +94,12 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
|
|
|
94
94
|
readonly max_tokens?: number | undefined;
|
|
95
95
|
readonly tools?: readonly {
|
|
96
96
|
readonly function: {
|
|
97
|
-
readonly name: string;
|
|
98
97
|
readonly description: string;
|
|
98
|
+
readonly name: string;
|
|
99
99
|
readonly parameters: {
|
|
100
100
|
readonly [x: string]: unknown;
|
|
101
101
|
};
|
|
102
|
+
readonly strict?: boolean | undefined;
|
|
102
103
|
};
|
|
103
104
|
readonly type: "function";
|
|
104
105
|
readonly cache_control?: {
|
|
@@ -122,6 +123,7 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
|
|
|
122
123
|
} | undefined;
|
|
123
124
|
readonly prompt_cache_key?: string | undefined;
|
|
124
125
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
126
|
+
readonly tool_stream?: boolean | undefined;
|
|
125
127
|
readonly frequency_penalty?: number | undefined;
|
|
126
128
|
readonly presence_penalty?: number | undefined;
|
|
127
129
|
}, import("../route/transport/http.js").HttpPrepared<string>>;
|
|
@@ -191,11 +193,12 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
|
|
|
191
193
|
readonly max_tokens?: number | undefined;
|
|
192
194
|
readonly tools?: readonly {
|
|
193
195
|
readonly function: {
|
|
194
|
-
readonly name: string;
|
|
195
196
|
readonly description: string;
|
|
197
|
+
readonly name: string;
|
|
196
198
|
readonly parameters: {
|
|
197
199
|
readonly [x: string]: unknown;
|
|
198
200
|
};
|
|
201
|
+
readonly strict?: boolean | undefined;
|
|
199
202
|
};
|
|
200
203
|
readonly type: "function";
|
|
201
204
|
readonly cache_control?: {
|
|
@@ -219,6 +222,7 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
|
|
|
219
222
|
} | undefined;
|
|
220
223
|
readonly prompt_cache_key?: string | undefined;
|
|
221
224
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
225
|
+
readonly tool_stream?: boolean | undefined;
|
|
222
226
|
readonly frequency_penalty?: number | undefined;
|
|
223
227
|
readonly presence_penalty?: number | undefined;
|
|
224
228
|
}, import("../route/transport/http.js").HttpPrepared<string>>;
|
|
@@ -288,11 +292,12 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
288
292
|
readonly max_tokens?: number | undefined;
|
|
289
293
|
readonly tools?: readonly {
|
|
290
294
|
readonly function: {
|
|
291
|
-
readonly name: string;
|
|
292
295
|
readonly description: string;
|
|
296
|
+
readonly name: string;
|
|
293
297
|
readonly parameters: {
|
|
294
298
|
readonly [x: string]: unknown;
|
|
295
299
|
};
|
|
300
|
+
readonly strict?: boolean | undefined;
|
|
296
301
|
};
|
|
297
302
|
readonly type: "function";
|
|
298
303
|
readonly cache_control?: {
|
|
@@ -316,6 +321,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
316
321
|
} | undefined;
|
|
317
322
|
readonly prompt_cache_key?: string | undefined;
|
|
318
323
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
324
|
+
readonly tool_stream?: boolean | undefined;
|
|
319
325
|
readonly frequency_penalty?: number | undefined;
|
|
320
326
|
readonly presence_penalty?: number | undefined;
|
|
321
327
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
@@ -84,11 +84,12 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
84
84
|
readonly max_tokens?: number | undefined;
|
|
85
85
|
readonly tools?: readonly {
|
|
86
86
|
readonly function: {
|
|
87
|
-
readonly name: string;
|
|
88
87
|
readonly description: string;
|
|
88
|
+
readonly name: string;
|
|
89
89
|
readonly parameters: {
|
|
90
90
|
readonly [x: string]: unknown;
|
|
91
91
|
};
|
|
92
|
+
readonly strict?: boolean | undefined;
|
|
92
93
|
};
|
|
93
94
|
readonly type: "function";
|
|
94
95
|
readonly cache_control?: {
|
|
@@ -112,6 +113,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
112
113
|
} | undefined;
|
|
113
114
|
readonly prompt_cache_key?: string | undefined;
|
|
114
115
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
116
|
+
readonly tool_stream?: boolean | undefined;
|
|
115
117
|
readonly frequency_penalty?: number | undefined;
|
|
116
118
|
readonly presence_penalty?: number | undefined;
|
|
117
119
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
@@ -23,6 +23,9 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const routes: Route<{
|
|
25
25
|
anthropic_version: "vertex-2023-10-16";
|
|
26
|
+
metadata?: {
|
|
27
|
+
readonly user_id?: string | null | undefined;
|
|
28
|
+
} | undefined;
|
|
26
29
|
max_tokens: number;
|
|
27
30
|
tools?: readonly {
|
|
28
31
|
readonly description: string;
|
|
@@ -58,22 +61,46 @@ export declare const routes: Route<{
|
|
|
58
61
|
readonly type: "base64";
|
|
59
62
|
readonly media_type: string;
|
|
60
63
|
readonly data: string;
|
|
64
|
+
} | {
|
|
65
|
+
readonly type: "url";
|
|
66
|
+
readonly url: string;
|
|
67
|
+
} | {
|
|
68
|
+
readonly type: "file";
|
|
69
|
+
readonly file_id: string;
|
|
61
70
|
};
|
|
62
71
|
readonly cache_control?: {
|
|
63
72
|
readonly type: "ephemeral";
|
|
64
73
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
65
74
|
} | undefined;
|
|
75
|
+
readonly transformations?: {
|
|
76
|
+
readonly oversized_image?: "error" | "downsize" | undefined;
|
|
77
|
+
} | undefined;
|
|
66
78
|
} | {
|
|
67
79
|
readonly type: "document";
|
|
68
80
|
readonly source: {
|
|
69
81
|
readonly type: "base64";
|
|
70
82
|
readonly media_type: "application/pdf";
|
|
71
83
|
readonly data: string;
|
|
84
|
+
} | {
|
|
85
|
+
readonly type: "text";
|
|
86
|
+
readonly media_type: "text/plain";
|
|
87
|
+
readonly data: string;
|
|
88
|
+
} | {
|
|
89
|
+
readonly type: "url";
|
|
90
|
+
readonly url: string;
|
|
91
|
+
} | {
|
|
92
|
+
readonly type: "file";
|
|
93
|
+
readonly file_id: string;
|
|
72
94
|
};
|
|
95
|
+
readonly title?: string | undefined;
|
|
96
|
+
readonly context?: string | undefined;
|
|
73
97
|
readonly cache_control?: {
|
|
74
98
|
readonly type: "ephemeral";
|
|
75
99
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
76
100
|
} | undefined;
|
|
101
|
+
readonly citations?: {
|
|
102
|
+
readonly enabled: boolean;
|
|
103
|
+
} | undefined;
|
|
77
104
|
} | {
|
|
78
105
|
readonly type: "tool_result";
|
|
79
106
|
readonly content: string | readonly ({
|
|
@@ -89,22 +116,46 @@ export declare const routes: Route<{
|
|
|
89
116
|
readonly type: "base64";
|
|
90
117
|
readonly media_type: string;
|
|
91
118
|
readonly data: string;
|
|
119
|
+
} | {
|
|
120
|
+
readonly type: "url";
|
|
121
|
+
readonly url: string;
|
|
122
|
+
} | {
|
|
123
|
+
readonly type: "file";
|
|
124
|
+
readonly file_id: string;
|
|
92
125
|
};
|
|
93
126
|
readonly cache_control?: {
|
|
94
127
|
readonly type: "ephemeral";
|
|
95
128
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
96
129
|
} | undefined;
|
|
130
|
+
readonly transformations?: {
|
|
131
|
+
readonly oversized_image?: "error" | "downsize" | undefined;
|
|
132
|
+
} | undefined;
|
|
97
133
|
} | {
|
|
98
134
|
readonly type: "document";
|
|
99
135
|
readonly source: {
|
|
100
136
|
readonly type: "base64";
|
|
101
137
|
readonly media_type: "application/pdf";
|
|
102
138
|
readonly data: string;
|
|
139
|
+
} | {
|
|
140
|
+
readonly type: "text";
|
|
141
|
+
readonly media_type: "text/plain";
|
|
142
|
+
readonly data: string;
|
|
143
|
+
} | {
|
|
144
|
+
readonly type: "url";
|
|
145
|
+
readonly url: string;
|
|
146
|
+
} | {
|
|
147
|
+
readonly type: "file";
|
|
148
|
+
readonly file_id: string;
|
|
103
149
|
};
|
|
150
|
+
readonly title?: string | undefined;
|
|
151
|
+
readonly context?: string | undefined;
|
|
104
152
|
readonly cache_control?: {
|
|
105
153
|
readonly type: "ephemeral";
|
|
106
154
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
107
155
|
} | undefined;
|
|
156
|
+
readonly citations?: {
|
|
157
|
+
readonly enabled: boolean;
|
|
158
|
+
} | undefined;
|
|
108
159
|
})[];
|
|
109
160
|
readonly tool_use_id: string;
|
|
110
161
|
readonly cache_control?: {
|
|
@@ -151,11 +202,11 @@ export declare const routes: Route<{
|
|
|
151
202
|
} | {
|
|
152
203
|
readonly type: "thinking";
|
|
153
204
|
readonly thinking: string;
|
|
205
|
+
readonly signature: string;
|
|
154
206
|
readonly cache_control?: {
|
|
155
207
|
readonly type: "ephemeral";
|
|
156
208
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
157
209
|
} | undefined;
|
|
158
|
-
readonly signature?: string | undefined;
|
|
159
210
|
} | {
|
|
160
211
|
readonly data: string;
|
|
161
212
|
readonly type: "redacted_thinking";
|
|
@@ -187,18 +238,38 @@ export declare const routes: Route<{
|
|
|
187
238
|
} | {
|
|
188
239
|
readonly type: "disabled";
|
|
189
240
|
} | undefined;
|
|
241
|
+
service_tier?: "auto" | "standard_only" | undefined;
|
|
242
|
+
container?: string | {
|
|
243
|
+
readonly id?: string | null | undefined;
|
|
244
|
+
readonly skills?: readonly {
|
|
245
|
+
readonly [x: string]: unknown;
|
|
246
|
+
}[] | null | undefined;
|
|
247
|
+
} | null | undefined;
|
|
248
|
+
inference_geo?: string | null | undefined;
|
|
249
|
+
cache_control?: {
|
|
250
|
+
readonly type: "ephemeral";
|
|
251
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
252
|
+
} | undefined;
|
|
253
|
+
output_config?: {
|
|
254
|
+
readonly format?: {
|
|
255
|
+
readonly type: "json_schema";
|
|
256
|
+
readonly schema: {
|
|
257
|
+
readonly [x: string]: unknown;
|
|
258
|
+
};
|
|
259
|
+
} | null | undefined;
|
|
260
|
+
readonly effort?: string | undefined;
|
|
261
|
+
} | undefined;
|
|
190
262
|
tool_choice?: {
|
|
191
263
|
readonly type: "auto" | "none" | "any";
|
|
264
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
192
265
|
} | {
|
|
193
266
|
readonly type: "tool";
|
|
194
267
|
readonly name: string;
|
|
268
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
195
269
|
} | undefined;
|
|
196
270
|
top_p?: number | undefined;
|
|
197
271
|
top_k?: number | undefined;
|
|
198
272
|
stop_sequences?: readonly string[] | undefined;
|
|
199
|
-
output_config?: {
|
|
200
|
-
readonly effort?: string | undefined;
|
|
201
|
-
} | undefined;
|
|
202
273
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
203
274
|
export declare const configure: (input?: Config) => {
|
|
204
275
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -107,6 +107,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
107
107
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
108
108
|
} | undefined;
|
|
109
109
|
readonly temperature?: number | undefined;
|
|
110
|
+
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
110
111
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
111
112
|
readonly type: "function";
|
|
112
113
|
readonly name: string;
|
|
@@ -130,7 +131,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
130
131
|
readonly presence_penalty?: number | undefined;
|
|
131
132
|
readonly safety_identifier?: string | undefined;
|
|
132
133
|
readonly top_logprobs?: number | undefined;
|
|
133
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
134
134
|
readonly max_output_tokens?: number | undefined;
|
|
135
135
|
readonly max_tool_calls?: number | undefined;
|
|
136
136
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
@@ -68,6 +68,7 @@ export declare const routes: Route<{
|
|
|
68
68
|
} | undefined;
|
|
69
69
|
}[];
|
|
70
70
|
}[] | undefined;
|
|
71
|
+
readonly serviceTier?: string | undefined;
|
|
71
72
|
readonly toolConfig?: {
|
|
72
73
|
readonly functionCallingConfig: {
|
|
73
74
|
readonly mode: "AUTO" | "NONE" | "ANY";
|
|
@@ -79,7 +80,6 @@ export declare const routes: Route<{
|
|
|
79
80
|
readonly category: string;
|
|
80
81
|
readonly threshold: string;
|
|
81
82
|
}[] | undefined;
|
|
82
|
-
readonly serviceTier?: string | undefined;
|
|
83
83
|
readonly labels?: {
|
|
84
84
|
readonly [x: string]: string;
|
|
85
85
|
} | undefined;
|
|
@@ -49,6 +49,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
49
49
|
} | undefined;
|
|
50
50
|
}[];
|
|
51
51
|
}[] | undefined;
|
|
52
|
+
readonly serviceTier?: string | undefined;
|
|
52
53
|
readonly toolConfig?: {
|
|
53
54
|
readonly functionCallingConfig: {
|
|
54
55
|
readonly mode: "AUTO" | "NONE" | "ANY";
|
|
@@ -60,7 +61,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
60
61
|
readonly category: string;
|
|
61
62
|
readonly threshold: string;
|
|
62
63
|
}[] | undefined;
|
|
63
|
-
readonly serviceTier?: string | undefined;
|
|
64
64
|
readonly labels?: {
|
|
65
65
|
readonly [x: string]: string;
|
|
66
66
|
} | undefined;
|
|
@@ -105,6 +105,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
105
105
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
106
106
|
} | undefined;
|
|
107
107
|
readonly temperature?: number | undefined;
|
|
108
|
+
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
108
109
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
109
110
|
readonly type: "function";
|
|
110
111
|
readonly name: string;
|
|
@@ -128,7 +129,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
128
129
|
readonly presence_penalty?: number | undefined;
|
|
129
130
|
readonly safety_identifier?: string | undefined;
|
|
130
131
|
readonly top_logprobs?: number | undefined;
|
|
131
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
132
132
|
readonly max_output_tokens?: number | undefined;
|
|
133
133
|
readonly max_tool_calls?: number | undefined;
|
|
134
134
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
@@ -85,11 +85,12 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
85
85
|
readonly max_tokens?: number | undefined;
|
|
86
86
|
readonly tools?: readonly {
|
|
87
87
|
readonly function: {
|
|
88
|
-
readonly name: string;
|
|
89
88
|
readonly description: string;
|
|
89
|
+
readonly name: string;
|
|
90
90
|
readonly parameters: {
|
|
91
91
|
readonly [x: string]: unknown;
|
|
92
92
|
};
|
|
93
|
+
readonly strict?: boolean | undefined;
|
|
93
94
|
};
|
|
94
95
|
readonly type: "function";
|
|
95
96
|
readonly cache_control?: {
|
|
@@ -113,6 +114,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
113
114
|
} | undefined;
|
|
114
115
|
readonly prompt_cache_key?: string | undefined;
|
|
115
116
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
117
|
+
readonly tool_stream?: boolean | undefined;
|
|
116
118
|
readonly frequency_penalty?: number | undefined;
|
|
117
119
|
readonly presence_penalty?: number | undefined;
|
|
118
120
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
@@ -73,11 +73,12 @@ export declare const routes: (Route<{
|
|
|
73
73
|
readonly max_tokens?: number | undefined;
|
|
74
74
|
readonly tools?: readonly {
|
|
75
75
|
readonly function: {
|
|
76
|
-
readonly name: string;
|
|
77
76
|
readonly description: string;
|
|
77
|
+
readonly name: string;
|
|
78
78
|
readonly parameters: {
|
|
79
79
|
readonly [x: string]: unknown;
|
|
80
80
|
};
|
|
81
|
+
readonly strict?: boolean | undefined;
|
|
81
82
|
};
|
|
82
83
|
readonly type: "function";
|
|
83
84
|
readonly cache_control?: {
|
|
@@ -101,6 +102,7 @@ export declare const routes: (Route<{
|
|
|
101
102
|
} | undefined;
|
|
102
103
|
readonly prompt_cache_key?: string | undefined;
|
|
103
104
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
105
|
+
readonly tool_stream?: boolean | undefined;
|
|
104
106
|
readonly frequency_penalty?: number | undefined;
|
|
105
107
|
readonly presence_penalty?: number | undefined;
|
|
106
108
|
}, import("../route/transport/http.js").HttpPrepared<string>> | Route<{
|
|
@@ -202,6 +204,7 @@ export declare const routes: (Route<{
|
|
|
202
204
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
203
205
|
} | undefined;
|
|
204
206
|
readonly temperature?: number | undefined;
|
|
207
|
+
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
205
208
|
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
206
209
|
readonly type: "function";
|
|
207
210
|
readonly name: string;
|
|
@@ -227,7 +230,6 @@ export declare const routes: (Route<{
|
|
|
227
230
|
readonly presence_penalty?: number | undefined;
|
|
228
231
|
readonly safety_identifier?: string | undefined;
|
|
229
232
|
readonly top_logprobs?: number | undefined;
|
|
230
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
231
233
|
readonly max_output_tokens?: number | undefined;
|
|
232
234
|
readonly max_tool_calls?: number | undefined;
|
|
233
235
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
@@ -152,6 +152,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
152
152
|
readonly name: Schema.String;
|
|
153
153
|
readonly description: Schema.String;
|
|
154
154
|
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
155
|
+
readonly strict: Schema.optional<Schema.Boolean>;
|
|
155
156
|
}>;
|
|
156
157
|
readonly cache_control: Schema.optional<Schema.Struct<{
|
|
157
158
|
readonly type: Schema.Literal<"ephemeral">;
|
|
@@ -171,6 +172,7 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
|
|
|
171
172
|
store: Schema.optional<Schema.Boolean>;
|
|
172
173
|
prompt_cache_key: Schema.optional<Schema.String>;
|
|
173
174
|
reasoning_effort: Schema.optional<Schema.declare<import("../protocols/utils/open-responses-options.js").ReasoningEffort, import("../protocols/utils/open-responses-options.js").ReasoningEffort>>;
|
|
175
|
+
tool_stream: Schema.optional<Schema.Boolean>;
|
|
174
176
|
max_completion_tokens: Schema.optional<Schema.Number>;
|
|
175
177
|
max_tokens: Schema.optional<Schema.Number>;
|
|
176
178
|
temperature: Schema.optional<Schema.Number>;
|
|
@@ -248,11 +250,12 @@ export declare const protocol: Protocol<{
|
|
|
248
250
|
readonly max_tokens?: number | undefined;
|
|
249
251
|
readonly tools?: readonly {
|
|
250
252
|
readonly function: {
|
|
251
|
-
readonly name: string;
|
|
252
253
|
readonly description: string;
|
|
254
|
+
readonly name: string;
|
|
253
255
|
readonly parameters: {
|
|
254
256
|
readonly [x: string]: unknown;
|
|
255
257
|
};
|
|
258
|
+
readonly strict?: boolean | undefined;
|
|
256
259
|
};
|
|
257
260
|
readonly type: "function";
|
|
258
261
|
readonly cache_control?: {
|
|
@@ -276,6 +279,7 @@ export declare const protocol: Protocol<{
|
|
|
276
279
|
} | undefined;
|
|
277
280
|
readonly prompt_cache_key?: string | undefined;
|
|
278
281
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
282
|
+
readonly tool_stream?: boolean | undefined;
|
|
279
283
|
readonly frequency_penalty?: number | undefined;
|
|
280
284
|
readonly presence_penalty?: number | undefined;
|
|
281
285
|
}, string, {
|
|
@@ -411,11 +415,12 @@ export declare const route: Route<{
|
|
|
411
415
|
readonly max_tokens?: number | undefined;
|
|
412
416
|
readonly tools?: readonly {
|
|
413
417
|
readonly function: {
|
|
414
|
-
readonly name: string;
|
|
415
418
|
readonly description: string;
|
|
419
|
+
readonly name: string;
|
|
416
420
|
readonly parameters: {
|
|
417
421
|
readonly [x: string]: unknown;
|
|
418
422
|
};
|
|
423
|
+
readonly strict?: boolean | undefined;
|
|
419
424
|
};
|
|
420
425
|
readonly type: "function";
|
|
421
426
|
readonly cache_control?: {
|
|
@@ -439,6 +444,7 @@ export declare const route: Route<{
|
|
|
439
444
|
} | undefined;
|
|
440
445
|
readonly prompt_cache_key?: string | undefined;
|
|
441
446
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
447
|
+
readonly tool_stream?: boolean | undefined;
|
|
442
448
|
readonly frequency_penalty?: number | undefined;
|
|
443
449
|
readonly presence_penalty?: number | undefined;
|
|
444
450
|
}, import("../route/transport/http.js").HttpPrepared<string>>;
|
|
@@ -509,11 +515,12 @@ export declare const routes: Route<{
|
|
|
509
515
|
readonly max_tokens?: number | undefined;
|
|
510
516
|
readonly tools?: readonly {
|
|
511
517
|
readonly function: {
|
|
512
|
-
readonly name: string;
|
|
513
518
|
readonly description: string;
|
|
519
|
+
readonly name: string;
|
|
514
520
|
readonly parameters: {
|
|
515
521
|
readonly [x: string]: unknown;
|
|
516
522
|
};
|
|
523
|
+
readonly strict?: boolean | undefined;
|
|
517
524
|
};
|
|
518
525
|
readonly type: "function";
|
|
519
526
|
readonly cache_control?: {
|
|
@@ -537,6 +544,7 @@ export declare const routes: Route<{
|
|
|
537
544
|
} | undefined;
|
|
538
545
|
readonly prompt_cache_key?: string | undefined;
|
|
539
546
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
547
|
+
readonly tool_stream?: boolean | undefined;
|
|
540
548
|
readonly frequency_penalty?: number | undefined;
|
|
541
549
|
readonly presence_penalty?: number | undefined;
|
|
542
550
|
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -81,11 +81,12 @@ export declare const routes: (Route<{
|
|
|
81
81
|
readonly max_tokens?: number | undefined;
|
|
82
82
|
readonly tools?: readonly {
|
|
83
83
|
readonly function: {
|
|
84
|
-
readonly name: string;
|
|
85
84
|
readonly description: string;
|
|
85
|
+
readonly name: string;
|
|
86
86
|
readonly parameters: {
|
|
87
87
|
readonly [x: string]: unknown;
|
|
88
88
|
};
|
|
89
|
+
readonly strict?: boolean | undefined;
|
|
89
90
|
};
|
|
90
91
|
readonly type: "function";
|
|
91
92
|
readonly cache_control?: {
|
|
@@ -109,6 +110,7 @@ export declare const routes: (Route<{
|
|
|
109
110
|
} | undefined;
|
|
110
111
|
readonly prompt_cache_key?: string | undefined;
|
|
111
112
|
readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
|
|
113
|
+
readonly tool_stream?: boolean | undefined;
|
|
112
114
|
readonly frequency_penalty?: number | undefined;
|
|
113
115
|
readonly presence_penalty?: number | undefined;
|
|
114
116
|
}, import("../route/transport/http.js").HttpPrepared<string>> | Route<unknown, import("../protocols/open-responses-channel.js").Prepared>)[];
|
|
@@ -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-18138",
|
|
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-18138",
|
|
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-18138",
|
|
43
43
|
"aws4fetch": "1.0.20",
|
|
44
44
|
"effect": "4.0.0-rc.111",
|
|
45
45
|
"google-auth-library": "10.5.0"
|