@opencode-ai/ai 0.0.0-next-16255 → 0.0.0-next-16274
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/llm.d.ts +60 -60
- package/dist/protocols/anthropic-messages.d.ts +303 -303
- package/dist/protocols/anthropic-messages.js +1 -0
- package/dist/protocols/bedrock-converse.d.ts +246 -242
- package/dist/protocols/gemini.d.ts +136 -132
- package/dist/protocols/gemini.js +1 -0
- package/dist/protocols/open-responses.d.ts +232 -232
- package/dist/protocols/openai-chat.d.ts +147 -141
- package/dist/protocols/openai-chat.js +1 -0
- package/dist/protocols/openai-compatible-chat.d.ts +48 -46
- package/dist/protocols/openai-compatible-responses.d.ts +56 -56
- package/dist/protocols/openai-responses.d.ts +388 -388
- package/dist/protocols/shared.d.ts +5 -4
- package/dist/protocols/shared.js +1 -0
- package/dist/protocols/utils/bedrock-media.d.ts +10 -10
- package/dist/protocols/utils/tool-stream.d.ts +180 -180
- package/dist/providers/amazon-bedrock.d.ts +109 -107
- package/dist/providers/anthropic-compatible.d.ts +145 -145
- package/dist/providers/anthropic.d.ts +145 -145
- package/dist/providers/azure.d.ts +112 -110
- package/dist/providers/cloudflare.d.ts +144 -138
- package/dist/providers/github-copilot.d.ts +112 -110
- package/dist/providers/google-vertex-chat.d.ts +48 -46
- package/dist/providers/google-vertex-messages.d.ts +145 -146
- package/dist/providers/google-vertex-responses.d.ts +56 -56
- package/dist/providers/google-vertex.d.ts +52 -50
- package/dist/providers/google.d.ts +52 -50
- package/dist/providers/openai-compatible-responses.d.ts +56 -56
- package/dist/providers/openai-compatible.d.ts +48 -46
- package/dist/providers/openai.d.ts +176 -174
- package/dist/providers/openrouter.d.ts +147 -141
- package/dist/providers/xai.d.ts +112 -110
- package/dist/route/client.d.ts +60 -60
- package/dist/schema/errors.d.ts +2 -6
- package/dist/schema/errors.js +2 -5
- package/dist/schema/events.d.ts +1117 -1115
- package/dist/schema/messages.d.ts +9 -9
- package/dist/schema/messages.js +3 -4
- package/dist/tool-runtime.js +1 -1
- package/dist/tool.d.ts +5 -4
- package/dist/tool.js +1 -0
- package/package.json +5 -5
|
@@ -8,130 +8,132 @@ export type { OpenAIOptionsInput, OpenAIResponseIncludable } from "./openai-opti
|
|
|
8
8
|
export type { OpenAIImageOptions } from "../protocols/openai-images";
|
|
9
9
|
export declare const id: string & import("effect/Brand").Brand<"LLM.ProviderID">;
|
|
10
10
|
export declare const routes: (Route<{
|
|
11
|
-
readonly
|
|
12
|
-
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly
|
|
17
|
-
|
|
18
|
-
readonly
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
readonly
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
readonly model: string;
|
|
12
|
+
readonly messages: readonly ({
|
|
13
|
+
readonly role: "system";
|
|
14
|
+
readonly content: string;
|
|
15
|
+
} | {
|
|
16
|
+
readonly role: "user";
|
|
17
|
+
readonly content: string | readonly ({
|
|
18
|
+
readonly type: "text";
|
|
19
|
+
readonly text: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly type: "image_url";
|
|
22
|
+
readonly image_url: {
|
|
23
|
+
readonly url: string;
|
|
24
|
+
};
|
|
25
|
+
})[];
|
|
26
|
+
} | {
|
|
26
27
|
readonly [x: string]: unknown;
|
|
27
28
|
readonly content: string | null;
|
|
28
29
|
readonly role: "assistant";
|
|
29
30
|
readonly reasoning?: string | undefined;
|
|
30
|
-
readonly tool_calls?: readonly import("effect/Schema").Struct.ReadonlySide<{
|
|
31
|
-
readonly id: import("effect/Schema").String;
|
|
32
|
-
readonly type: import("effect/Schema").tag<"function">;
|
|
33
|
-
readonly function: import("effect/Schema").Struct<{
|
|
34
|
-
readonly name: import("effect/Schema").String;
|
|
35
|
-
readonly arguments: import("effect/Schema").String;
|
|
36
|
-
}>;
|
|
37
|
-
}, "Type">[] | undefined;
|
|
38
31
|
readonly reasoning_content?: string | undefined;
|
|
39
32
|
readonly reasoning_text?: string | undefined;
|
|
33
|
+
readonly tool_calls?: readonly {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly type: "function";
|
|
36
|
+
readonly function: {
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly arguments: string;
|
|
39
|
+
};
|
|
40
|
+
}[] | undefined;
|
|
40
41
|
readonly reasoning_details?: unknown;
|
|
41
|
-
} |
|
|
42
|
-
readonly role:
|
|
43
|
-
readonly tool_call_id:
|
|
44
|
-
readonly content:
|
|
45
|
-
}
|
|
46
|
-
readonly model: string;
|
|
42
|
+
} | {
|
|
43
|
+
readonly role: "tool";
|
|
44
|
+
readonly tool_call_id: string;
|
|
45
|
+
readonly content: string;
|
|
46
|
+
})[];
|
|
47
47
|
readonly stream: true;
|
|
48
48
|
readonly stop?: readonly string[] | undefined;
|
|
49
|
-
readonly tools?: readonly
|
|
50
|
-
readonly type:
|
|
51
|
-
readonly function:
|
|
52
|
-
readonly name:
|
|
53
|
-
readonly description:
|
|
54
|
-
readonly parameters:
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
readonly tools?: readonly {
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
readonly function: {
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly description: string;
|
|
54
|
+
readonly parameters: {
|
|
55
|
+
readonly [x: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}[] | undefined;
|
|
57
59
|
readonly temperature?: number | undefined;
|
|
58
60
|
readonly seed?: number | undefined;
|
|
59
61
|
readonly frequency_penalty?: number | undefined;
|
|
60
62
|
readonly max_tokens?: number | undefined;
|
|
61
63
|
readonly presence_penalty?: number | undefined;
|
|
62
|
-
readonly stream_options?:
|
|
63
|
-
readonly include_usage:
|
|
64
|
-
}
|
|
65
|
-
readonly tool_choice?: "required" | "none" | "auto" |
|
|
66
|
-
readonly type:
|
|
67
|
-
readonly function:
|
|
68
|
-
readonly name:
|
|
69
|
-
}
|
|
70
|
-
}
|
|
64
|
+
readonly stream_options?: {
|
|
65
|
+
readonly include_usage: boolean;
|
|
66
|
+
} | undefined;
|
|
67
|
+
readonly tool_choice?: "required" | "none" | "auto" | {
|
|
68
|
+
readonly type: "function";
|
|
69
|
+
readonly function: {
|
|
70
|
+
readonly name: string;
|
|
71
|
+
};
|
|
72
|
+
} | undefined;
|
|
71
73
|
readonly top_p?: number | undefined;
|
|
72
74
|
readonly store?: boolean | undefined;
|
|
73
75
|
readonly reasoning_effort?: string | undefined;
|
|
74
76
|
}, import("../route/transport/http").HttpPrepared<string>> | Route<{
|
|
75
77
|
readonly input: readonly ({
|
|
76
78
|
readonly type: "reasoning";
|
|
77
|
-
readonly summary: readonly
|
|
78
|
-
readonly type:
|
|
79
|
-
readonly text:
|
|
80
|
-
}
|
|
79
|
+
readonly summary: readonly {
|
|
80
|
+
readonly type: "summary_text";
|
|
81
|
+
readonly text: string;
|
|
82
|
+
}[];
|
|
81
83
|
readonly id?: string | undefined;
|
|
82
84
|
readonly encrypted_content?: string | null | undefined;
|
|
83
|
-
} |
|
|
84
|
-
readonly type:
|
|
85
|
-
readonly id:
|
|
86
|
-
}
|
|
87
|
-
readonly role:
|
|
88
|
-
readonly content:
|
|
89
|
-
}
|
|
90
|
-
readonly role:
|
|
91
|
-
readonly content:
|
|
92
|
-
readonly type:
|
|
93
|
-
readonly
|
|
94
|
-
}
|
|
95
|
-
readonly type:
|
|
96
|
-
readonly
|
|
97
|
-
|
|
98
|
-
readonly
|
|
99
|
-
|
|
100
|
-
readonly
|
|
101
|
-
readonly
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
readonly content: readonly
|
|
105
|
-
readonly type:
|
|
106
|
-
readonly text:
|
|
107
|
-
}
|
|
85
|
+
} | {
|
|
86
|
+
readonly type: "item_reference";
|
|
87
|
+
readonly id: string;
|
|
88
|
+
} | {
|
|
89
|
+
readonly role: "system";
|
|
90
|
+
readonly content: string;
|
|
91
|
+
} | {
|
|
92
|
+
readonly role: "user";
|
|
93
|
+
readonly content: readonly ({
|
|
94
|
+
readonly type: "input_image";
|
|
95
|
+
readonly image_url: string;
|
|
96
|
+
} | {
|
|
97
|
+
readonly type: "input_file";
|
|
98
|
+
readonly filename: string;
|
|
99
|
+
readonly file_data: string;
|
|
100
|
+
readonly mime_type?: string | undefined;
|
|
101
|
+
} | {
|
|
102
|
+
readonly type: "input_text";
|
|
103
|
+
readonly text: string;
|
|
104
|
+
})[];
|
|
105
|
+
} | {
|
|
106
|
+
readonly content: readonly {
|
|
107
|
+
readonly type: "output_text";
|
|
108
|
+
readonly text: string;
|
|
109
|
+
}[];
|
|
108
110
|
readonly role: "assistant";
|
|
109
111
|
readonly phase?: "commentary" | "final_answer" | undefined;
|
|
110
|
-
} |
|
|
111
|
-
readonly type:
|
|
112
|
-
readonly call_id:
|
|
113
|
-
readonly name:
|
|
114
|
-
readonly arguments:
|
|
115
|
-
}
|
|
116
|
-
readonly type:
|
|
117
|
-
readonly call_id:
|
|
118
|
-
readonly output:
|
|
119
|
-
readonly type:
|
|
120
|
-
readonly
|
|
121
|
-
}
|
|
122
|
-
readonly type:
|
|
123
|
-
readonly
|
|
124
|
-
|
|
125
|
-
readonly
|
|
126
|
-
|
|
127
|
-
readonly
|
|
128
|
-
readonly
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
readonly content: readonly
|
|
132
|
-
readonly type:
|
|
133
|
-
readonly text:
|
|
134
|
-
}
|
|
112
|
+
} | {
|
|
113
|
+
readonly type: "function_call";
|
|
114
|
+
readonly call_id: string;
|
|
115
|
+
readonly name: string;
|
|
116
|
+
readonly arguments: string;
|
|
117
|
+
} | {
|
|
118
|
+
readonly type: "function_call_output";
|
|
119
|
+
readonly call_id: string;
|
|
120
|
+
readonly output: string | readonly ({
|
|
121
|
+
readonly type: "input_image";
|
|
122
|
+
readonly image_url: string;
|
|
123
|
+
} | {
|
|
124
|
+
readonly type: "input_file";
|
|
125
|
+
readonly filename: string;
|
|
126
|
+
readonly file_data: string;
|
|
127
|
+
readonly mime_type?: string | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
readonly type: "input_text";
|
|
130
|
+
readonly text: string;
|
|
131
|
+
})[];
|
|
132
|
+
} | {
|
|
133
|
+
readonly content: readonly {
|
|
134
|
+
readonly type: "output_text";
|
|
135
|
+
readonly text: string;
|
|
136
|
+
}[];
|
|
135
137
|
readonly role: "assistant";
|
|
136
138
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
137
139
|
})[];
|
|
@@ -140,9 +142,10 @@ export declare const routes: (Route<{
|
|
|
140
142
|
readonly text?: {
|
|
141
143
|
readonly verbosity?: "low" | "medium" | "high" | undefined;
|
|
142
144
|
} | undefined;
|
|
145
|
+
readonly instructions?: string | undefined;
|
|
143
146
|
readonly reasoning?: {
|
|
144
|
-
readonly effort?: string | undefined;
|
|
145
147
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
148
|
+
readonly effort?: string | undefined;
|
|
146
149
|
} | undefined;
|
|
147
150
|
readonly tools?: readonly ({
|
|
148
151
|
readonly type: "function";
|
|
@@ -154,25 +157,24 @@ export declare const routes: (Route<{
|
|
|
154
157
|
readonly strict?: boolean | undefined;
|
|
155
158
|
} | {
|
|
156
159
|
readonly type: "image_generation";
|
|
157
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
158
160
|
readonly size?: string | undefined;
|
|
161
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
162
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
159
163
|
readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
|
|
160
164
|
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
161
165
|
readonly output_compression?: number | undefined;
|
|
162
|
-
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
163
166
|
readonly input_fidelity?: "low" | "high" | undefined;
|
|
164
167
|
readonly partial_images?: number | undefined;
|
|
165
168
|
})[] | undefined;
|
|
166
169
|
readonly temperature?: number | undefined;
|
|
167
|
-
readonly tool_choice?: "required" | "none" | "auto" |
|
|
168
|
-
readonly type:
|
|
169
|
-
readonly name:
|
|
170
|
-
}
|
|
171
|
-
readonly type:
|
|
172
|
-
}
|
|
170
|
+
readonly tool_choice?: "required" | "none" | "auto" | {
|
|
171
|
+
readonly type: "function";
|
|
172
|
+
readonly name: string;
|
|
173
|
+
} | {
|
|
174
|
+
readonly type: "image_generation";
|
|
175
|
+
} | undefined;
|
|
173
176
|
readonly top_p?: number | undefined;
|
|
174
177
|
readonly include?: readonly ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | undefined;
|
|
175
|
-
readonly instructions?: string | undefined;
|
|
176
178
|
readonly store?: boolean | undefined;
|
|
177
179
|
readonly service_tier?: "auto" | "default" | "flex" | "priority" | undefined;
|
|
178
180
|
readonly prompt_cache_key?: string | undefined;
|
|
@@ -180,64 +182,64 @@ export declare const routes: (Route<{
|
|
|
180
182
|
}, import("../route/transport/http").HttpPrepared<string>> | Route<{
|
|
181
183
|
readonly input: readonly ({
|
|
182
184
|
readonly type: "reasoning";
|
|
183
|
-
readonly summary: readonly
|
|
184
|
-
readonly type:
|
|
185
|
-
readonly text:
|
|
186
|
-
}
|
|
185
|
+
readonly summary: readonly {
|
|
186
|
+
readonly type: "summary_text";
|
|
187
|
+
readonly text: string;
|
|
188
|
+
}[];
|
|
187
189
|
readonly id?: string | undefined;
|
|
188
190
|
readonly encrypted_content?: string | null | undefined;
|
|
189
|
-
} |
|
|
190
|
-
readonly type:
|
|
191
|
-
readonly id:
|
|
192
|
-
}
|
|
193
|
-
readonly role:
|
|
194
|
-
readonly content:
|
|
195
|
-
}
|
|
196
|
-
readonly role:
|
|
197
|
-
readonly content:
|
|
198
|
-
readonly type:
|
|
199
|
-
readonly
|
|
200
|
-
}
|
|
201
|
-
readonly type:
|
|
202
|
-
readonly
|
|
203
|
-
|
|
204
|
-
readonly
|
|
205
|
-
|
|
206
|
-
readonly
|
|
207
|
-
readonly
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
readonly content: readonly
|
|
211
|
-
readonly type:
|
|
212
|
-
readonly text:
|
|
213
|
-
}
|
|
191
|
+
} | {
|
|
192
|
+
readonly type: "item_reference";
|
|
193
|
+
readonly id: string;
|
|
194
|
+
} | {
|
|
195
|
+
readonly role: "system";
|
|
196
|
+
readonly content: string;
|
|
197
|
+
} | {
|
|
198
|
+
readonly role: "user";
|
|
199
|
+
readonly content: readonly ({
|
|
200
|
+
readonly type: "input_image";
|
|
201
|
+
readonly image_url: string;
|
|
202
|
+
} | {
|
|
203
|
+
readonly type: "input_file";
|
|
204
|
+
readonly filename: string;
|
|
205
|
+
readonly file_data: string;
|
|
206
|
+
readonly mime_type?: string | undefined;
|
|
207
|
+
} | {
|
|
208
|
+
readonly type: "input_text";
|
|
209
|
+
readonly text: string;
|
|
210
|
+
})[];
|
|
211
|
+
} | {
|
|
212
|
+
readonly content: readonly {
|
|
213
|
+
readonly type: "output_text";
|
|
214
|
+
readonly text: string;
|
|
215
|
+
}[];
|
|
214
216
|
readonly role: "assistant";
|
|
215
217
|
readonly phase?: "commentary" | "final_answer" | undefined;
|
|
216
|
-
} |
|
|
217
|
-
readonly type:
|
|
218
|
-
readonly call_id:
|
|
219
|
-
readonly name:
|
|
220
|
-
readonly arguments:
|
|
221
|
-
}
|
|
222
|
-
readonly type:
|
|
223
|
-
readonly call_id:
|
|
224
|
-
readonly output:
|
|
225
|
-
readonly type:
|
|
226
|
-
readonly
|
|
227
|
-
}
|
|
228
|
-
readonly type:
|
|
229
|
-
readonly
|
|
230
|
-
|
|
231
|
-
readonly
|
|
232
|
-
|
|
233
|
-
readonly
|
|
234
|
-
readonly
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
readonly content: readonly
|
|
238
|
-
readonly type:
|
|
239
|
-
readonly text:
|
|
240
|
-
}
|
|
218
|
+
} | {
|
|
219
|
+
readonly type: "function_call";
|
|
220
|
+
readonly call_id: string;
|
|
221
|
+
readonly name: string;
|
|
222
|
+
readonly arguments: string;
|
|
223
|
+
} | {
|
|
224
|
+
readonly type: "function_call_output";
|
|
225
|
+
readonly call_id: string;
|
|
226
|
+
readonly output: string | readonly ({
|
|
227
|
+
readonly type: "input_image";
|
|
228
|
+
readonly image_url: string;
|
|
229
|
+
} | {
|
|
230
|
+
readonly type: "input_file";
|
|
231
|
+
readonly filename: string;
|
|
232
|
+
readonly file_data: string;
|
|
233
|
+
readonly mime_type?: string | undefined;
|
|
234
|
+
} | {
|
|
235
|
+
readonly type: "input_text";
|
|
236
|
+
readonly text: string;
|
|
237
|
+
})[];
|
|
238
|
+
} | {
|
|
239
|
+
readonly content: readonly {
|
|
240
|
+
readonly type: "output_text";
|
|
241
|
+
readonly text: string;
|
|
242
|
+
}[];
|
|
241
243
|
readonly role: "assistant";
|
|
242
244
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
243
245
|
})[];
|
|
@@ -246,9 +248,10 @@ export declare const routes: (Route<{
|
|
|
246
248
|
readonly text?: {
|
|
247
249
|
readonly verbosity?: "low" | "medium" | "high" | undefined;
|
|
248
250
|
} | undefined;
|
|
251
|
+
readonly instructions?: string | undefined;
|
|
249
252
|
readonly reasoning?: {
|
|
250
|
-
readonly effort?: string | undefined;
|
|
251
253
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
254
|
+
readonly effort?: string | undefined;
|
|
252
255
|
} | undefined;
|
|
253
256
|
readonly tools?: readonly ({
|
|
254
257
|
readonly type: "function";
|
|
@@ -260,25 +263,24 @@ export declare const routes: (Route<{
|
|
|
260
263
|
readonly strict?: boolean | undefined;
|
|
261
264
|
} | {
|
|
262
265
|
readonly type: "image_generation";
|
|
263
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
264
266
|
readonly size?: string | undefined;
|
|
267
|
+
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
268
|
+
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
265
269
|
readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
|
|
266
270
|
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
267
271
|
readonly output_compression?: number | undefined;
|
|
268
|
-
readonly action?: "generate" | "auto" | "edit" | undefined;
|
|
269
272
|
readonly input_fidelity?: "low" | "high" | undefined;
|
|
270
273
|
readonly partial_images?: number | undefined;
|
|
271
274
|
})[] | undefined;
|
|
272
275
|
readonly temperature?: number | undefined;
|
|
273
|
-
readonly tool_choice?: "required" | "none" | "auto" |
|
|
274
|
-
readonly type:
|
|
275
|
-
readonly name:
|
|
276
|
-
}
|
|
277
|
-
readonly type:
|
|
278
|
-
}
|
|
276
|
+
readonly tool_choice?: "required" | "none" | "auto" | {
|
|
277
|
+
readonly type: "function";
|
|
278
|
+
readonly name: string;
|
|
279
|
+
} | {
|
|
280
|
+
readonly type: "image_generation";
|
|
281
|
+
} | undefined;
|
|
279
282
|
readonly top_p?: number | undefined;
|
|
280
283
|
readonly include?: readonly ("file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs")[] | undefined;
|
|
281
|
-
readonly instructions?: string | undefined;
|
|
282
284
|
readonly store?: boolean | undefined;
|
|
283
285
|
readonly service_tier?: "auto" | "default" | "flex" | "priority" | undefined;
|
|
284
286
|
readonly prompt_cache_key?: string | undefined;
|