@opencode/ai 2.2.7 → 2.3.1

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 (158) hide show
  1. package/README.md +164 -99
  2. package/dist/cache-policy.js +4 -2
  3. package/dist/effect.d.ts +11 -8
  4. package/dist/effect.js +2 -1
  5. package/dist/experimental.d.ts +0 -4
  6. package/dist/experimental.js +0 -3
  7. package/dist/generation.d.ts +10 -10
  8. package/dist/generation.js +8 -14
  9. package/dist/image-client.d.ts +56 -59
  10. package/dist/image-client.js +47 -12
  11. package/dist/image.d.ts +36 -95
  12. package/dist/image.js +11 -14
  13. package/dist/index.d.ts +31 -68
  14. package/dist/index.js +54 -30
  15. package/dist/llm.d.ts +4 -1
  16. package/dist/llm.js +10 -1
  17. package/dist/media-client.d.ts +18 -6
  18. package/dist/media-client.js +42 -37
  19. package/dist/media-model.d.ts +2 -0
  20. package/dist/media-model.js +3 -1
  21. package/dist/media.d.ts +26 -4
  22. package/dist/media.js +52 -11
  23. package/dist/protocols/alibaba-messages.d.ts +24 -2
  24. package/dist/protocols/alibaba-responses.d.ts +26 -0
  25. package/dist/protocols/anthropic-messages.d.ts +70 -6
  26. package/dist/protocols/anthropic-messages.js +74 -9
  27. package/dist/protocols/assemblyai-transcription.js +7 -6
  28. package/dist/protocols/cartesia-speech.d.ts +0 -8
  29. package/dist/protocols/deepgram-speech.d.ts +0 -8
  30. package/dist/protocols/elevenlabs-speech.d.ts +0 -8
  31. package/dist/protocols/google-decisions.d.ts +13 -0
  32. package/dist/protocols/google-decisions.js +133 -0
  33. package/dist/protocols/google-interactions-video.d.ts +38 -0
  34. package/dist/protocols/google-interactions-video.js +185 -0
  35. package/dist/protocols/google-interactions.d.ts +14 -1
  36. package/dist/protocols/google-interactions.js +1 -1
  37. package/dist/protocols/google-speech.d.ts +0 -8
  38. package/dist/protocols/google-transcription.d.ts +0 -8
  39. package/dist/protocols/index.d.ts +1 -0
  40. package/dist/protocols/index.js +1 -0
  41. package/dist/protocols/meta-messages.d.ts +24 -2
  42. package/dist/protocols/meta-responses.d.ts +52 -0
  43. package/dist/protocols/minimax-video.d.ts +45 -0
  44. package/dist/protocols/minimax-video.js +290 -0
  45. package/dist/protocols/open-responses.d.ts +250 -24
  46. package/dist/protocols/open-responses.js +40 -24
  47. package/dist/protocols/openai-chat.js +7 -3
  48. package/dist/protocols/openai-compatible-responses.d.ts +26 -0
  49. package/dist/protocols/openai-freeform.d.ts +1 -1
  50. package/dist/protocols/openai-freeform.js +9 -5
  51. package/dist/protocols/openai-images.d.ts +0 -8
  52. package/dist/protocols/openai-responses.d.ts +153 -0
  53. package/dist/protocols/openai-responses.js +68 -7
  54. package/dist/protocols/openai-speech.d.ts +0 -8
  55. package/dist/protocols/openai-transcription.d.ts +0 -8
  56. package/dist/protocols/openrouter-video.d.ts +36 -0
  57. package/dist/protocols/openrouter-video.js +139 -0
  58. package/dist/protocols/seedance-video.d.ts +45 -0
  59. package/dist/protocols/seedance-video.js +217 -0
  60. package/dist/protocols/system-one.d.ts +45 -1
  61. package/dist/protocols/system-one.js +42 -7
  62. package/dist/protocols/utils/gateway-protocol.js +1 -0
  63. package/dist/protocols/utils/responses-compaction.js +8 -4
  64. package/dist/protocols/xai-responses.d.ts +26 -0
  65. package/dist/protocols/xai-video.d.ts +12 -11
  66. package/dist/protocols/xai-video.js +33 -24
  67. package/dist/protocols/zai-messages.d.ts +24 -2
  68. package/dist/provider-error.js +7 -1
  69. package/dist/providers/alibaba.d.ts +50 -2
  70. package/dist/providers/amazon-bedrock-mantle.d.ts +50 -2
  71. package/dist/providers/anthropic-compatible.d.ts +24 -2
  72. package/dist/providers/anthropic.d.ts +24 -2
  73. package/dist/providers/azure.d.ts +76 -2
  74. package/dist/providers/byteplus/videos.d.ts +2 -0
  75. package/dist/providers/byteplus/videos.js +1 -0
  76. package/dist/providers/byteplus.d.ts +26 -0
  77. package/dist/providers/byteplus.js +21 -0
  78. package/dist/providers/cloudflare-ai-gateway.d.ts +100 -4
  79. package/dist/providers/digitalocean.d.ts +26 -0
  80. package/dist/providers/google/decisions.d.ts +2 -0
  81. package/dist/providers/google/decisions.js +1 -0
  82. package/dist/providers/google/videos.d.ts +2 -0
  83. package/dist/providers/google/videos.js +1 -0
  84. package/dist/providers/google-vertex-messages.d.ts +24 -2
  85. package/dist/providers/google-vertex-messages.js +1 -0
  86. package/dist/providers/google-vertex-responses.d.ts +26 -0
  87. package/dist/providers/google.d.ts +11 -4
  88. package/dist/providers/google.js +16 -3
  89. package/dist/providers/index.d.ts +2 -1
  90. package/dist/providers/index.js +2 -1
  91. package/dist/providers/meta.d.ts +50 -2
  92. package/dist/providers/minimax/videos.d.ts +3 -0
  93. package/dist/providers/minimax/videos.js +1 -0
  94. package/dist/providers/minimax.d.ts +56 -3
  95. package/dist/providers/minimax.js +10 -1
  96. package/dist/providers/moonshot.d.ts +50 -2
  97. package/dist/providers/openai-compatible/decisions.d.ts +2 -0
  98. package/dist/providers/openai-compatible/decisions.js +1 -0
  99. package/dist/providers/openai-compatible-responses.d.ts +26 -0
  100. package/dist/providers/openai-compatible.d.ts +2 -0
  101. package/dist/providers/openai-compatible.js +14 -0
  102. package/dist/providers/openai.d.ts +26 -0
  103. package/dist/providers/openrouter/videos.d.ts +2 -0
  104. package/dist/providers/openrouter/videos.js +1 -0
  105. package/dist/providers/openrouter.d.ts +31 -0
  106. package/dist/providers/openrouter.js +8 -0
  107. package/dist/providers/venice.d.ts +26 -0
  108. package/dist/providers/volcengine/videos.d.ts +2 -0
  109. package/dist/providers/volcengine/videos.js +1 -0
  110. package/dist/providers/volcengine.d.ts +26 -0
  111. package/dist/providers/volcengine.js +21 -0
  112. package/dist/providers/xai/videos.d.ts +2 -0
  113. package/dist/providers/xai/videos.js +1 -0
  114. package/dist/providers/xai.d.ts +4 -3
  115. package/dist/providers/xai.js +5 -1
  116. package/dist/providers/zai-coding-plan.d.ts +50 -2
  117. package/dist/public.d.ts +7 -4
  118. package/dist/public.js +2 -1
  119. package/dist/route/client.d.ts +2 -0
  120. package/dist/route/client.js +5 -1
  121. package/dist/route/executor-service.d.ts +20 -1
  122. package/dist/route/executor-service.js +35 -1
  123. package/dist/route/executor.d.ts +11 -2
  124. package/dist/route/executor.js +25 -5
  125. package/dist/route/media-protocol.d.ts +21 -15
  126. package/dist/route/media-protocol.js +11 -4
  127. package/dist/route/media.d.ts +2 -0
  128. package/dist/route/media.js +40 -22
  129. package/dist/route/protocol.d.ts +3 -0
  130. package/dist/route/transport/http.js +1 -1
  131. package/dist/schema/events.d.ts +5 -0
  132. package/dist/schema/messages.d.ts +25 -2
  133. package/dist/schema/messages.js +27 -7
  134. package/dist/schema/options.d.ts +18 -2
  135. package/dist/schema/options.js +1 -0
  136. package/dist/speech-client.d.ts +6 -6
  137. package/dist/speech-client.js +4 -4
  138. package/dist/speech.d.ts +7 -88
  139. package/dist/speech.js +1 -3
  140. package/dist/tool-updates.d.ts +34 -0
  141. package/dist/tool-updates.js +93 -0
  142. package/dist/tool.d.ts +6 -1
  143. package/dist/tool.js +1 -1
  144. package/dist/transcription-client.d.ts +6 -6
  145. package/dist/transcription-client.js +1 -2
  146. package/dist/transcription.d.ts +7 -88
  147. package/dist/transcription.js +1 -3
  148. package/dist/video-client.d.ts +16 -84
  149. package/dist/video-client.js +30 -13
  150. package/dist/video.d.ts +54 -1126
  151. package/dist/video.js +29 -65
  152. package/package.json +59 -7
  153. package/dist/protocols/google-video.d.ts +0 -26
  154. package/dist/protocols/google-video.js +0 -146
  155. package/dist/protocols/runway-video.d.ts +0 -38
  156. package/dist/protocols/runway-video.js +0 -141
  157. package/dist/providers/runway.d.ts +0 -20
  158. package/dist/providers/runway.js +0 -17
