@opencode-ai/ai 0.0.0-beta-17639 → 0.0.0-beta-17728

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.
Files changed (72) hide show
  1. package/README.md +17 -6
  2. package/dist/cache-policy.js +3 -5
  3. package/dist/protocols/anthropic-messages.d.ts +26 -28
  4. package/dist/protocols/anthropic-messages.js +5 -5
  5. package/dist/protocols/gemini.d.ts +5 -9
  6. package/dist/protocols/gemini.js +5 -4
  7. package/dist/protocols/open-responses.d.ts +176 -38
  8. package/dist/protocols/open-responses.js +108 -33
  9. package/dist/protocols/openai-chat.d.ts +17 -15
  10. package/dist/protocols/openai-chat.js +8 -2
  11. package/dist/protocols/openai-compatible-chat.d.ts +3 -3
  12. package/dist/protocols/openai-compatible-responses.d.ts +27 -5
  13. package/dist/protocols/openai-responses.d.ts +151 -33
  14. package/dist/protocols/openai-responses.js +4 -2
  15. package/dist/protocols/shared.d.ts +8 -14
  16. package/dist/protocols/shared.js +8 -14
  17. package/dist/protocols/utils/bedrock-cache.js +3 -4
  18. package/dist/protocols/utils/cache.js +3 -6
  19. package/dist/protocols/utils/open-responses-options.d.ts +46 -15
  20. package/dist/protocols/utils/open-responses-options.js +38 -25
  21. package/dist/protocols/utils/openai-options.d.ts +7 -5
  22. package/dist/protocols/utils/openai-options.js +3 -3
  23. package/dist/provider-package.d.ts +0 -5
  24. package/dist/providers/amazon-bedrock-mantle.d.ts +43 -19
  25. package/dist/providers/amazon-bedrock-mantle.js +0 -1
  26. package/dist/providers/amazon-bedrock.d.ts +3 -9
  27. package/dist/providers/amazon-bedrock.js +0 -1
  28. package/dist/providers/anthropic-compatible.d.ts +11 -11
  29. package/dist/providers/anthropic-compatible.js +0 -1
  30. package/dist/providers/anthropic.d.ts +12 -12
  31. package/dist/providers/anthropic.js +0 -1
  32. package/dist/providers/azure.d.ts +40 -16
  33. package/dist/providers/azure.js +0 -1
  34. package/dist/providers/cloudflare.d.ts +11 -11
  35. package/dist/providers/google-vertex-chat.d.ts +5 -5
  36. package/dist/providers/google-vertex-chat.js +0 -1
  37. package/dist/providers/google-vertex-messages.d.ts +11 -11
  38. package/dist/providers/google-vertex-messages.js +0 -1
  39. package/dist/providers/google-vertex-responses.d.ts +29 -7
  40. package/dist/providers/google-vertex-responses.js +1 -2
  41. package/dist/providers/google-vertex.d.ts +5 -7
  42. package/dist/providers/google-vertex.js +1 -2
  43. package/dist/providers/google.d.ts +4 -4
  44. package/dist/providers/google.js +0 -1
  45. package/dist/providers/open-responses-options.d.ts +3 -14
  46. package/dist/providers/openai-compatible-responses.d.ts +29 -7
  47. package/dist/providers/openai-compatible-responses.js +0 -1
  48. package/dist/providers/openai-compatible.d.ts +13 -12
  49. package/dist/providers/openai-compatible.js +1 -1
  50. package/dist/providers/openai-options.d.ts +2 -4
  51. package/dist/providers/openai-options.js +3 -3
  52. package/dist/providers/openai.d.ts +44 -20
  53. package/dist/providers/openai.js +0 -1
  54. package/dist/providers/openrouter.d.ts +16 -17
  55. package/dist/providers/openrouter.js +1 -2
  56. package/dist/providers/xai.d.ts +46 -24
  57. package/dist/providers/xai.js +1 -2
  58. package/dist/route/client.d.ts +2 -6
  59. package/dist/route/client.js +1 -2
  60. package/dist/route/framing.d.ts +2 -2
  61. package/dist/route/protocol.d.ts +1 -2
  62. package/dist/route/protocol.js +1 -2
  63. package/dist/schema/errors.js +2 -1
  64. package/dist/schema/events.d.ts +5 -3
  65. package/dist/schema/events.js +5 -2
  66. package/dist/schema/ids.d.ts +0 -13
  67. package/dist/schema/ids.js +0 -9
  68. package/dist/schema/messages.d.ts +7 -7
  69. package/dist/schema/messages.js +5 -2
  70. package/dist/schema/options.d.ts +6 -22
  71. package/dist/schema/options.js +6 -30
  72. package/package.json +5 -5
