@opencode/ai 0.0.0-dev-20498 → 0.0.0-dev-20501

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 (53) hide show
  1. package/README.md +25 -0
  2. package/dist/protocols/alibaba-chat.d.ts +3 -3
  3. package/dist/protocols/alibaba-responses.d.ts +16 -12
  4. package/dist/protocols/alibaba-responses.js +3 -5
  5. package/dist/protocols/google-interactions.d.ts +236 -0
  6. package/dist/protocols/google-interactions.js +478 -0
  7. package/dist/protocols/index.d.ts +1 -0
  8. package/dist/protocols/index.js +1 -0
  9. package/dist/protocols/meta-responses.d.ts +31 -58
  10. package/dist/protocols/meta-responses.js +5 -24
  11. package/dist/protocols/mistral-chat.d.ts +1 -1
  12. package/dist/protocols/open-responses.d.ts +406 -91
  13. package/dist/protocols/open-responses.js +12 -6
  14. package/dist/protocols/openai-chat.d.ts +5 -5
  15. package/dist/protocols/openai-compatible-chat.d.ts +1 -1
  16. package/dist/protocols/openai-compatible-responses.d.ts +16 -4
  17. package/dist/protocols/openai-responses.d.ts +87 -223
  18. package/dist/protocols/openai-responses.js +3 -10
  19. package/dist/protocols/xai-responses.d.ts +18 -21
  20. package/dist/protocols/xai-responses.js +2 -8
  21. package/dist/protocols/zai-chat.d.ts +3 -3
  22. package/dist/providers/alibaba.d.ts +17 -13
  23. package/dist/providers/amazon-bedrock-mantle.d.ts +17 -5
  24. package/dist/providers/azure.d.ts +13 -61
  25. package/dist/providers/baseten.d.ts +2 -2
  26. package/dist/providers/cerebras.d.ts +2 -2
  27. package/dist/providers/cloudflare-ai-gateway.d.ts +14 -62
  28. package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
  29. package/dist/providers/cohere.d.ts +2 -2
  30. package/dist/providers/deepinfra.d.ts +2 -2
  31. package/dist/providers/deepseek.d.ts +2 -2
  32. package/dist/providers/digitalocean.d.ts +5 -5
  33. package/dist/providers/fireworks.d.ts +2 -2
  34. package/dist/providers/google/interactions.d.ts +7 -0
  35. package/dist/providers/google/interactions.js +8 -0
  36. package/dist/providers/google-vertex-chat.d.ts +1 -1
  37. package/dist/providers/google-vertex-responses.d.ts +16 -4
  38. package/dist/providers/google.d.ts +94 -3
  39. package/dist/providers/google.js +8 -1
  40. package/dist/providers/groq.d.ts +4 -4
  41. package/dist/providers/meta.d.ts +15 -28
  42. package/dist/providers/minimax.d.ts +17 -5
  43. package/dist/providers/moonshot.d.ts +17 -5
  44. package/dist/providers/openai-compatible-responses.d.ts +16 -4
  45. package/dist/providers/openai-compatible.d.ts +1 -1
  46. package/dist/providers/openai.d.ts +7 -31
  47. package/dist/providers/openrouter.d.ts +5 -5
  48. package/dist/providers/togetherai.d.ts +2 -2
  49. package/dist/providers/xai.d.ts +1 -1
  50. package/dist/providers/zai-coding-plan.d.ts +17 -5
  51. package/dist/providers/zai.d.ts +1 -1
  52. package/dist/route/client.js +2 -5
  53. package/package.json +3 -3