@@ -35,6 +35,32 @@ export declare const responsesRoute: import("../route.js").Route<{
35
35
  readonly reasoning: {
36
36
  readonly effort: import("../schema/options.js").ReasoningEffort;
37
37
  };
38
+ } | {
39
+ readonly type: "additional_tools";
40
+ readonly role: "developer";
41
+ readonly tools: readonly ({
42
+ readonly type: "custom";
43
+ readonly name: string;
44
+ readonly description: string;
45
+ readonly format: {
46
+ readonly type: "text";
47
+ } | {
48
+ readonly type: "grammar";
49
+ readonly syntax: "lark" | "regex";
50
+ readonly definition: string;
51
+ };
52
+ } | {
53
+ readonly type: "function";
54
+ readonly name: string;
55
+ readonly description: string;
56
+ readonly parameters: {
57
+ readonly [x: string]: unknown;
58
+ };
59
+ readonly strict?: boolean | undefined;
60
+ } | {
61
+ readonly [x: string]: unknown;
62
+ readonly type: string;
63
+ })[];
38
64
  } | {
39
65
  readonly type: "message";
40
66
  readonly role: "system";
@@ -490,14 +516,36 @@ export declare const messagesRoute: import("../route.js").Route<{
490
516
  })[];
491
517
  } | {
492
518
  readonly role: "system";
493
- readonly content: readonly {
519
+ readonly content: readonly ({
520
+ readonly type: "tool_addition";
521
+ readonly tool: {
522
+ readonly type: "tool_definition";
523
+ readonly definition: {
524
+ readonly name: string;
525
+ readonly description: string;
526
+ readonly input_schema: {
527
+ readonly [x: string]: unknown;
528
+ };
529
+ readonly cache_control?: {
530
+ readonly type: "ephemeral";
531
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
532
+ } | undefined;
533
+ };
534
+ };
535
+ } | {
536
+ readonly type: "tool_removal";
537
+ readonly tool: {
538
+ readonly type: "tool_reference";
539
+ readonly name: string;
540
+ };
541
+ } | {
494
542
  readonly type: "text";
495
543
  readonly text: string;
496
544
  readonly cache_control?: {
497
545
  readonly type: "ephemeral";
498
546
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
499
547
  } | undefined;
500
- }[];
548
+ })[];
501
549
  readonly output_config?: {
502
550
  readonly effort: string;
503
551
  } | undefined;
@@ -973,14 +1021,36 @@ export declare const routes: (import("../route.js").Route<{
973
1021
  })[];
974
1022
  } | {
975
1023
  readonly role: "system";
976
- readonly content: readonly {
1024
+ readonly content: readonly ({
1025
+ readonly type: "tool_addition";
1026
+ readonly tool: {
1027
+ readonly type: "tool_definition";
1028
+ readonly definition: {
1029
+ readonly name: string;
1030
+ readonly description: string;
1031
+ readonly input_schema: {
1032
+ readonly [x: string]: unknown;
1033
+ };
1034
+ readonly cache_control?: {
1035
+ readonly type: "ephemeral";
1036
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
1037
+ } | undefined;
1038
+ };
1039
+ };
1040
+ } | {
1041
+ readonly type: "tool_removal";
1042
+ readonly tool: {
1043
+ readonly type: "tool_reference";
1044
+ readonly name: string;
1045
+ };
1046
+ } | {
977
1047
  readonly type: "text";
978
1048
  readonly text: string;
979
1049
  readonly cache_control?: {
980
1050
  readonly type: "ephemeral";
981
1051
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
982
1052
  } | undefined;
983
- }[];
1053
+ })[];
984
1054
  readonly output_config?: {
985
1055
  readonly effort: string;
986
1056
  } | undefined;
@@ -1232,6 +1302,32 @@ export declare const routes: (import("../route.js").Route<{
1232
1302
  readonly reasoning: {
1233
1303
  readonly effort: import("../schema/options.js").ReasoningEffort;
1234
1304
  };
1305
+ } | {
1306
+ readonly type: "additional_tools";
1307
+ readonly role: "developer";
1308
+ readonly tools: readonly ({
1309
+ readonly type: "custom";
1310
+ readonly name: string;
1311
+ readonly description: string;
1312
+ readonly format: {
1313
+ readonly type: "text";
1314
+ } | {
1315
+ readonly type: "grammar";
1316
+ readonly syntax: "lark" | "regex";
1317
+ readonly definition: string;
1318
+ };
1319
+ } | {
1320
+ readonly type: "function";
1321
+ readonly name: string;
1322
+ readonly description: string;
1323
+ readonly parameters: {
1324
+ readonly [x: string]: unknown;
1325
+ };
1326
+ readonly strict?: boolean | undefined;
1327
+ } | {
1328
+ readonly [x: string]: unknown;
1329
+ readonly type: string;
1330
+ })[];
1235
1331
  } | {
1236
1332
  readonly type: "message";
1237
1333
  readonly role: "system";
@@ -450,6 +450,32 @@ export declare const routes: (Route<{
450
450
  readonly reasoning: {
451
451
  readonly effort: import("../schema/options.js").ReasoningEffort;
452
452
  };
453
+ } | {
454
+ readonly type: "additional_tools";
455
+ readonly role: "developer";
456
+ readonly tools: readonly ({
457
+ readonly type: "custom";
458
+ readonly name: string;
459
+ readonly description: string;
460
+ readonly format: {
461
+ readonly type: "text";
462
+ } | {
463
+ readonly type: "grammar";
464
+ readonly syntax: "lark" | "regex";
465
+ readonly definition: string;
466
+ };
467
+ } | {
468
+ readonly type: "function";
469
+ readonly name: string;
470
+ readonly description: string;
471
+ readonly parameters: {
472
+ readonly [x: string]: unknown;
473
+ };
474
+ readonly strict?: boolean | undefined;
475
+ } | {
476
+ readonly [x: string]: unknown;
477
+ readonly type: string;
478
+ })[];
453
479
  } | {
454
480
  readonly type: "message";
455
481
  readonly role: "system";
@@ -0,0 +1,2 @@
1
+ export { decisionModel as model } from "../google.js";
2
+ export type { Settings } from "../google.js";
@@ -0,0 +1 @@
1
+ export { decisionModel as model } from "../google.js";
@@ -0,0 +1,2 @@
1
+ export { videoModel as model } from "../google.js";
2
+ export type { Settings } from "../google.js";
@@ -0,0 +1 @@
1
+ export { videoModel as model } from "../google.js";
@@ -248,14 +248,36 @@ export declare const routes: Route<{
248
248
  })[];
249
249
  } | {
250
250
  readonly role: "system";
251
- readonly content: readonly {
251
+ readonly content: readonly ({
252
+ readonly type: "tool_addition";
253
+ readonly tool: {
254
+ readonly type: "tool_definition";
255
+ readonly definition: {
256
+ readonly name: string;
257
+ readonly description: string;
258
+ readonly input_schema: {
259
+ readonly [x: string]: unknown;
260
+ };
261
+ readonly cache_control?: {
262
+ readonly type: "ephemeral";
263
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
264
+ } | undefined;
265
+ };
266
+ };
267
+ } | {
268
+ readonly type: "tool_removal";
269
+ readonly tool: {
270
+ readonly type: "tool_reference";
271
+ readonly name: string;
272
+ };
273
+ } | {
252
274
  readonly type: "text";
253
275
  readonly text: string;
254
276
  readonly cache_control?: {
255
277
  readonly type: "ephemeral";
256
278
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
257
279
  } | undefined;
258
- }[];
280
+ })[];
259
281
  readonly output_config?: {
260
282
  readonly effort: string;
261
283
  } | undefined;
@@ -27,6 +27,7 @@ const route = Route.make({
27
27
  },
28
28
  stream: AnthropicMessages.protocol.stream,
29
29
  supportsEffortUpdates: AnthropicMessages.protocol.supportsEffortUpdates,
30
+ toolUpdates: AnthropicMessages.protocol.toolUpdates,
30
31
  }),
31
32
  endpoint: Endpoint.path(({ request }) => `/${request.model.id}:streamRawPredict`),
32
33
  auth: Auth.none,
@@ -24,6 +24,32 @@ export declare const routes: Route<{
24
24
  readonly reasoning: {
25
25
  readonly effort: import("../schema/options.js").ReasoningEffort;
26
26
  };
27
+ } | {
28
+ readonly type: "additional_tools";
29
+ readonly role: "developer";
30
+ readonly tools: readonly ({
31
+ readonly type: "custom";
32
+ readonly name: string;
33
+ readonly description: string;
34
+ readonly format: {
35
+ readonly type: "text";
36
+ } | {
37
+ readonly type: "grammar";
38
+ readonly syntax: "lark" | "regex";
39
+ readonly definition: string;
40
+ };
41
+ } | {
42
+ readonly type: "function";
43
+ readonly name: string;
44
+ readonly description: string;
45
+ readonly parameters: {
46
+ readonly [x: string]: unknown;
47
+ };
48
+ readonly strict?: boolean | undefined;
49
+ } | {
50
+ readonly [x: string]: unknown;
51
+ readonly type: string;
52
+ })[];
27
53
  } | {
28
54
  readonly type: "message";
29
55
  readonly role: "system";
@@ -3,15 +3,17 @@ import type { ProviderPackage } from "../provider-package.js";
3
3
  import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
4
4
  import { Gemini } from "../protocols/gemini.js";
5
5
  import { type OptionsInput as GoogleEmbeddingOptionsInput } from "../protocols/google-embed-content.js";
6
+ import { GoogleDecisions } from "../protocols/google-decisions.js";
6
7
  import { GoogleInteractions } from "../protocols/google-interactions.js";
7
8
  export type { OptionsInput as GoogleEmbeddingOptions } from "../protocols/google-embed-content.js";
8
9
  export type { GoogleImageOptions } from "../protocols/google-images.js";
10
+ export type { GoogleVideoOptions } from "../protocols/google-interactions-video.js";
9
11
  export type { GoogleSpeechOptions } from "../protocols/google-speech.js";
10
12
  export type { GoogleTranscriptionOptions } from "../protocols/google-transcription.js";
11
- export type { GoogleVideoOptions } from "../protocols/google-video.js";
12
13
  export type GeminiOptionsInput = Gemini.OptionsInput;
13
14
  export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
14
15
  export type GoogleInteractionsOptionsInput = GoogleInteractions.OptionsInput;
16
+ export type GoogleDecisionsOptionsInput = GoogleDecisions.OptionsInput;
15
17
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
16
18
  export declare const routes: (import("../route.js").Route<{
17
19
  readonly cachedContent?: string | undefined;
@@ -180,10 +182,11 @@ export declare const configure: (input?: Config) => {
180
182
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
181
183
  }, import("../route.js").CompactionOperations | undefined>;
182
184
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
183
- video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
185
+ video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
184
186
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
185
187
  transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
186
188
  embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
189
+ decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<GoogleDecisions.OptionsInput>;
187
190
  configure: typeof configure;
188
191
  };
189
192
  export declare const provider: {
@@ -198,16 +201,20 @@ export declare const provider: {
198
201
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
199
202
  }, import("../route.js").CompactionOperations | undefined>;
200
203
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
201
- video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
204
+ video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
202
205
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
203
206
  transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
204
207
  embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
208
+ decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<GoogleDecisions.OptionsInput>;
205
209
  configure: typeof configure;
206
210
  };
207
211
  export declare const model: ProviderPackage.Model<Settings, Gemini.ProviderOptionsInput>;
208
212
  export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
213
+ export declare const videoModel: (modelID: string, settings?: Settings) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
209
214
  export declare const embeddingModel: (modelID: string, settings?: Settings) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
215
+ export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<GoogleDecisions.OptionsInput>;
210
216
  export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
217
+ export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
211
218
  export declare const embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
212
219
  export declare const gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
213
220
  export declare const interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
@@ -217,6 +224,6 @@ export declare const interactions: (modelID: string | ModelID) => import("../sch
217
224
  readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
218
225
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
219
226
  }, import("../route.js").CompactionOperations | undefined>;
220
- export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
221
227
  export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
222
228
  export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
229
+ export declare const decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<GoogleDecisions.OptionsInput>;
@@ -4,11 +4,12 @@ import { MediaRoute } from "../route/media.js";
4
4
  import { ProviderID } from "../schema/index.js";
5
5
  import { Gemini } from "../protocols/gemini.js";
6
6
  import { GoogleEmbedContent, } from "../protocols/google-embed-content.js";
7
+ import { GoogleDecisions } from "../protocols/google-decisions.js";
7
8
  import { GoogleInteractions } from "../protocols/google-interactions.js";
9
+ import { GoogleInteractionsVideo } from "../protocols/google-interactions-video.js";
8
10
  import { GoogleImages } from "../protocols/google-images.js";
9
11
  import { GoogleSpeech } from "../protocols/google-speech.js";
10
12
  import { GoogleTranscription } from "../protocols/google-transcription.js";
11
- import { GoogleVideo } from "../protocols/google-video.js";
12
13
  import { toConfig } from "./settings.js";
13
14
  export const id = ProviderID.make("google");
14
15
  export const routes = [Gemini.route, GoogleInteractions.route];
@@ -38,10 +39,13 @@ export const configure = (input = {}) => {
38
39
  gemini,
39
40
  interactions: (modelID) => interactionsRoute(input).model({ id: modelID }),
40
41
  image: (modelID, providerOptions) => GoogleImages.model({ ...media, id: modelID, providerOptions }),
41
- video: (modelID) => GoogleVideo.model({ ...media, id: modelID }),
42
+ video: (modelID, providerOptions) => GoogleInteractionsVideo.model({ ...media, id: modelID, providerOptions }),
42
43
  speech: (modelID) => GoogleSpeech.model({ ...media, id: modelID }),
43
44
  transcription: (modelID) => GoogleTranscription.model({ ...media, id: modelID }),
44
45
  embedding: (modelID, providerOptions) => embeddingRoute.model({ id: modelID, providerOptions }),
46
+ decision: (modelID, providerOptions) => GoogleDecisions.route
47
+ .with({ endpoint: { baseURL: media.baseURL }, auth: media.auth, headers: media.headers, http: media.http })
48
+ .model({ id: modelID, providerOptions }),
45
49
  configure,
46
50
  };
47
51
  };
@@ -51,14 +55,23 @@ export const imageModel = (modelID, settings) => {
51
55
  const input = toConfig(settings);
52
56
  return configure(input).image(modelID, input.providerOptions);
53
57
  };
58
+ export const videoModel = (modelID, settings) => {
59
+ const input = toConfig(settings);
60
+ return configure(input).video(modelID, input.providerOptions);
61
+ };
54
62
  export const embeddingModel = (modelID, settings) => {
55
63
  const input = toConfig(settings);
56
64
  return configure(input).embedding(modelID, input.providerOptions);
57
65
  };
66
+ export const decisionModel = (modelID, settings) => {
67
+ const input = toConfig(settings);
68
+ return configure(input).decision(modelID, input.providerOptions);
69
+ };
58
70
  export const image = provider.image;
71
+ export const video = provider.video;
59
72
  export const embedding = provider.embedding;
60
73
  export const gemini = provider.gemini;
61
74
  export const interactions = provider.interactions;
62
- export const video = provider.video;
63
75
  export const speech = provider.speech;
64
76
  export const transcription = provider.transcription;
77
+ export const decision = provider.decision;
@@ -6,6 +6,7 @@ export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
6
6
  export * as AssemblyAI from "./assemblyai.js";
7
7
  export * as Azure from "./azure.js";
8
8
  export * as Baseten from "./baseten.js";
9
+ export * as BytePlus from "./byteplus.js";
9
10
  export * as Cartesia from "./cartesia.js";
10
11
  export * as Cerebras from "./cerebras.js";
11
12
  export * as Cohere from "./cohere.js";
@@ -34,11 +35,11 @@ export * as OpenAICompatible from "./openai-compatible.js";
34
35
  export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
35
36
  export * as OpenCode from "./opencode.js";
36
37
  export * as OpenRouter from "./openrouter.js";
37
- export * as Runway from "./runway.js";
38
38
  export * as TogetherAI from "./togetherai.js";
39
39
  export * as TypeSafeAI from "./typesafe-ai.js";
40
40
  export * as VercelAIGateway from "./vercel-ai-gateway.js";
41
41
  export * as Venice from "./venice.js";
42
+ export * as Volcengine from "./volcengine.js";
42
43
  export * as XAI from "./xai.js";
43
44
  export * as ZAI from "./zai.js";
44
45
  export * as ZAICodingPlan from "./zai-coding-plan.js";
@@ -6,6 +6,7 @@ export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
6
6
  export * as AssemblyAI from "./assemblyai.js";
7
7
  export * as Azure from "./azure.js";
8
8
  export * as Baseten from "./baseten.js";
9
+ export * as BytePlus from "./byteplus.js";
9
10
  export * as Cartesia from "./cartesia.js";
10
11
  export * as Cerebras from "./cerebras.js";
11
12
  export * as Cohere from "./cohere.js";
@@ -34,11 +35,11 @@ export * as OpenAICompatible from "./openai-compatible.js";
34
35
  export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
35
36
  export * as OpenCode from "./opencode.js";
36
37
  export * as OpenRouter from "./openrouter.js";
37
- export * as Runway from "./runway.js";
38
38
  export * as TogetherAI from "./togetherai.js";
39
39
  export * as TypeSafeAI from "./typesafe-ai.js";
40
40
  export * as VercelAIGateway from "./vercel-ai-gateway.js";
41
41
  export * as Venice from "./venice.js";
42
+ export * as Volcengine from "./volcengine.js";
42
43
  export * as XAI from "./xai.js";
43
44
  export * as ZAI from "./zai.js";
44
45
  export * as ZAICodingPlan from "./zai-coding-plan.js";
@@ -45,6 +45,32 @@ export declare const routes: (Route<{
45
45
  readonly reasoning: {
46
46
  readonly effort: import("../schema/options.js").ReasoningEffort;
47
47
  };
48
+ } | {
49
+ readonly type: "additional_tools";
50
+ readonly role: "developer";
51
+ readonly tools: readonly ({
52
+ readonly type: "custom";
53
+ readonly name: string;
54
+ readonly description: string;
55
+ readonly format: {
56
+ readonly type: "text";
57
+ } | {
58
+ readonly type: "grammar";
59
+ readonly syntax: "lark" | "regex";
60
+ readonly definition: string;
61
+ };
62
+ } | {
63
+ readonly type: "function";
64
+ readonly name: string;
65
+ readonly description: string;
66
+ readonly parameters: {
67
+ readonly [x: string]: unknown;
68
+ };
69
+ readonly strict?: boolean | undefined;
70
+ } | {
71
+ readonly [x: string]: unknown;
72
+ readonly type: string;
73
+ })[];
48
74
  } | {
49
75
  readonly type: "message";
50
76
  readonly role: "system";
@@ -638,14 +664,36 @@ export declare const routes: (Route<{
638
664
  })[];
639
665
  } | {
640
666
  readonly role: "system";
641
- readonly content: readonly {
667
+ readonly content: readonly ({
668
+ readonly type: "tool_addition";
669
+ readonly tool: {
670
+ readonly type: "tool_definition";
671
+ readonly definition: {
672
+ readonly name: string;
673
+ readonly description: string;
674
+ readonly input_schema: {
675
+ readonly [x: string]: unknown;
676
+ };
677
+ readonly cache_control?: {
678
+ readonly type: "ephemeral";
679
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
680
+ } | undefined;
681
+ };
682
+ };
683
+ } | {
684
+ readonly type: "tool_removal";
685
+ readonly tool: {
686
+ readonly type: "tool_reference";
687
+ readonly name: string;
688
+ };
689
+ } | {
642
690
  readonly type: "text";
643
691
  readonly text: string;
644
692
  readonly cache_control?: {
645
693
  readonly type: "ephemeral";
646
694
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
647
695
  } | undefined;
648
- }[];
696
+ })[];
649
697
  readonly output_config?: {
650
698
  readonly effort: string;
651
699
  } | undefined;
@@ -0,0 +1,3 @@
1
+ import type { MiniMax } from "../minimax.js";
2
+ export { videoModel as model } from "../minimax.js";
3
+ export type Settings = MiniMax.Settings<MiniMax.MiniMaxVideoOptions>;
@@ -0,0 +1 @@
1
+ export { videoModel as model } from "../minimax.js";
@@ -1,6 +1,7 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { AnthropicMessages } from "../protocols/anthropic-messages.js";
3
3
  import { type MiniMaxImageOptions } from "../protocols/minimax-images.js";
4
+ import { type MiniMaxVideoOptions } from "../protocols/minimax-video.js";
4
5
  import type { ProviderAuthOption } from "../route/auth-options.js";
5
6
  import { Route } from "../route/client.js";
6
7
  import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
@@ -34,7 +35,7 @@ export type Settings<Options = MessagesOptionsInput> = ProviderPackage.Settings
34
35
  readonly apiKey?: string | false;
35
36
  readonly baseURL?: string;
36
37
  };
37
- export type { MiniMaxImageOptions };
38
+ export type { MiniMaxImageOptions, MiniMaxVideoOptions };
38
39
  export declare const routes: (Route<{
39
40
  readonly context_management?: {
40
41
  readonly edits: readonly {
@@ -264,14 +265,36 @@ export declare const routes: (Route<{
264
265
  })[];
265
266
  } | {
266
267
  readonly role: "system";
267
- readonly content: readonly {
268
+ readonly content: readonly ({
269
+ readonly type: "tool_addition";
270
+ readonly tool: {
271
+ readonly type: "tool_definition";
272
+ readonly definition: {
273
+ readonly name: string;
274
+ readonly description: string;
275
+ readonly input_schema: {
276
+ readonly [x: string]: unknown;
277
+ };
278
+ readonly cache_control?: {
279
+ readonly type: "ephemeral";
280
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
281
+ } | undefined;
282
+ };
283
+ };
284
+ } | {
285
+ readonly type: "tool_removal";
286
+ readonly tool: {
287
+ readonly type: "tool_reference";
288
+ readonly name: string;
289
+ };
290
+ } | {
268
291
  readonly type: "text";
269
292
  readonly text: string;
270
293
  readonly cache_control?: {
271
294
  readonly type: "ephemeral";
272
295
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
273
296
  } | undefined;
274
- }[];
297
+ })[];
275
298
  readonly output_config?: {
276
299
  readonly effort: string;
277
300
  } | undefined;
@@ -349,6 +372,32 @@ export declare const routes: (Route<{
349
372
  readonly reasoning: {
350
373
  readonly effort: import("../schema/options.js").ReasoningEffort;
351
374
  };
375
+ } | {
376
+ readonly type: "additional_tools";
377
+ readonly role: "developer";
378
+ readonly tools: readonly ({
379
+ readonly type: "custom";
380
+ readonly name: string;
381
+ readonly description: string;
382
+ readonly format: {
383
+ readonly type: "text";
384
+ } | {
385
+ readonly type: "grammar";
386
+ readonly syntax: "lark" | "regex";
387
+ readonly definition: string;
388
+ };
389
+ } | {
390
+ readonly type: "function";
391
+ readonly name: string;
392
+ readonly description: string;
393
+ readonly parameters: {
394
+ readonly [x: string]: unknown;
395
+ };
396
+ readonly strict?: boolean | undefined;
397
+ } | {
398
+ readonly [x: string]: unknown;
399
+ readonly type: string;
400
+ })[];
352
401
  } | {
353
402
  readonly type: "message";
354
403
  readonly role: "system";
@@ -725,6 +774,7 @@ export declare const configure: (input?: Config) => {
725
774
  chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
726
775
  responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
727
776
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<MiniMaxImageOptions>;
777
+ video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
728
778
  configure: typeof configure;
729
779
  };
730
780
  export declare const provider: {
@@ -734,12 +784,15 @@ export declare const provider: {
734
784
  chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
735
785
  responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
736
786
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<MiniMaxImageOptions>;
787
+ video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
737
788
  configure: typeof configure;
738
789
  };
739
790
  export declare const model: ProviderPackage.Model<Settings<MessagesOptionsInput>, MessagesOptionsInput>;
740
791
  export declare const imageModel: (modelID: string, settings?: Settings<MiniMaxImageOptions>) => import("../image.js").ImageModel<MiniMaxImageOptions>;
792
+ export declare const videoModel: (modelID: string, settings?: Settings<MiniMaxVideoOptions>) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
741
793
  export declare const messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
742
794
  export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
743
795
  export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
744
796
  export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<MiniMaxImageOptions>;
797
+ export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
745
798
  export * as MiniMax from "./minimax.js";