@@ -84,7 +84,6 @@ export declare const routes: (RouteDef<{
84
84
  } | undefined;
85
85
  })[];
86
86
  readonly stream: true;
87
- readonly stop?: readonly string[] | undefined;
88
87
  readonly max_completion_tokens?: number | undefined;
89
88
  readonly max_tokens?: number | undefined;
90
89
  readonly tools?: readonly {
@@ -101,9 +100,10 @@ export declare const routes: (RouteDef<{
101
100
  readonly ttl?: string | undefined;
102
101
  } | undefined;
103
102
  }[] | undefined;
103
+ readonly stop?: readonly string[] | undefined;
104
104
  readonly temperature?: number | undefined;
105
105
  readonly seed?: number | undefined;
106
- readonly tool_choice?: "required" | "none" | "auto" | {
106
+ readonly tool_choice?: "required" | "auto" | "none" | {
107
107
  readonly type: "function";
108
108
  readonly function: {
109
109
  readonly name: string;
@@ -115,7 +115,7 @@ export declare const routes: (RouteDef<{
115
115
  readonly include_usage: boolean;
116
116
  } | undefined;
117
117
  readonly prompt_cache_key?: string | undefined;
118
- readonly reasoning_effort?: string | undefined;
118
+ readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
119
119
  readonly frequency_penalty?: number | undefined;
120
120
  readonly presence_penalty?: number | undefined;
121
121
  }, import("../route/transport/http.js").HttpPrepared<string>> | RouteDef<{
@@ -151,17 +151,20 @@ export declare const routes: (RouteDef<{
151
151
  readonly text: string;
152
152
  })[];
153
153
  } | {
154
+ readonly type: "message";
154
155
  readonly content: readonly {
155
156
  readonly type: "output_text";
156
157
  readonly text: string;
157
158
  }[];
158
159
  readonly role: "assistant";
160
+ readonly id?: string | undefined;
159
161
  readonly phase?: "commentary" | "final_answer" | undefined;
160
162
  } | {
161
163
  readonly type: "function_call";
162
- readonly call_id: string;
163
164
  readonly name: string;
164
165
  readonly arguments: string;
166
+ readonly call_id: string;
167
+ readonly id?: string | undefined;
165
168
  } | {
166
169
  readonly type: "function_call_output";
167
170
  readonly call_id: string;
@@ -178,19 +181,24 @@ export declare const routes: (RouteDef<{
178
181
  readonly text: string;
179
182
  })[];
180
183
  } | {
184
+ readonly type: "message";
181
185
  readonly content: readonly {
182
186
  readonly type: "output_text";
183
187
  readonly text: string;
184
188
  }[];
185
189
  readonly role: "assistant";
190
+ readonly id?: string | undefined;
186
191
  readonly phase?: "commentary" | "final_answer" | null | undefined;
187
192
  })[];
188
193
  readonly model: string;
189
194
  readonly stream: true;
195
+ readonly metadata?: {
196
+ readonly [x: string]: string;
197
+ } | undefined;
190
198
  readonly instructions?: string | undefined;
191
199
  readonly reasoning?: {
192
200
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
193
- readonly effort?: string | undefined;
201
+ readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
194
202
  } | undefined;
195
203
  readonly tools?: readonly ({
196
204
  readonly type: "function";
@@ -205,48 +213,64 @@ export declare const routes: (RouteDef<{
205
213
  readonly size?: string | undefined;
206
214
  readonly action?: "generate" | "auto" | "edit" | undefined;
207
215
  readonly output_format?: "png" | "jpeg" | "webp" | undefined;
208
- readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
216
+ readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
209
217
  readonly background?: "auto" | "opaque" | "transparent" | undefined;
210
218
  readonly output_compression?: number | undefined;
211
219
  readonly input_fidelity?: "low" | "high" | undefined;
212
220
  readonly partial_images?: number | undefined;
213
221
  })[] | undefined;
214
222
  readonly text?: {
215
- readonly verbosity?: "low" | "medium" | "high" | undefined;
223
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
216
224
  } | undefined;
217
225
  readonly temperature?: number | undefined;
218
- readonly tool_choice?: "required" | "none" | "auto" | {
226
+ readonly tool_choice?: "required" | "auto" | "none" | {
219
227
  readonly type: "function";
220
228
  readonly name: string;
229
+ } | {
230
+ readonly type: "allowed_tools";
231
+ readonly mode: "required" | "auto" | "none";
232
+ readonly tools: readonly {
233
+ readonly type: "function";
234
+ readonly name: string;
235
+ }[];
221
236
  } | {
222
237
  readonly type: "image_generation";
223
238
  } | undefined;
224
239
  readonly top_p?: number | undefined;
225
- 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;
226
240
  readonly store?: boolean | undefined;
241
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
227
242
  readonly truncation?: "auto" | "disabled" | undefined;
243
+ readonly stream_options?: {
244
+ readonly include_obfuscation?: boolean | undefined;
245
+ } | undefined;
228
246
  readonly prompt_cache_key?: string | undefined;
247
+ readonly frequency_penalty?: number | undefined;
248
+ readonly presence_penalty?: number | undefined;
249
+ readonly safety_identifier?: string | undefined;
250
+ readonly top_logprobs?: number | undefined;
229
251
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
230
252
  readonly max_output_tokens?: number | undefined;
253
+ readonly max_tool_calls?: number | undefined;
254
+ readonly parallel_tool_calls?: boolean | undefined;
231
255
  }, import("../protocols/open-responses-channel.js").Prepared>)[];
232
256
  export declare const configure: (input: Config) => {
233
257
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
234
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
235
- responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
236
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
258
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
259
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
260
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
237
261
  configure: (input: Config) => /*elided*/ any;
238
262
  };
239
263
  export declare const provider: {
240
264
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
241
265
  configure: (input: Config) => {
242
266
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
243
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
244
- responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
245
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
267
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
268
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
269
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
246
270
  configure: /*elided*/ any;
247
271
  };
248
272
  };
249
273
  export declare const responsesModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
250
274
  export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
251
- export declare const model: (modelID: string, settings: Settings) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
275
+ export declare const model: (modelID: string, settings: Settings) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
252
276
  export {};
@@ -74,7 +74,6 @@ const config = (settings) => {
74
74
  apiVersion: settings.apiVersion,
75
75
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
76
76
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
77
- limits: settings.limits,
78
77
  providerOptions: settings.providerOptions,
79
78
  queryParams: settings.queryParams === undefined ? undefined : { ...settings.queryParams },
80
79
  useDeploymentBasedUrls: settings.useDeploymentBasedUrls,
@@ -90,7 +90,6 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
90
90
  } | undefined;
91
91
  })[];
92
92
  readonly stream: true;
93
- readonly stop?: readonly string[] | undefined;
94
93
  readonly max_completion_tokens?: number | undefined;
95
94
  readonly max_tokens?: number | undefined;
96
95
  readonly tools?: readonly {
@@ -107,9 +106,10 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
107
106
  readonly ttl?: string | undefined;
108
107
  } | undefined;
109
108
  }[] | undefined;
109
+ readonly stop?: readonly string[] | undefined;
110
110
  readonly temperature?: number | undefined;
111
111
  readonly seed?: number | undefined;
112
- readonly tool_choice?: "required" | "none" | "auto" | {
112
+ readonly tool_choice?: "required" | "auto" | "none" | {
113
113
  readonly type: "function";
114
114
  readonly function: {
115
115
  readonly name: string;
@@ -121,7 +121,7 @@ export declare const aiGatewayRoute: import("../route/client.js").Route<{
121
121
  readonly include_usage: boolean;
122
122
  } | undefined;
123
123
  readonly prompt_cache_key?: string | undefined;
124
- readonly reasoning_effort?: string | undefined;
124
+ readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
125
125
  readonly frequency_penalty?: number | undefined;
126
126
  readonly presence_penalty?: number | undefined;
127
127
  }, import("../route/transport/http.js").HttpPrepared<string>>;
@@ -187,7 +187,6 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
187
187
  } | undefined;
188
188
  })[];