@@ -70,6 +70,10 @@ export declare const responsesRoute: import("../route/client.js").Route<{
70
70
  readonly reasoning: {
71
71
  readonly effort: import("../schema/options.js").ReasoningEffort;
72
72
  };
73
+ } | {
74
+ readonly [x: string]: unknown;
75
+ readonly type: string;
76
+ readonly id: string;
73
77
  } | {
74
78
  readonly type: "reasoning";
75
79
  readonly summary: readonly {
@@ -146,34 +150,6 @@ export declare const responsesRoute: import("../route/client.js").Route<{
146
150
  readonly type: "input_video";
147
151
  readonly video_url: string;
148
152
  })[];
149
- } | {
150
- readonly [x: string]: unknown;
151
- readonly id: string;
152
- readonly type: "computer_call";
153
- readonly status?: string | undefined;
154
- readonly action?: {
155
- readonly [x: string]: unknown;
156
- } | null | undefined;
157
- readonly call_id?: string | undefined;
158
- readonly pending_safety_checks?: readonly {
159
- readonly [x: string]: unknown;
160
- }[] | undefined;
161
- } | {
162
- readonly [x: string]: unknown;
163
- readonly id: string;
164
- readonly type: "web_search_preview_call";
165
- readonly status?: string | undefined;
166
- readonly action?: {
167
- readonly [x: string]: unknown;
168
- } | null | undefined;
169
- } | {
170
- readonly [x: string]: unknown;
171
- readonly id: string;
172
- readonly type: "image_generation_call";
173
- readonly status?: string | undefined;
174
- readonly result?: string | null | undefined;
175
- readonly output_format?: "png" | "jpeg" | "webp" | undefined;
176
- readonly revised_prompt?: string | null | undefined;
177
153
  })[];
178
154
  readonly model: string;
179
155
  readonly stream: true;
