@opencode-ai/ai 0.0.0-beta-17595 → 0.0.0-beta-17727

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 (74) 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 +21 -9
  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 +200 -38
  8. package/dist/protocols/open-responses.js +115 -42
  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 +31 -5
  13. package/dist/protocols/openai-responses.d.ts +171 -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 +49 -14
  20. package/dist/protocols/utils/open-responses-options.js +40 -22
  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 +47 -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 +44 -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 +33 -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 -13
  46. package/dist/providers/openai-compatible-responses.d.ts +33 -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 +48 -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 +50 -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/dist/testing.d.ts +2 -1
  73. package/dist/testing.js +7 -2
  74. package/package.json +5 -5
@@ -34,7 +34,6 @@ export const model = (modelID, settings) => {
34
34
  baseURL: settings.baseURL,
35
35
  headers: settings.headers === undefined ? undefined : { ...settings.headers },
36
36
  http: settings.body === undefined ? undefined : { body: { ...settings.body } },
37
- limits: settings.limits,
38
37
  providerOptions: settings.providerOptions,
39
38
  }).model(modelID);
40
39
  };
@@ -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<{
@@ -133,6 +133,9 @@ export declare const routes: (RouteDef<{
133
133
  } | {
134
134
  readonly role: "system";
135
135
  readonly content: string;
136
+ } | {
137
+ readonly role: "developer";
138
+ readonly content: string;
136
139
  } | {
137
140
  readonly role: "user";
138
141
  readonly content: readonly ({
@@ -148,17 +151,20 @@ export declare const routes: (RouteDef<{
148
151
  readonly text: string;
149
152
  })[];
150
153
  } | {
154
+ readonly type: "message";
151
155
  readonly content: readonly {
152
156
  readonly type: "output_text";
153
157
  readonly text: string;
154
158
  }[];
155
159
  readonly role: "assistant";
160
+ readonly id?: string | undefined;
156
161
  readonly phase?: "commentary" | "final_answer" | undefined;
157
162
  } | {
158
163
  readonly type: "function_call";
159
- readonly call_id: string;
160
164
  readonly name: string;
161
165
  readonly arguments: string;
166
+ readonly call_id: string;
167
+ readonly id?: string | undefined;
162
168
  } | {
163
169
  readonly type: "function_call_output";
164
170
  readonly call_id: string;
@@ -175,19 +181,24 @@ export declare const routes: (RouteDef<{
175
181
  readonly text: string;
176
182
  })[];
177
183
  } | {
184
+ readonly type: "message";
178
185
  readonly content: readonly {
179
186
  readonly type: "output_text";
180
187
  readonly text: string;
181
188
  }[];
182
189
  readonly role: "assistant";
190
+ readonly id?: string | undefined;
183
191
  readonly phase?: "commentary" | "final_answer" | null | undefined;
184
192
  })[];
185
193
  readonly model: string;
186
194
  readonly stream: true;
195
+ readonly metadata?: {
196
+ readonly [x: string]: string;
197
+ } | undefined;
187
198
  readonly instructions?: string | undefined;
188
199
  readonly reasoning?: {
189
200
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
190
- readonly effort?: string | undefined;
201
+ readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
191
202
  } | undefined;
192
203
  readonly tools?: readonly ({
193
204
  readonly type: "function";
@@ -202,47 +213,64 @@ export declare const routes: (RouteDef<{
202
213
  readonly size?: string | undefined;
203
214
  readonly action?: "generate" | "auto" | "edit" | undefined;
204
215
  readonly output_format?: "png" | "jpeg" | "webp" | undefined;
205
- readonly quality?: "low" | "medium" | "high" | "auto" | undefined;
216
+ readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
206
217
  readonly background?: "auto" | "opaque" | "transparent" | undefined;
207
218
  readonly output_compression?: number | undefined;
208
219
  readonly input_fidelity?: "low" | "high" | undefined;
209
220
  readonly partial_images?: number | undefined;
210
221
  })[] | undefined;
211
222
  readonly text?: {
212
- readonly verbosity?: "low" | "medium" | "high" | undefined;
223
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
213
224
  } | undefined;
214
225
  readonly temperature?: number | undefined;
215
- readonly tool_choice?: "required" | "none" | "auto" | {
226
+ readonly tool_choice?: "required" | "auto" | "none" | {
216
227
  readonly type: "function";
217
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
+ }[];
218
236
  } | {
219
237
  readonly type: "image_generation";
220
238
  } | undefined;
221
239
  readonly top_p?: number | undefined;
222
- 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;
223
240
  readonly store?: boolean | undefined;
241
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
242
+ readonly truncation?: "auto" | "disabled" | undefined;
243
+ readonly stream_options?: {
244
+ readonly include_obfuscation?: boolean | undefined;
245
+ } | undefined;
224
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;
225
251
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
226
252
  readonly max_output_tokens?: number | undefined;
253
+ readonly max_tool_calls?: number | undefined;
254
+ readonly parallel_tool_calls?: boolean | undefined;
227
255
  }, import("../protocols/open-responses-channel.js").Prepared>)[];
228
256
  export declare const configure: (input: Config) => {
229
257
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
230
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
231
- responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
232
- 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>;
233
261
  configure: (input: Config) => /*elided*/ any;
234
262
  };
235
263
  export declare const provider: {
236
264
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
237
265
  configure: (input: Config) => {
238
266
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
239
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
240
- responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
241
- 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>;
242
270
  configure: /*elided*/ any;
243
271
  };
244
272
  };
245
273
  export declare const responsesModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
246
274
  export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
247
- 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>;
248
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,
@@ -33,6 +33,9 @@ export declare const routes: import("../route/client.js").Route<{
33
33
  } | {
34
34
  readonly role: "system";
35
35
  readonly content: string;
36
+ } | {
37
+ readonly role: "developer";
38
+ readonly content: string;
36
39
  } | {
37
40
  readonly role: "user";
38
41
  readonly content: readonly ({
@@ -48,17 +51,20 @@ export declare const routes: import("../route/client.js").Route<{
48
51
  readonly text: string;
49
52
  })[];
50
53
  } | {
54
+ readonly type: "message";
51
55
  readonly content: readonly {
52
56
  readonly type: "output_text";
53
57
  readonly text: string;
54
58
  }[];
55
59
  readonly role: "assistant";
60
+ readonly id?: string | undefined;
56
61
  readonly phase?: "commentary" | "final_answer" | undefined;
57
62
  } | {
58
63
  readonly type: "function_call";
59
- readonly call_id: string;
60
64
  readonly name: string;
61
65
  readonly arguments: string;
66
+ readonly call_id: string;
67
+ readonly id?: string | undefined;
62
68
  } | {
63
69
  readonly type: "function_call_output";
64
70
  readonly call_id: string;
@@ -77,10 +83,13 @@ export declare const routes: import("../route/client.js").Route<{
77
83
  })[];
78
84
  readonly model: string;
79
85
  readonly stream: true;
86
+ readonly metadata?: {
87
+ readonly [x: string]: string;
88
+ } | undefined;
80
89
  readonly instructions?: string | undefined;
81
90
  readonly reasoning?: {
82
91
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
83
- readonly effort?: string | undefined;
92
+ readonly effort?: import("../protocols/utils/open-responses-options.js").ReasoningEffort | undefined;
84
93
  } | undefined;
85
94
  readonly tools?: readonly {
86
95
  readonly type: "function";
@@ -92,30 +101,47 @@ export declare const routes: import("../route/client.js").Route<{
92
101
  readonly strict?: boolean | undefined;
93
102
  }[] | undefined;
94
103
  readonly text?: {
95
- readonly verbosity?: "low" | "medium" | "high" | undefined;
104
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
96
105
  } | undefined;
97
106
  readonly temperature?: number | undefined;
98
- readonly tool_choice?: "required" | "none" | "auto" | {
107
+ readonly tool_choice?: "required" | "auto" | "none" | {
99
108
  readonly type: "function";
100
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
+ }[];
101
117
  } | undefined;
102
118
  readonly top_p?: number | undefined;
103
- 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;
104
119
  readonly store?: boolean | undefined;
120
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
121
+ readonly truncation?: "auto" | "disabled" | undefined;
122
+ readonly stream_options?: {
123
+ readonly include_obfuscation?: boolean | undefined;
124
+ } | undefined;
105
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;
106
130
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
107
131
  readonly max_output_tokens?: number | undefined;
132
+ readonly max_tool_calls?: number | undefined;
133
+ readonly parallel_tool_calls?: boolean | undefined;
108
134
  }, import("../route/transport/http.js").HttpPrepared<string>>[];
109
135
  export declare const configure: (input?: Config) => {
110
136
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
111
- 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>;
112
138
  configure: (input?: Config) => /*elided*/ any;
113
139
  };
114
140
  export declare const provider: {
115
141
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
116
142
  configure: (input?: Config) => {
117
143
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
118
- 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>;
119
145
  configure: /*elided*/ any;
120
146
  };
121
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,16 +1,6 @@
1
- import type { ResponseIncludable, ServiceTier } 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
- }
13
- export type OpenResponsesProviderOptionsInput = ProviderOptions & {
14
- readonly openresponses?: OpenResponsesOptionsInput;
15
4
  };
5
+ export type OpenResponsesProviderOptionsInput = OpenResponsesOptionsInput;
16
6
  export * as OpenResponsesProviderOptions from "./open-responses-options.js";