189
189
  readonly stream: true;
190
- readonly stop?: readonly string[] | undefined;
191
190
  readonly max_completion_tokens?: number | undefined;
192
191
  readonly max_tokens?: number | undefined;
193
192
  readonly tools?: readonly {
@@ -204,9 +203,10 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
204
203
  readonly ttl?: string | undefined;
205
204
  } | undefined;
206
205
  }[] | undefined;
206
+ readonly stop?: readonly string[] | undefined;
207
207
  readonly temperature?: number | undefined;
208
208
  readonly seed?: number | undefined;
209
- readonly tool_choice?: "required" | "none" | "auto" | {
209
+ readonly tool_choice?: "required" | "auto" | "none" | {
210
210
  readonly type: "function";
211
211
  readonly function: {
212
212
  readonly name: string;
@@ -218,7 +218,7 @@ export declare const workersAIRoute: import("../route/client.js").Route<{
218
218
  readonly include_usage: boolean;
219
219
  } | undefined;
220
220
  readonly prompt_cache_key?: string | undefined;
221
- readonly reasoning_effort?: string | undefined;
221
+ readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
222
222
  readonly frequency_penalty?: number | undefined;
223
223
  readonly presence_penalty?: number | undefined;
224
224
  }, import("../route/transport/http.js").HttpPrepared<string>>;
@@ -284,7 +284,6 @@ export declare const routes: import("../route/client.js").Route<{
284
284
  } | undefined;
285
285
  })[];
