@opencode-ai/ai 0.0.0-next-16255 → 0.0.0-next-16273
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
|
@@ -84,45 +84,47 @@ export type GeminiBody = Schema.Schema.Type<typeof GeminiBody>;
|
|
|
84
84
|
* registered) Vertex Gemini.
|
|
85
85
|
*/
|
|
86
86
|
export declare const protocol: Protocol<{
|
|
87
|
-
readonly contents: readonly
|
|
88
|
-
readonly role:
|
|
89
|
-
readonly parts:
|
|
90
|
-
readonly
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
readonly functionCall:
|
|
100
|
-
readonly
|
|
101
|
-
readonly
|
|
102
|
-
readonly
|
|
103
|
-
}
|
|
104
|
-
readonly thoughtSignature
|
|
105
|
-
}
|
|
106
|
-
readonly functionResponse:
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly parts
|
|
111
|
-
readonly inlineData:
|
|
112
|
-
readonly mimeType:
|
|
113
|
-
readonly data:
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
readonly tools?: readonly
|
|
120
|
-
readonly functionDeclarations:
|
|
121
|
-
readonly name:
|
|
122
|
-
readonly description:
|
|
123
|
-
readonly parameters
|
|
124
|
-
|
|
125
|
-
|
|
87
|
+
readonly contents: readonly {
|
|
88
|
+
readonly role: "user" | "model";
|
|
89
|
+
readonly parts: readonly ({
|
|
90
|
+
readonly inlineData: {
|
|
91
|
+
readonly mimeType: string;
|
|
92
|
+
readonly data: string;
|
|
93
|
+
};
|
|
94
|
+
} | {
|
|
95
|
+
readonly text: string;
|
|
96
|
+
readonly thought?: boolean | undefined;
|
|
97
|
+
readonly thoughtSignature?: string | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
readonly functionCall: {
|
|
100
|
+
readonly name: string;
|
|
101
|
+
readonly args: unknown;
|
|
102
|
+
readonly id?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
readonly thoughtSignature?: string | undefined;
|
|
105
|
+
} | {
|
|
106
|
+
readonly functionResponse: {
|
|
107
|
+
readonly name: string;
|
|
108
|
+
readonly response: unknown;
|
|
109
|
+
readonly id?: string | undefined;
|
|
110
|
+
readonly parts?: readonly {
|
|
111
|
+
readonly inlineData: {
|
|
112
|
+
readonly mimeType: string;
|
|
113
|
+
readonly data: string;
|
|
114
|
+
};
|
|
115
|
+
}[] | undefined;
|
|
116
|
+
};
|
|
117
|
+
})[];
|
|
118
|
+
}[];
|
|
119
|
+
readonly tools?: readonly {
|
|
120
|
+
readonly functionDeclarations: readonly {
|
|
121
|
+
readonly name: string;
|
|
122
|
+
readonly description: string;
|
|
123
|
+
readonly parameters?: {
|
|
124
|
+
readonly [x: string]: unknown;
|
|
125
|
+
} | undefined;
|
|
126
|
+
}[];
|
|
127
|
+
}[] | undefined;
|
|
126
128
|
readonly generationConfig?: {
|
|
127
129
|
readonly temperature?: number | undefined;
|
|
128
130
|
readonly topP?: number | undefined;
|
|
@@ -134,51 +136,51 @@ export declare const protocol: Protocol<{
|
|
|
134
136
|
} | undefined;
|
|
135
137
|
readonly maxOutputTokens?: number | undefined;
|
|
136
138
|
} | undefined;
|
|
137
|
-
readonly systemInstruction?:
|
|
138
|
-
readonly parts:
|
|
139
|
-
readonly text:
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
readonly toolConfig?:
|
|
143
|
-
readonly functionCallingConfig:
|
|
144
|
-
readonly mode:
|
|
145
|
-
readonly allowedFunctionNames
|
|
146
|
-
}
|
|
147
|
-
}
|
|
139
|
+
readonly systemInstruction?: {
|
|
140
|
+
readonly parts: readonly {
|
|
141
|
+
readonly text: string;
|
|
142
|
+
}[];
|
|
143
|
+
} | undefined;
|
|
144
|
+
readonly toolConfig?: {
|
|
145
|
+
readonly functionCallingConfig: {
|
|
146
|
+
readonly mode: "AUTO" | "NONE" | "ANY";
|
|
147
|
+
readonly allowedFunctionNames?: readonly string[] | undefined;
|
|
148
|
+
};
|
|
149
|
+
} | undefined;
|
|
148
150
|
}, string, {
|
|
149
151
|
readonly candidates?: readonly {
|
|
150
|
-
readonly content?:
|
|
151
|
-
readonly role:
|
|
152
|
-
readonly parts:
|
|
153
|
-
readonly
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
readonly functionCall:
|
|
163
|
-
readonly
|
|
164
|
-
readonly
|
|
165
|
-
readonly
|
|
166
|
-
}
|
|
167
|
-
readonly thoughtSignature
|
|
168
|
-
}
|
|
169
|
-
readonly functionResponse:
|
|
170
|
-
readonly
|
|
171
|
-
readonly
|
|
172
|
-
readonly
|
|
173
|
-
readonly parts
|
|
174
|
-
readonly inlineData:
|
|
175
|
-
readonly mimeType:
|
|
176
|
-
readonly data:
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
152
|
+
readonly content?: {
|
|
153
|
+
readonly role: "user" | "model";
|
|
154
|
+
readonly parts: readonly ({
|
|
155
|
+
readonly inlineData: {
|
|
156
|
+
readonly mimeType: string;
|
|
157
|
+
readonly data: string;
|
|
158
|
+
};
|
|
159
|
+
} | {
|
|
160
|
+
readonly text: string;
|
|
161
|
+
readonly thought?: boolean | undefined;
|
|
162
|
+
readonly thoughtSignature?: string | undefined;
|
|
163
|
+
} | {
|
|
164
|
+
readonly functionCall: {
|
|
165
|
+
readonly name: string;
|
|
166
|
+
readonly args: unknown;
|
|
167
|
+
readonly id?: string | undefined;
|
|
168
|
+
};
|
|
169
|
+
readonly thoughtSignature?: string | undefined;
|
|
170
|
+
} | {
|
|
171
|
+
readonly functionResponse: {
|
|
172
|
+
readonly name: string;
|
|
173
|
+
readonly response: unknown;
|
|
174
|
+
readonly id?: string | undefined;
|
|
175
|
+
readonly parts?: readonly {
|
|
176
|
+
readonly inlineData: {
|
|
177
|
+
readonly mimeType: string;
|
|
178
|
+
readonly data: string;
|
|
179
|
+
};
|
|
180
|
+
}[] | undefined;
|
|
181
|
+
};
|
|
182
|
+
})[];
|
|
183
|
+
} | undefined;
|
|
182
184
|
readonly finishReason?: string | undefined;
|
|
183
185
|
}[] | undefined;
|
|
184
186
|
readonly usageMetadata?: {
|
|
@@ -194,45 +196,47 @@ export declare const protocol: Protocol<{
|
|
|
194
196
|
lifecycle: Lifecycle.State;
|
|
195
197
|
}>;
|
|
196
198
|
export declare const route: Route<{
|
|
197
|
-
readonly contents: readonly
|
|
198
|
-
readonly role:
|
|
199
|
-
readonly parts:
|
|
200
|
-
readonly
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
readonly functionCall:
|
|
210
|
-
readonly
|
|
211
|
-
readonly
|
|
212
|
-
readonly
|
|
213
|
-
}
|
|
214
|
-
readonly thoughtSignature
|
|
215
|
-
}
|
|
216
|
-
readonly functionResponse:
|
|
217
|
-
readonly
|
|
218
|
-
readonly
|
|
219
|
-
readonly
|
|
220
|
-
readonly parts
|
|
221
|
-
readonly inlineData:
|
|
222
|
-
readonly mimeType:
|
|
223
|
-
readonly data:
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
readonly tools?: readonly
|
|
230
|
-
readonly functionDeclarations:
|
|
231
|
-
readonly name:
|
|
232
|
-
readonly description:
|
|
233
|
-
readonly parameters
|
|
234
|
-
|
|
235
|
-
|
|
199
|
+
readonly contents: readonly {
|
|
200
|
+
readonly role: "user" | "model";
|
|
201
|
+
readonly parts: readonly ({
|
|
202
|
+
readonly inlineData: {
|
|
203
|
+
readonly mimeType: string;
|
|
204
|
+
readonly data: string;
|
|
205
|
+
};
|
|
206
|
+
} | {
|
|
207
|
+
readonly text: string;
|
|
208
|
+
readonly thought?: boolean | undefined;
|
|
209
|
+
readonly thoughtSignature?: string | undefined;
|
|
210
|
+
} | {
|
|
211
|
+
readonly functionCall: {
|
|
212
|
+
readonly name: string;
|
|
213
|
+
readonly args: unknown;
|
|
214
|
+
readonly id?: string | undefined;
|
|
215
|
+
};
|
|
216
|
+
readonly thoughtSignature?: string | undefined;
|
|
217
|
+
} | {
|
|
218
|
+
readonly functionResponse: {
|
|
219
|
+
readonly name: string;
|
|
220
|
+
readonly response: unknown;
|
|
221
|
+
readonly id?: string | undefined;
|
|
222
|
+
readonly parts?: readonly {
|
|
223
|
+
readonly inlineData: {
|
|
224
|
+
readonly mimeType: string;
|
|
225
|
+
readonly data: string;
|
|
226
|
+
};
|
|
227
|
+
}[] | undefined;
|
|
228
|
+
};
|
|
229
|
+
})[];
|
|
230
|
+
}[];
|
|
231
|
+
readonly tools?: readonly {
|
|
232
|
+
readonly functionDeclarations: readonly {
|
|
233
|
+
readonly name: string;
|
|
234
|
+
readonly description: string;
|
|
235
|
+
readonly parameters?: {
|
|
236
|
+
readonly [x: string]: unknown;
|
|
237
|
+
} | undefined;
|
|
238
|
+
}[];
|
|
239
|
+
}[] | undefined;
|
|
236
240
|
readonly generationConfig?: {
|
|
237
241
|
readonly temperature?: number | undefined;
|
|
238
242
|
readonly topP?: number | undefined;
|
|
@@ -244,16 +248,16 @@ export declare const route: Route<{
|
|
|
244
248
|
} | undefined;
|
|
245
249
|
readonly maxOutputTokens?: number | undefined;
|
|
246
250
|
} | undefined;
|
|
247
|
-
readonly systemInstruction?:
|
|
248
|
-
readonly parts:
|
|
249
|
-
readonly text:
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
readonly toolConfig?:
|
|
253
|
-
readonly functionCallingConfig:
|
|
254
|
-
readonly mode:
|
|
255
|
-
readonly allowedFunctionNames
|
|
256
|
-
}
|
|
257
|
-
}
|
|
251
|
+
readonly systemInstruction?: {
|
|
252
|
+
readonly parts: readonly {
|
|
253
|
+
readonly text: string;
|
|
254
|
+
}[];
|
|
255
|
+
} | undefined;
|
|
256
|
+
readonly toolConfig?: {
|
|
257
|
+
readonly functionCallingConfig: {
|
|
258
|
+
readonly mode: "AUTO" | "NONE" | "ANY";
|
|
259
|
+
readonly allowedFunctionNames?: readonly string[] | undefined;
|
|
260
|
+
};
|
|
261
|
+
} | undefined;
|
|
258
262
|
}, import("../route/transport/http").HttpPrepared<string>>;
|
|
259
263
|
export * as Gemini from "./gemini";
|