@@ -242,9 +218,10 @@ export declare const responsesRoute: import("../route/client.js").Route<{
242
218
  readonly top_p?: number | undefined;
243
219
  readonly frequency_penalty?: number | undefined;
244
220
  readonly presence_penalty?: number | undefined;
221
+ readonly store?: boolean | undefined;
222
+ readonly max_output_tokens?: number | undefined;
245
223
  readonly prompt_cache_key?: string | undefined;
246
224
  readonly parallel_tool_calls?: boolean | undefined;
247
- readonly store?: boolean | undefined;
248
225
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
249
226
  readonly truncation?: "auto" | "disabled" | undefined;
250
227
  readonly stream_options?: {
@@ -252,7 +229,6 @@ export declare const responsesRoute: import("../route/client.js").Route<{
252
229
  } | undefined;
253
230
  readonly safety_identifier?: string | undefined;
254
231
  readonly top_logprobs?: number | undefined;
255
- readonly max_output_tokens?: number | undefined;
256
232
  readonly max_tool_calls?: number | undefined;
257
233
  }, import("../protocols/open-responses-channel.js").Prepared, {
258
234
  endpoint: import("../route/client.js").CompactOperation;
@@ -645,9 +621,9 @@ export declare const route: import("../route/client.js").Route<{
645
621
  readonly top_p?: number | undefined;
646
622
  readonly frequency_penalty?: number | undefined;
647
623
  readonly presence_penalty?: number | undefined;
624
+ readonly store?: boolean | undefined;
648
625
  readonly prompt_cache_key?: string | undefined;
649
626
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
650
- readonly store?: boolean | undefined;
651
627
  readonly stream_options?: {
652
628
  readonly include_usage: boolean;
653
629
  } | undefined;
@@ -1039,9 +1015,9 @@ export declare const routes: (import("../route/client.js").Route<{
1039
1015
  readonly top_p?: number | undefined;
1040
1016
  readonly frequency_penalty?: number | undefined;
1041
1017
  readonly presence_penalty?: number | undefined;
1018
+ readonly store?: boolean | undefined;
1042
1019
  readonly prompt_cache_key?: string | undefined;
1043
1020
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
1044
- readonly store?: boolean | undefined;
1045
1021
  readonly stream_options?: {
1046
1022
  readonly include_usage: boolean;
1047
1023
  } | undefined;
@@ -1089,6 +1065,10 @@ export declare const routes: (import("../route/client.js").Route<{
1089
1065
  readonly reasoning: {
1090
1066
  readonly effort: import("../schema/options.js").ReasoningEffort;
1091
1067
  };
1068
+ } | {
1069
+ readonly [x: string]: unknown;
1070
+ readonly type: string;
1071
+ readonly id: string;
1092
1072
  } | {
1093
1073
  readonly type: "reasoning";
1094
1074
  readonly summary: readonly {
@@ -1165,34 +1145,6 @@ export declare const routes: (import("../route/client.js").Route<{
1165
1145
  readonly type: "input_video";
1166
1146
  readonly video_url: string;
1167
1147
  })[];
1168
- } | {
1169
- readonly [x: string]: unknown;
1170
- readonly id: string;
1171
- readonly type: "computer_call";
1172
- readonly status?: string | undefined;
1173
- readonly action?: {
1174
- readonly [x: string]: unknown;
1175
- } | null | undefined;
1176
- readonly call_id?: string | undefined;
1177
- readonly pending_safety_checks?: readonly {
1178
- readonly [x: string]: unknown;
1179
- }[] | undefined;
1180
- } | {
1181
- readonly [x: string]: unknown;
1182
- readonly id: string;
1183
- readonly type: "web_search_preview_call";
1184
- readonly status?: string | undefined;
1185
- readonly action?: {
1186
- readonly [x: string]: unknown;
1187
- } | null | undefined;
1188
- } | {
1189
- readonly [x: string]: unknown;
1190
- readonly id: string;
1191
- readonly type: "image_generation_call";
1192
- readonly status?: string | undefined;
1193
- readonly result?: string | null | undefined;
1194
- readonly output_format?: "png" | "jpeg" | "webp" | undefined;
1195
- readonly revised_prompt?: string | null | undefined;
1196
1148
  })[];
1197
1149
  readonly model: string;
1198
1150
  readonly stream: true;
@@ -1261,9 +1213,10 @@ export declare const routes: (import("../route/client.js").Route<{
1261
1213
  readonly top_p?: number | undefined;
1262
1214
  readonly frequency_penalty?: number | undefined;
1263
1215
  readonly presence_penalty?: number | undefined;
1216
+ readonly store?: boolean | undefined;
1217
+ readonly max_output_tokens?: number | undefined;
1264
1218
  readonly prompt_cache_key?: string | undefined;
1265
1219
  readonly parallel_tool_calls?: boolean | undefined;
1266
- readonly store?: boolean | undefined;
1267
1220
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
1268
1221
  readonly truncation?: "auto" | "disabled" | undefined;
1269
1222
  readonly stream_options?: {
@@ -1271,7 +1224,6 @@ export declare const routes: (import("../route/client.js").Route<{
1271
1224
  } | undefined;
1272
1225
  readonly safety_identifier?: string | undefined;
1273
1226
  readonly top_logprobs?: number | undefined;
1274
- readonly max_output_tokens?: number | undefined;
1275
1227
  readonly max_tool_calls?: number | undefined;
1276
1228
  }, import("../protocols/open-responses-channel.js").Prepared, {
1277
1229
  endpoint: import("../route/client.js").CompactOperation;
@@ -130,9 +130,9 @@ export declare const route: Route<{
130
130
  readonly top_p?: number | undefined;
131
131
  readonly frequency_penalty?: number | undefined;
132
132
  readonly presence_penalty?: number | undefined;
133
+ readonly store?: boolean | undefined;
133
134
  readonly prompt_cache_key?: string | undefined;
134
135
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
135
- readonly store?: boolean | undefined;
136
136
  readonly stream_options?: {
137
137
  readonly include_usage: boolean;
138
138
  } | undefined;
@@ -252,9 +252,9 @@ export declare const routes: Route<{
252
252
  readonly top_p?: number | undefined;
253
253
  readonly frequency_penalty?: number | undefined;
254
254
  readonly presence_penalty?: number | undefined;
255
+ readonly store?: boolean | undefined;
255
256
  readonly prompt_cache_key?: string | undefined;
256
257
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
257
- readonly store?: boolean | undefined;
258
258
  readonly stream_options?: {
259
259
  readonly include_usage: boolean;
260
260
  } | undefined;
@@ -180,9 +180,9 @@ export declare const chatRoute: Route<{
180
180
  readonly top_p?: number | undefined;
181
181
  readonly frequency_penalty?: number | undefined;
182
182
  readonly presence_penalty?: number | undefined;
183
+ readonly store?: boolean | undefined;
183
184
  readonly prompt_cache_key?: string | undefined;
184
185
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
185
- readonly store?: boolean | undefined;
186
186
  readonly stream_options?: {
187
187
  readonly include_usage: boolean;
188
188
  } | undefined;
@@ -351,9 +351,9 @@ export declare const routes: (Route<{
351
351
  readonly top_p?: number | undefined;
352
352
  readonly frequency_penalty?: number | undefined;
353
353
  readonly presence_penalty?: number | undefined;
354
+ readonly store?: boolean | undefined;
354
355
  readonly prompt_cache_key?: string | undefined;
355
356
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
356
- readonly store?: boolean | undefined;
357
357
  readonly stream_options?: {
358
358
  readonly include_usage: boolean;
359
359
  } | undefined;
@@ -126,9 +126,9 @@ export declare const route: Route<{
126
126
  readonly top_p?: number | undefined;
127
127
  readonly frequency_penalty?: number | undefined;
128
128
  readonly presence_penalty?: number | undefined;
129
+ readonly store?: boolean | undefined;
129
130
  readonly prompt_cache_key?: string | undefined;
130
131
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
131
- readonly store?: boolean | undefined;
132
132
  readonly stream_options?: {
133
133
  readonly include_usage: boolean;
134
134
  } | undefined;
@@ -248,9 +248,9 @@ export declare const routes: Route<{
248
248
  readonly top_p?: number | undefined;
249
249
  readonly frequency_penalty?: number | undefined;
250
250
  readonly presence_penalty?: number | undefined;
251
+ readonly store?: boolean | undefined;
251
252
  readonly prompt_cache_key?: string | undefined;
252
253
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
253
- readonly store?: boolean | undefined;
254
254
  readonly stream_options?: {
255
255
  readonly include_usage: boolean;
256
256
  } | undefined;
@@ -126,9 +126,9 @@ export declare const route: Route<{
126
126
  readonly top_p?: number | undefined;
127
127
  readonly frequency_penalty?: number | undefined;
128
128
  readonly presence_penalty?: number | undefined;
129
+ readonly store?: boolean | undefined;
129
130
  readonly prompt_cache_key?: string | undefined;
130
131
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
131
- readonly store?: boolean | undefined;
132
132
  readonly stream_options?: {
133
133
  readonly include_usage: boolean;
134
134
  } | undefined;
@@ -248,9 +248,9 @@ export declare const routes: Route<{
248
248
  readonly top_p?: number | undefined;
249
249
  readonly frequency_penalty?: number | undefined;
250
250
  readonly presence_penalty?: number | undefined;
251
+ readonly store?: boolean | undefined;
251
252
  readonly prompt_cache_key?: string | undefined;
252
253
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
253
- readonly store?: boolean | undefined;
254
254
  readonly stream_options?: {
255
255
  readonly include_usage: boolean;
256
256
  } | undefined;
@@ -127,9 +127,9 @@ export declare const protocol: Protocol<{
127
127
  readonly top_p?: number | undefined;
128
128
  readonly frequency_penalty?: number | undefined;
129
129
  readonly presence_penalty?: number | undefined;
130
+ readonly store?: boolean | undefined;
130
131
  readonly prompt_cache_key?: string | undefined;
131
132
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
132
- readonly store?: boolean | undefined;
133
133
  readonly stream_options?: {
134
134
  readonly include_usage: boolean;
135
135
  } | undefined;
@@ -145,9 +145,9 @@ export declare const protocol: Protocol<{
145
145
  readonly [x: string]: unknown;
146
146
  readonly cache_read_input_tokens?: number | null | undefined;
147
147
  readonly cached_tokens?: number | null | undefined;
148
+ readonly total_tokens?: number | null | undefined;
148
149
  readonly prompt_tokens?: number | null | undefined;
149
150
  readonly completion_tokens?: number | null | undefined;
150
- readonly total_tokens?: number | null | undefined;
151
151
  readonly prompt_tokens_details?: {
152
152
  readonly [x: string]: unknown;
153
153
  readonly cached_tokens?: number | null | undefined;
@@ -186,9 +186,9 @@ export declare const protocol: Protocol<{
186
186
  readonly [x: string]: unknown;
187
187
  readonly cache_read_input_tokens?: number | null | undefined;
188
188
  readonly cached_tokens?: number | null | undefined;
189
+ readonly total_tokens?: number | null | undefined;
189
190
  readonly prompt_tokens?: number | null | undefined;
190
191
  readonly completion_tokens?: number | null | undefined;
191
- readonly total_tokens?: number | null | undefined;
192
192
  readonly prompt_tokens_details?: {
193
193
  readonly [x: string]: unknown;
194
194
  readonly cached_tokens?: number | null | undefined;
@@ -321,9 +321,9 @@ export declare const route: Route<{
321
321
  readonly top_p?: number | undefined;
322
322
  readonly frequency_penalty?: number | undefined;
323
323
  readonly presence_penalty?: number | undefined;
324
+ readonly store?: boolean | undefined;
324
325
  readonly prompt_cache_key?: string | undefined;
325
326
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
326
- readonly store?: boolean | undefined;
327
327
  readonly stream_options?: {
328
328
  readonly include_usage: boolean;
329
329
  } | undefined;
@@ -443,9 +443,9 @@ export declare const routes: Route<{
443
443
  readonly top_p?: number | undefined;
444
444
  readonly frequency_penalty?: number | undefined;
445
445
  readonly presence_penalty?: number | undefined;
446
+ readonly store?: boolean | undefined;
446
447
  readonly prompt_cache_key?: string | undefined;
447
448
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
448
- readonly store?: boolean | undefined;
449
449
  readonly stream_options?: {
450
450
  readonly include_usage: boolean;
451
451
  } | undefined;
@@ -126,9 +126,9 @@ export declare const route: Route<{
126
126
  readonly top_p?: number | undefined;
127
127
  readonly frequency_penalty?: number | undefined;
128
128
  readonly presence_penalty?: number | undefined;
129
+ readonly store?: boolean | undefined;
129
130
  readonly prompt_cache_key?: string | undefined;
130
131
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
131
- readonly store?: boolean | undefined;
132
132
  readonly stream_options?: {
133
133
  readonly include_usage: boolean;
134
134
  } | undefined;
@@ -248,9 +248,9 @@ export declare const routes: Route<{
248
248
  readonly top_p?: number | undefined;
249
249
  readonly frequency_penalty?: number | undefined;
250
250
  readonly presence_penalty?: number | undefined;
251
+ readonly store?: boolean | undefined;
251
252
  readonly prompt_cache_key?: string | undefined;
252
253
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
253
- readonly store?: boolean | undefined;
254
254
  readonly stream_options?: {
255
255
  readonly include_usage: boolean;
256
256
  } | undefined;
@@ -0,0 +1,7 @@
1
+ import type { ProviderPackage } from "../../provider-package.js";
2
+ import type { GoogleInteractions } from "../../protocols/google-interactions.js";
3
+ export type Settings = ProviderPackage.Settings & GoogleInteractions.ProviderOptionsInput & {
4
+ readonly apiKey?: string;
5
+ readonly baseURL?: string;
6
+ };
7
+ export declare const model: ProviderPackage.Definition<Settings, GoogleInteractions.ProviderOptionsInput>["model"];
@@ -0,0 +1,8 @@
1
+ import { configure } from "../google.js";
2
+ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
3
+ apiKey,
4
+ baseURL,
5
+ headers: headers === undefined ? undefined : { ...headers },
6
+ http: body === undefined ? undefined : { body: { ...body } },
7
+ providerOptions,
8
+ }).interactions(modelID);
@@ -131,9 +131,9 @@ export declare const routes: Route<{
131
131
  readonly top_p?: number | undefined;
132
132
  readonly frequency_penalty?: number | undefined;
133
133
  readonly presence_penalty?: number | undefined;
134
+ readonly store?: boolean | undefined;
134
135
  readonly prompt_cache_key?: string | undefined;
135
136
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
136
- readonly store?: boolean | undefined;
137
137
  readonly stream_options?: {
138
138
  readonly include_usage: boolean;
139
139
  } | undefined;
@@ -55,6 +55,15 @@ export declare const routes: Route<{
55
55
  readonly error?: unknown;
56
56
  readonly arguments?: string | undefined;
57
57
  readonly server_label?: string | undefined;
58
+ } | {
59
+ readonly type: "configuration_update";
60
+ readonly reasoning: {
61
+ readonly effort: import("../schema/options.js").ReasoningEffort;
62
+ };
63
+ } | {
64
+ readonly [x: string]: unknown;
65
+ readonly type: string;
66
+ readonly id: string;
58
67
  } | {
59
68
  readonly type: "reasoning";
60
69
  readonly summary: readonly {
@@ -142,7 +151,10 @@ export declare const routes: Route<{
142
151
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
143
152
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
144
153
  } | undefined;
145
- readonly tools?: readonly {
154
+ readonly tools?: readonly ({
155
+ readonly [x: string]: unknown;
156
+ readonly type: string;
157
+ } | {
146
158
  readonly type: "function";
147
159
  readonly description: string;
148
160
  readonly name: string;
@@ -150,7 +162,7 @@ export declare const routes: Route<{
150
162
  readonly [x: string]: unknown;
151
163
  };
152
164
  readonly strict?: boolean | undefined;
153
- }[] | undefined;
165
+ })[] | undefined;
154
166
  readonly text?: {
155
167
  readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
156
168
  } | undefined;
@@ -170,9 +182,10 @@ export declare const routes: Route<{
170
182
  readonly top_p?: number | undefined;
171
183
  readonly frequency_penalty?: number | undefined;
172
184
  readonly presence_penalty?: number | undefined;
185
+ readonly store?: boolean | undefined;
186
+ readonly max_output_tokens?: number | undefined;
173
187
  readonly prompt_cache_key?: string | undefined;
174
188
  readonly parallel_tool_calls?: boolean | undefined;
175
- readonly store?: boolean | undefined;
176
189
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
177
190
  readonly truncation?: "auto" | "disabled" | undefined;
178
191
  readonly stream_options?: {
@@ -180,7 +193,6 @@ export declare const routes: Route<{
180
193
  } | undefined;
181
194
  readonly safety_identifier?: string | undefined;
182
195
  readonly top_logprobs?: number | undefined;
183
- readonly max_output_tokens?: number | undefined;
184
196
  readonly max_tool_calls?: number | undefined;
185
197
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
186
198
  export declare const configure: (input?: Config) => {
@@ -3,14 +3,16 @@ import type { ProviderAuthOption } from "../route/auth-options.js";
3
3
  import type { ProviderPackage } from "../provider-package.js";
4
4
  import { type ModelID } from "../schema/index.js";
5
5
  import { Gemini } from "../protocols/gemini.js";
6
+ import { GoogleInteractions } from "../protocols/google-interactions.js";
6
7
  export type { GoogleImageOptions } from "../protocols/google-images.js";
7
8
  export type { GoogleSpeechOptions } from "../protocols/google-speech.js";
8
9
  export type { GoogleTranscriptionOptions } from "../protocols/google-transcription.js";
9
10
  export type { GoogleVideoOptions } from "../protocols/google-video.js";
10
11
  export type GeminiOptionsInput = Gemini.OptionsInput;
11
12
  export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
13
+ export type GoogleInteractionsOptionsInput = GoogleInteractions.OptionsInput;
12
14
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
13
- export declare const routes: import("../route/client.js").Route<{
15
+ export declare const routes: (import("../route/client.js").Route<{
14
16
  readonly contents: readonly {
15
17
  readonly parts?: readonly ({
16
18
  readonly inlineData: {
@@ -94,10 +96,71 @@ export declare const routes: import("../route/client.js").Route<{
94
96
  } | undefined;
95
97
  readonly maxOutputTokens?: number | undefined;
96
98
  } | undefined;
97
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
99
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
100
+ readonly input: readonly ({
101
+ readonly type: "user_input" | "model_output";
102
+ readonly content: readonly ({
103
+ readonly type: "text";
104
+ readonly text: string;
105
+ } | {
106
+ readonly type: "image" | "document" | "video" | "audio";
107
+ readonly mime_type: string;
108
+ readonly data?: string | undefined;
109
+ readonly uri?: string | undefined;
110
+ })[];
111
+ } | {
112
+ readonly type: "thought";
113
+ readonly summary?: readonly {
114
+ readonly type: "text";
115
+ readonly text: string;
116
+ }[] | undefined;
117
+ readonly signature?: string | undefined;
118
+ } | {
119
+ readonly id: string;
120
+ readonly type: "function_call";
121
+ readonly name: string;
122
+ readonly arguments: unknown;
123
+ readonly signature?: string | undefined;
124
+ } | {
125
+ readonly type: "function_result";
126
+ readonly name: string;
127
+ readonly result: unknown;
128
+ readonly call_id: string;
129
+ readonly is_error?: boolean | undefined;
130
+ })[];
131
+ readonly model: string;
132
+ readonly stream: true;
133
+ readonly store: boolean;
134
+ readonly generation_config: {
135
+ readonly temperature?: number | undefined;
136
+ readonly seed?: number | undefined;
137
+ readonly tool_choice?: "auto" | "none" | "any" | {
138
+ readonly allowed_tools: {
139
+ readonly mode: "any";
140
+ readonly tools: readonly string[];
141
+ };
142
+ } | undefined;
143
+ readonly top_p?: number | undefined;
144
+ readonly stop_sequences?: readonly string[] | undefined;
145
+ readonly max_output_tokens?: number | undefined;
146
+ readonly thinking_level?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
147
+ readonly thinking_summaries?: string | undefined;
148
+ };
149
+ readonly tools?: readonly {
150
+ readonly type: "function";
151
+ readonly name: string;
152
+ readonly description: string;
153
+ readonly parameters: {
154
+ readonly [x: string]: unknown;
155
+ };
156
+ }[] | undefined;
157
+ readonly service_tier?: string | undefined;
158
+ readonly previous_interaction_id?: string | undefined;
159
+ readonly system_instruction?: string | undefined;
160
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
98
161
  export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
99
162
  readonly baseURL?: string;
100
- readonly providerOptions?: Gemini.ProviderOptionsInput;
163
+ readonly providerOptions?: Gemini.ProviderOptionsInput & GoogleInteractions.ProviderOptionsInput;
101
164
  };
102
165
  export type Settings = ProviderPackage.Settings & Gemini.ProviderOptionsInput & {
103
166
  readonly apiKey?: string;
@@ -106,6 +169,13 @@ export type Settings = ProviderPackage.Settings & Gemini.ProviderOptionsInput &
106
169
  export declare const configure: (input?: Config) => {
107
170
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
108
171
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
172
+ interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
173
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
174
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
175
+ readonly previousInteractionId?: string | undefined;
176
+ readonly store?: boolean | undefined;
177
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
178
+ }, import("../route/client.js").CompactionOperations | undefined>;
109
179
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
110
180
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
111
181
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -115,6 +185,13 @@ export declare const configure: (input?: Config) => {
115
185
  export declare const provider: {
116
186
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
117
187
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
188
+ interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
189
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
190
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
191
+ readonly previousInteractionId?: string | undefined;
192
+ readonly store?: boolean | undefined;
193
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
194
+ }, import("../route/client.js").CompactionOperations | undefined>;
118
195
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
119
196
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
120
197
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -122,6 +199,13 @@ export declare const provider: {
122
199
  configure: (input?: Config) => {
123
200
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
124
201
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
202
+ interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
203
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
204
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
205
+ readonly previousInteractionId?: string | undefined;
206
+ readonly store?: boolean | undefined;
207
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
208
+ }, import("../route/client.js").CompactionOperations | undefined>;
125
209
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
126
210
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
127
211
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -131,6 +215,13 @@ export declare const provider: {
131
215
  };
132
216
  export declare const model: ProviderPackage.Definition<Settings, Gemini.ProviderOptionsInput>["model"];
133
217
  export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
218
+ export declare const interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
219
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
220
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
221
+ readonly previousInteractionId?: string | undefined;
222
+ readonly store?: boolean | undefined;
223
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
224
+ }, import("../route/client.js").CompactionOperations | undefined>;
134
225
  export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
135
226
  export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
136
227
  export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
@@ -2,12 +2,13 @@ import { Auth } from "../route/auth.js";
2
2
  import { MediaRoute } from "../route/media.js";
3
3
  import { ProviderID } from "../schema/index.js";
4
4
  import { Gemini } from "../protocols/gemini.js";
5
+ import { GoogleInteractions } from "../protocols/google-interactions.js";
5
6
  import { GoogleImages } from "../protocols/google-images.js";
6
7
  import { GoogleSpeech } from "../protocols/google-speech.js";
7
8
  import { GoogleTranscription } from "../protocols/google-transcription.js";
8
9
  import { GoogleVideo } from "../protocols/google-video.js";
9
10
  export const id = ProviderID.make("google");
10
- export const routes = [Gemini.route];
11
+ export const routes = [Gemini.route, GoogleInteractions.route];
11
12
  const auth = (options) => {
12
13
  if ("auth" in options && options.auth)
13
14
  return options.auth;
@@ -19,12 +20,17 @@ const configuredRoute = (input) => {
19
20
  const { apiKey: _, auth: _auth, baseURL, ...rest } = input;
20
21
  return Gemini.route.with({ ...rest, endpoint: { baseURL }, auth: auth(input) });
21
22
  };
23
+ const interactionsRoute = (input) => {
24
+ const { apiKey: _, auth: _auth, baseURL, ...rest } = input;
25
+ return GoogleInteractions.route.with({ ...rest, endpoint: { baseURL }, auth: auth(input) });
26
+ };
22
27
  export const configure = (input = {}) => {
23
28
  const route = configuredRoute(input);
24
29
  const media = MediaRoute.deployment(input, auth(input));
25
30
  return {
26
31
  id,
27
32
  model: (modelID) => route.model({ id: modelID }),
33
+ interactions: (modelID) => interactionsRoute(input).model({ id: modelID }),
28
34
  image: (modelID) => GoogleImages.model({ ...media, id: modelID }),
29
35
  video: (modelID) => GoogleVideo.model({ ...media, id: modelID }),
30
36
  speech: (modelID) => GoogleSpeech.model({ ...media, id: modelID }),
@@ -41,6 +47,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
41
47
  providerOptions,
42
48
  }).model(modelID);
43
49
  export const image = provider.image;
50
+ export const interactions = provider.interactions;
44
51
  export const video = provider.video;
45
52
  export const speech = provider.speech;
46
53
  export const transcription = provider.transcription;
@@ -137,10 +137,10 @@ export declare const protocol: Protocol<{
137
137
  readonly top_p?: number | undefined;
138
138
  readonly frequency_penalty?: number | undefined;
139
139
  readonly presence_penalty?: number | undefined;
140
+ readonly store?: boolean | undefined;
140
141
  readonly prompt_cache_key?: string | undefined;
141
142
  readonly parallel_tool_calls?: boolean | undefined;
142
143
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
143
- readonly store?: boolean | undefined;
144
144
  readonly stream_options?: {
145
145
  readonly include_usage: boolean;
146
146
  } | undefined;
@@ -158,9 +158,9 @@ export declare const protocol: Protocol<{
158
158
  readonly [x: string]: unknown;
159
159
  readonly cache_read_input_tokens?: number | null | undefined;
160
160
  readonly cached_tokens?: number | null | undefined;
161
+ readonly total_tokens?: number | null | undefined;
161
162
  readonly prompt_tokens?: number | null | undefined;
162
163
  readonly completion_tokens?: number | null | undefined;
163
- readonly total_tokens?: number | null | undefined;
164
164
  readonly prompt_tokens_details?: {
165
165
  readonly [x: string]: unknown;
166
166
  readonly cached_tokens?: number | null | undefined;
@@ -199,9 +199,9 @@ export declare const protocol: Protocol<{
199
199
  readonly [x: string]: unknown;
200
200
  readonly cache_read_input_tokens?: number | null | undefined;
201
201
  readonly cached_tokens?: number | null | undefined;
202
+ readonly total_tokens?: number | null | undefined;
202
203
  readonly prompt_tokens?: number | null | undefined;
203
204
  readonly completion_tokens?: number | null | undefined;
204
- readonly total_tokens?: number | null | undefined;
205
205
  readonly prompt_tokens_details?: {
206
206
  readonly [x: string]: unknown;
207
207
  readonly cached_tokens?: number | null | undefined;
@@ -336,10 +336,10 @@ export declare const route: Route<{
336
336
  readonly top_p?: number | undefined;
337
337
  readonly frequency_penalty?: number | undefined;
338
338
  readonly presence_penalty?: number | undefined;
339
+ readonly store?: boolean | undefined;
339
340
  readonly prompt_cache_key?: string | undefined;
340
341
  readonly parallel_tool_calls?: boolean | undefined;
341
342
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
342
- readonly store?: boolean | undefined;
343
343
  readonly stream_options?: {
344
344
  readonly include_usage: boolean;
345
345
  } | undefined;