286
286
  readonly stream: true;
287
- readonly stop?: readonly string[] | undefined;
288
287
  readonly max_completion_tokens?: number | undefined;
289
288
  readonly max_tokens?: number | undefined;
290
289
  readonly tools?: readonly {
@@ -301,9 +300,10 @@ export declare const routes: import("../route/client.js").Route<{
301
300
  readonly ttl?: string | undefined;
302
301
  } | undefined;
303
302
  }[] | undefined;
303
+ readonly stop?: readonly string[] | undefined;
304
304
  readonly temperature?: number | undefined;
305
305
  readonly seed?: number | undefined;
306
- readonly tool_choice?: "required" | "none" | "auto" | {
306
+ readonly tool_choice?: "required" | "auto" | "none" | {
307
307
  readonly type: "function";
308
308
  readonly function: {
309
309
  readonly name: string;
@@ -315,7 +315,7 @@ export declare const routes: import("../route/client.js").Route<{
315
315
  readonly include_usage: boolean;
316
316
  } | undefined;
317
317
  readonly prompt_cache_key?: string | undefined;
318
- readonly reasoning_effort?: string | undefined;
318
+ readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
319
319
  readonly frequency_penalty?: number | undefined;
320
320
  readonly presence_penalty?: number | undefined;
321
321
  }, import("../route/transport/http.js").HttpPrepared<string>>[];
@@ -323,7 +323,7 @@ export declare const CloudflareAIGateway: {
323
323
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
324
324
  configure: (options: AIGatewayOptions) => {
325
325
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
326
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
326
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
327
327
  configure: /*elided*/ any;
328
328
  };
329
329
  };
@@ -331,7 +331,7 @@ export declare const CloudflareWorkersAI: {
331
331
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
332
332
  configure: (options: WorkersAIOptions) => {
333
333
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
334
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
334
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
335
335
  configure: /*elided*/ any;
336
336
  };
337
337
  };
@@ -80,7 +80,6 @@ export declare const routes: import("../route/client.js").Route<{
80
80
  } | undefined;
81
81
  })[];
82
82
  readonly stream: true;
83
- readonly stop?: readonly string[] | undefined;
84
83
  readonly max_completion_tokens?: number | undefined;
85
84
  readonly max_tokens?: number | undefined;
86
85
  readonly tools?: readonly {
@@ -97,9 +96,10 @@ export declare const routes: import("../route/client.js").Route<{
97
96
  readonly ttl?: string | undefined;
98
97
  } | undefined;
99
98
  }[] | undefined;
99
+ readonly stop?: readonly string[] | undefined;
100
100
  readonly temperature?: number | undefined;
101
101
  readonly seed?: number | undefined;
102
- readonly tool_choice?: "required" | "none" | "auto" | {
102
+ readonly tool_choice?: "required" | "auto" | "none" | {
103
103
  readonly type: "function";
104
104
  readonly function: {
105
105
  readonly name: string;
@@ -111,20 +111,20 @@ export declare const routes: import("../route/client.js").Route<{
111
111
  readonly include_usage: boolean;
112
112
  } | undefined;
113
113
  readonly prompt_cache_key?: string | undefined;
114
- readonly reasoning_effort?: string | undefined;
114
+ readonly reasoning_effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
115
115
  readonly frequency_penalty?: number | undefined;
116
116
  readonly presence_penalty?: number | undefined;
117
117
  }, import("../route/transport/http.js").HttpPrepared<string>>[];
118
118
  export declare const configure: (input?: Config) => {
119
119
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
120
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
120
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
121
121
  configure: (input?: Config) => /*elided*/ any;
122
122
  };
123
123
  export declare const provider: {
124
124
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
125
125
  configure: (input?: Config) => {
126
126
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
127
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
127
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
128
128
  configure: /*elided*/ any;
129
129
  };
130
130
  };
@@ -42,7 +42,6 @@ export const model = (modelID, settings) => {
42
42
  baseURL: settings.baseURL,
43
43
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
44
44
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
45
- limits: settings.limits,
46
45
  location: settings.location,
47
46
  project: settings.project,
48
47
  providerOptions: settings.providerOptions,
@@ -23,14 +23,6 @@ export interface Settings extends ProviderPackage.Settings {
23
23
  }
24
24
  export declare const routes: Route<{
25
25
  anthropic_version: "vertex-2023-10-16";
26
- system?: readonly {
27
- readonly type: "text";
28
- readonly text: string;
29
- readonly cache_control?: {
30
- readonly type: "ephemeral";
31
- readonly ttl?: "1h" | "5m" | undefined;
32
- } | undefined;
33
- }[] | undefined;
34
26
  max_tokens: number;
35
27
  tools?: readonly {
36
28
  readonly description: string;
@@ -43,6 +35,14 @@ export declare const routes: Route<{
43
35
  readonly ttl?: "1h" | "5m" | undefined;
44
36
  } | undefined;
45
37
  }[] | undefined;
38
+ system?: readonly {
39
+ readonly type: "text";
40
+ readonly text: string;
41
+ readonly cache_control?: {
42
+ readonly type: "ephemeral";
43
+ readonly ttl?: "1h" | "5m" | undefined;
44
+ } | undefined;
45
+ }[] | undefined;
46
46
  messages: readonly ({
47
47
  readonly role: "user";
48
48
  readonly content: readonly ({
@@ -187,7 +187,7 @@ export declare const routes: Route<{
187
187
  readonly type: "disabled";
188
188
  } | undefined;
189
189
  tool_choice?: {
190
- readonly type: "none" | "auto" | "any";
190
+ readonly type: "auto" | "none" | "any";
191
191
  } | {
192
192
  readonly type: "tool";
193
193
  readonly name: string;
@@ -201,14 +201,14 @@ export declare const routes: Route<{
201
201
  }, import("../route/transport/http.js").HttpPrepared<string>>[];
202
202
  export declare const configure: (input?: Config) => {
203
203
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
204
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
204
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
205
205
  configure: (input?: Config) => /*elided*/ any;
206
206
  };
207
207
  export declare const provider: {
208
208
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
209
209
  configure: (input?: Config) => {
210
210
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
211
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
211
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.OptionsInput>;
212
212
  configure: /*elided*/ any;
213
213
  };
214
214
  };
@@ -67,7 +67,6 @@ export const model = (modelID, settings) => {
67
67
  baseURL: settings.baseURL,
68
68
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
69
69
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
70
- limits: settings.limits,
71
70
  location: settings.location,
72
71
  project: settings.project,
73
72
  providerOptions: settings.providerOptions,
@@ -51,17 +51,20 @@ export declare const routes: import("../route/client.js").Route<{
51
51
  readonly text: string;
52
52
  })[];
53
53
  } | {
54
+ readonly type: "message";
54
55
  readonly content: readonly {
55
56
  readonly type: "output_text";
56
57
  readonly text: string;
57
58
  }[];
58
59
  readonly role: "assistant";
60
+ readonly id?: string | undefined;
59
61
  readonly phase?: "commentary" | "final_answer" | undefined;
60
62
  } | {
61
63
  readonly type: "function_call";
62
- readonly call_id: string;
63
64
  readonly name: string;
64
65
  readonly arguments: string;
66
+ readonly call_id: string;
67
+ readonly id?: string | undefined;
65
68
  } | {
66
69
  readonly type: "function_call_output";
67
70
  readonly call_id: string;
@@ -80,10 +83,13 @@ export declare const routes: import("../route/client.js").Route<{
80
83
  })[];
81
84
  readonly model: string;
82
85
  readonly stream: true;
86
+ readonly metadata?: {
87
+ readonly [x: string]: string;
88
+ } | undefined;
83
89
  readonly instructions?: string | undefined;
84
90
  readonly reasoning?: {
85
91
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
86
- readonly effort?: string | undefined;
92
+ readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
87
93
  } | undefined;
88
94
  readonly tools?: readonly {
89
95
  readonly type: "function";
@@ -95,31 +101,47 @@ export declare const routes: import("../route/client.js").Route<{
95
101
  readonly strict?: boolean | undefined;
96
102
  }[] | undefined;
97
103
  readonly text?: {
98
- readonly verbosity?: "low" | "medium" | "high" | undefined;
104
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
99
105
  } | undefined;
100
106
  readonly temperature?: number | undefined;
101
- readonly tool_choice?: "required" | "none" | "auto" | {
107
+ readonly tool_choice?: "required" | "auto" | "none" | {
102
108
  readonly type: "function";
103
109
  readonly name: string;
110
+ } | {
111
+ readonly type: "allowed_tools";
112
+ readonly mode: "required" | "auto" | "none";
113
+ readonly tools: readonly {
114
+ readonly type: "function";
115
+ readonly name: string;
116
+ }[];
104
117
  } | undefined;
105
118
  readonly top_p?: number | undefined;
106
- 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;
107
119
  readonly store?: boolean | undefined;
120
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
108
121
  readonly truncation?: "auto" | "disabled" | undefined;
122
+ readonly stream_options?: {
123
+ readonly include_obfuscation?: boolean | undefined;
124
+ } | undefined;
109
125
  readonly prompt_cache_key?: string | undefined;
126
+ readonly frequency_penalty?: number | undefined;
127
+ readonly presence_penalty?: number | undefined;
128
+ readonly safety_identifier?: string | undefined;
129
+ readonly top_logprobs?: number | undefined;
110
130
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
111
131
  readonly max_output_tokens?: number | undefined;
132
+ readonly max_tool_calls?: number | undefined;
133
+ readonly parallel_tool_calls?: boolean | undefined;
112
134
  }, import("../route/transport/http.js").HttpPrepared<string>>[];
113
135
  export declare const configure: (input?: Config) => {
114
136
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
115
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenResponsesProviderOptionsInput>;
137
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
116
138
  configure: (input?: Config) => /*elided*/ any;
117
139
  };
118
140
  export declare const provider: {
119
141
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
120
142
  configure: (input?: Config) => {
121
143
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
122
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenResponsesProviderOptionsInput>;
144
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput>;
123
145
  configure: /*elided*/ any;
124
146
  };
125
147
  };
@@ -5,7 +5,7 @@ export const id = ProviderID.make("google-vertex");
5
5
  const route = OpenAICompatibleResponses.route.with({
6
6
  id: "google-vertex-responses",
7
7
  provider: id,
8
- providerOptions: { openresponses: { store: false } },
8
+ providerOptions: { store: false },
9
9
  });
10
10
  export const routes = [route];
11
11
  const configuredRoute = (input) => {
@@ -43,7 +43,6 @@ export const model = (modelID, settings) => {
43
43
  baseURL: settings.baseURL,
44
44
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
45
45
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
46
- limits: settings.limits,
47
46
  location: settings.location,
48
47
  project: settings.project,
49
48
  providerOptions: settings.providerOptions,
@@ -1,14 +1,12 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { Gemini } from "../protocols/gemini.js";
3
3
  import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID, type ProviderOptions } from "../schema/index.js";
4
+ import { type ModelID } from "../schema/index.js";
5
5
  import { GoogleVertexShared } from "./google-vertex-shared.js";
6
6
  export interface GeminiOptionsInput extends Gemini.OptionsInput {
7
7
  readonly labels?: Readonly<Record<string, string>>;
8
8
  }
9
- export type GeminiProviderOptionsInput = ProviderOptions & {
10
- readonly gemini?: GeminiOptionsInput;
11
- };
9
+ export type GeminiProviderOptionsInput = GeminiOptionsInput;
12
10
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
13
11
  export type Config = RouteDefaultsInput & GoogleVertexShared.ApiKeyOptions & {
14
12
  readonly baseURL?: string;
@@ -30,7 +28,7 @@ export type Settings = ProviderPackage.Settings & ({
30
28
  };
31
29
  export declare const routes: Route<{
32
30
  readonly contents: readonly {
33
- readonly role: "user" | "model";
31
+ readonly role: "model" | "user";
34
32
  readonly parts: readonly ({
35
33
  readonly inlineData: {
36
34
  readonly mimeType: string;
@@ -108,14 +106,14 @@ export declare const routes: Route<{
108
106
  }, import("../route/transport/http.js").HttpPrepared<string>>[];
109
107
  export declare const configure: (input?: Config) => {
110
108
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
111
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<GeminiProviderOptionsInput>;
109
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<GeminiOptionsInput>;
112
110
  configure: (input?: Config) => /*elided*/ any;
113
111
  };
114
112
  export declare const provider: {
115
113
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
116
114
  configure: (input?: Config) => {
117
115
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
118
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<GeminiProviderOptionsInput>;
116
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<GeminiOptionsInput>;
119
117
  configure: /*elided*/ any;
120
118
  };
121
119
  };
@@ -10,7 +10,7 @@ import { GoogleVertexShared } from "./google-vertex-shared.js";
10
10
  export const id = ProviderID.make("google-vertex");
11
11
  const fromRequest = Effect.fn("GoogleVertex.fromRequest")(function* (request) {
12
12
  const body = yield* Gemini.protocol.body.from(request);
13
- const value = request.providerOptions?.gemini?.labels;
13
+ const value = request.providerOptions?.labels;
14
14
  const labels = ProviderShared.isRecord(value)
15
15
  ? Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"))
16
16
  : undefined;
@@ -73,7 +73,6 @@ export const model = (modelID, settings) => {
73
73
  baseURL: settings.baseURL,
74
74
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
75
75
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
76
- limits: settings.limits,
77
76
  location: settings.location,
78
77
  project: settings.project,
79
78
  providerOptions: settings.providerOptions,
@@ -9,7 +9,7 @@ export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
9
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
10
10
  export declare const routes: import("../route/client.js").Route<{
11
11
  readonly contents: readonly {
12
- readonly role: "user" | "model";
12
+ readonly role: "model" | "user";
13
13
  readonly parts: readonly ({
14
14
  readonly inlineData: {
15
15
  readonly mimeType: string;
@@ -96,17 +96,17 @@ export interface Settings extends ProviderPackage.Settings {
96
96
  }
97
97
  export declare const configure: (input?: Config) => {
98
98
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
99
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
99
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput>;
100
100
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
101
101
  configure: (input?: Config) => /*elided*/ any;
102
102
  };
103
103
  export declare const provider: {
104
104
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
105
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
105
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput>;
106
106
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
107
107
  configure: (input?: Config) => {
108
108
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
109
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
109
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput>;
110
110
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
111
111
  configure: /*elided*/ any;
112
112
  };
@@ -37,7 +37,6 @@ export const model = (modelID, settings) => configure({
37
37
  baseURL: settings.baseURL,
38
38
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
39
39
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
40
- limits: settings.limits,
41
40
  providerOptions: settings.providerOptions,
42
41
  }).model(modelID);
43
42
  export const image = provider.image;
@@ -1,17 +1,6 @@
1
- import type { ResponseIncludable, ServiceTier, Truncation } from "../protocols/utils/open-responses-options.js";
2
- import type { ProviderOptions, ReasoningEffort, TextVerbosity } from "../schema/index.js";
3
- export interface OpenResponsesOptionsInput {
1
+ import type { Options } from "../protocols/utils/open-responses-options.js";
2
+ export type OpenResponsesOptionsInput = Options & {
4
3
  readonly [key: string]: unknown;
5
- readonly instructions?: string;
6
- readonly store?: boolean;
7
- readonly reasoningEffort?: ReasoningEffort;
8
- readonly reasoningSummary?: "auto" | "concise" | "detailed";
9
- readonly include?: ReadonlyArray<ResponseIncludable>;
10
- readonly textVerbosity?: TextVerbosity;
11
- readonly serviceTier?: ServiceTier;
12
- readonly truncation?: Truncation;
13
- }
14
- export type OpenResponsesProviderOptionsInput = ProviderOptions & {
15
- readonly openresponses?: OpenResponsesOptionsInput;
16
4
  };
5
+ export type OpenResponsesProviderOptionsInput = OpenResponsesOptionsInput;
17
6
  export * as OpenResponsesProviderOptions from "./open-responses-options.js";