@opencode/ai 2.3.0 → 2.3.2

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 (109) hide show
  1. package/README.md +65 -18
  2. package/dist/cache-policy.js +4 -2
  3. package/dist/effect.d.ts +3 -1
  4. package/dist/generation.d.ts +10 -10
  5. package/dist/generation.js +8 -14
  6. package/dist/image-client.d.ts +56 -59
  7. package/dist/image-client.js +47 -8
  8. package/dist/image.d.ts +36 -95
  9. package/dist/image.js +11 -14
  10. package/dist/index.d.ts +25 -25
  11. package/dist/index.js +29 -22
  12. package/dist/llm.d.ts +4 -1
  13. package/dist/llm.js +10 -1
  14. package/dist/media-client.d.ts +18 -6
  15. package/dist/media-client.js +42 -37
  16. package/dist/media.d.ts +17 -1
  17. package/dist/media.js +28 -7
  18. package/dist/protocols/alibaba-messages.d.ts +24 -2
  19. package/dist/protocols/alibaba-responses.d.ts +26 -0
  20. package/dist/protocols/anthropic-messages.d.ts +70 -6
  21. package/dist/protocols/anthropic-messages.js +74 -9
  22. package/dist/protocols/assemblyai-transcription.js +7 -6
  23. package/dist/protocols/cartesia-speech.d.ts +0 -8
  24. package/dist/protocols/deepgram-speech.d.ts +0 -8
  25. package/dist/protocols/elevenlabs-speech.d.ts +0 -8
  26. package/dist/protocols/google-interactions-video.d.ts +4 -9
  27. package/dist/protocols/google-interactions-video.js +9 -10
  28. package/dist/protocols/google-speech.d.ts +0 -8
  29. package/dist/protocols/google-transcription.d.ts +0 -8
  30. package/dist/protocols/meta-messages.d.ts +24 -2
  31. package/dist/protocols/meta-responses.d.ts +52 -0
  32. package/dist/protocols/minimax-video.d.ts +6 -15
  33. package/dist/protocols/minimax-video.js +25 -27
  34. package/dist/protocols/open-responses.d.ts +410 -138
  35. package/dist/protocols/open-responses.js +47 -28
  36. package/dist/protocols/openai-chat.js +7 -3
  37. package/dist/protocols/openai-compatible-responses.d.ts +26 -0
  38. package/dist/protocols/openai-freeform.d.ts +1 -1
  39. package/dist/protocols/openai-freeform.js +9 -5
  40. package/dist/protocols/openai-images.d.ts +0 -8
  41. package/dist/protocols/openai-responses.d.ts +153 -0
  42. package/dist/protocols/openai-responses.js +68 -7
  43. package/dist/protocols/openai-speech.d.ts +0 -8
  44. package/dist/protocols/openai-transcription.d.ts +0 -8
  45. package/dist/protocols/openrouter-video.d.ts +4 -9
  46. package/dist/protocols/openrouter-video.js +14 -13
  47. package/dist/protocols/seedance-video.d.ts +4 -9
  48. package/dist/protocols/seedance-video.js +13 -12
  49. package/dist/protocols/utils/gateway-protocol.js +1 -0
  50. package/dist/protocols/utils/responses-compaction.js +14 -4
  51. package/dist/protocols/xai-responses.d.ts +26 -0
  52. package/dist/protocols/xai-video.d.ts +4 -9
  53. package/dist/protocols/xai-video.js +13 -9
  54. package/dist/protocols/zai-messages.d.ts +24 -2
  55. package/dist/providers/alibaba.d.ts +50 -2
  56. package/dist/providers/amazon-bedrock-mantle.d.ts +50 -2
  57. package/dist/providers/anthropic-compatible.d.ts +24 -2
  58. package/dist/providers/anthropic.d.ts +24 -2
  59. package/dist/providers/azure.d.ts +76 -2
  60. package/dist/providers/cloudflare-ai-gateway.d.ts +100 -4
  61. package/dist/providers/digitalocean.d.ts +26 -0
  62. package/dist/providers/google-vertex-messages.d.ts +24 -2
  63. package/dist/providers/google-vertex-messages.js +1 -0
  64. package/dist/providers/google-vertex-responses.d.ts +26 -0
  65. package/dist/providers/google.d.ts +3 -3
  66. package/dist/providers/google.js +5 -2
  67. package/dist/providers/meta.d.ts +50 -2
  68. package/dist/providers/minimax.d.ts +50 -2
  69. package/dist/providers/moonshot.d.ts +50 -2
  70. package/dist/providers/openai-compatible-responses.d.ts +26 -0
  71. package/dist/providers/openai.d.ts +26 -0
  72. package/dist/providers/openrouter.d.ts +26 -0
  73. package/dist/providers/venice.d.ts +26 -0
  74. package/dist/providers/xai/videos.d.ts +2 -0
  75. package/dist/providers/xai/videos.js +1 -0
  76. package/dist/providers/xai.d.ts +4 -3
  77. package/dist/providers/xai.js +5 -1
  78. package/dist/providers/zai-coding-plan.d.ts +50 -2
  79. package/dist/public.d.ts +5 -4
  80. package/dist/public.js +1 -1
  81. package/dist/route/client.d.ts +2 -0
  82. package/dist/route/client.js +5 -1
  83. package/dist/route/executor-service.d.ts +14 -1
  84. package/dist/route/executor-service.js +28 -1
  85. package/dist/route/executor.d.ts +5 -2
  86. package/dist/route/executor.js +20 -5
  87. package/dist/route/media-protocol.d.ts +12 -7
  88. package/dist/route/media-protocol.js +11 -4
  89. package/dist/route/media.js +12 -3
  90. package/dist/route/protocol.d.ts +3 -0
  91. package/dist/schema/events.d.ts +5 -0
  92. package/dist/schema/messages.d.ts +24 -1
  93. package/dist/schema/messages.js +26 -2
  94. package/dist/schema/options.d.ts +10 -2
  95. package/dist/speech-client.d.ts +5 -5
  96. package/dist/speech.d.ts +7 -88
  97. package/dist/speech.js +1 -3
  98. package/dist/tool-updates.d.ts +34 -0
  99. package/dist/tool-updates.js +93 -0
  100. package/dist/tool.d.ts +6 -1
  101. package/dist/tool.js +1 -1
  102. package/dist/transcription-client.d.ts +5 -5
  103. package/dist/transcription.d.ts +7 -88
  104. package/dist/transcription.js +1 -3
  105. package/dist/video-client.d.ts +6 -6
  106. package/dist/video-client.js +13 -11
  107. package/dist/video.d.ts +17 -73
  108. package/dist/video.js +9 -8
  109. package/package.json +7 -3
@@ -29,6 +29,32 @@ declare const responsesRoute: Route<{
29
29
  readonly reasoning: {
30
30
  readonly effort: import("../schema/options.js").ReasoningEffort;
31
31
  };
32
+ } | {
33
+ readonly type: "additional_tools";
34
+ readonly role: "developer";
35
+ readonly tools: readonly ({
36
+ readonly type: "custom";
37
+ readonly name: string;
38
+ readonly description: string;
39
+ readonly format: {
40
+ readonly type: "text";
41
+ } | {
42
+ readonly type: "grammar";
43
+ readonly syntax: "lark" | "regex";
44
+ readonly definition: string;
45
+ };
46
+ } | {
47
+ readonly type: "function";
48
+ readonly name: string;
49
+ readonly description: string;
50
+ readonly parameters: {
51
+ readonly [x: string]: unknown;
52
+ };
53
+ readonly strict?: boolean | undefined;
54
+ } | {
55
+ readonly [x: string]: unknown;
56
+ readonly type: string;
57
+ })[];
32
58
  } | {
33
59
  readonly type: "message";
34
60
  readonly role: "system";
@@ -483,14 +509,36 @@ export declare const routes: (Route<{
483
509
  })[];
484
510
  } | {
485
511
  readonly role: "system";
486
- readonly content: readonly {
512
+ readonly content: readonly ({
513
+ readonly type: "tool_addition";
514
+ readonly tool: {
515
+ readonly type: "tool_definition";
516
+ readonly definition: {
517
+ readonly name: string;
518
+ readonly description: string;
519
+ readonly input_schema: {
520
+ readonly [x: string]: unknown;
521
+ };
522
+ readonly cache_control?: {
523
+ readonly type: "ephemeral";
524
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
525
+ } | undefined;
526
+ };
527
+ };
528
+ } | {
529
+ readonly type: "tool_removal";
530
+ readonly tool: {
531
+ readonly type: "tool_reference";
532
+ readonly name: string;
533
+ };
534
+ } | {
487
535
  readonly type: "text";
488
536
  readonly text: string;
489
537
  readonly cache_control?: {
490
538
  readonly type: "ephemeral";
491
539
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
492
540
  } | undefined;
493
- }[];
541
+ })[];
494
542
  readonly output_config?: {
495
543
  readonly effort: string;
496
544
  } | undefined;
@@ -742,6 +790,32 @@ export declare const routes: (Route<{
742
790
  readonly reasoning: {
743
791
  readonly effort: import("../schema/options.js").ReasoningEffort;
744
792
  };
793
+ } | {
794
+ readonly type: "additional_tools";
795
+ readonly role: "developer";
796
+ readonly tools: readonly ({
797
+ readonly type: "custom";
798
+ readonly name: string;
799
+ readonly description: string;
800
+ readonly format: {
801
+ readonly type: "text";
802
+ } | {
803
+ readonly type: "grammar";
804
+ readonly syntax: "lark" | "regex";
805
+ readonly definition: string;
806
+ };
807
+ } | {
808
+ readonly type: "function";
809
+ readonly name: string;
810
+ readonly description: string;
811
+ readonly parameters: {
812
+ readonly [x: string]: unknown;
813
+ };
814
+ readonly strict?: boolean | undefined;
815
+ } | {
816
+ readonly [x: string]: unknown;
817
+ readonly type: string;
818
+ })[];
745
819
  } | {
746
820
  readonly type: "message";
747
821
  readonly role: "system";
@@ -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";
@@ -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";
@@ -182,7 +182,7 @@ export declare const configure: (input?: Config) => {
182
182
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
183
183
  }, import("../route.js").CompactionOperations | undefined>;
184
184
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
185
- video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
185
+ video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
186
186
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
187
187
  transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
188
188
  embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
@@ -201,7 +201,7 @@ export declare const provider: {
201
201
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
202
202
  }, import("../route.js").CompactionOperations | undefined>;
203
203
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
204
- video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
204
+ video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
205
205
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
206
206
  transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
207
207
  embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
@@ -214,7 +214,7 @@ export declare const videoModel: (modelID: string, settings?: Settings) => impor
214
214
  export declare const embeddingModel: (modelID: string, settings?: Settings) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
215
215
  export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<GoogleDecisions.OptionsInput>;
216
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) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
217
+ export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
218
218
  export declare const embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
219
219
  export declare const gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
220
220
  export declare const interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
@@ -39,7 +39,7 @@ export const configure = (input = {}) => {
39
39
  gemini,
40
40
  interactions: (modelID) => interactionsRoute(input).model({ id: modelID }),
41
41
  image: (modelID, providerOptions) => GoogleImages.model({ ...media, id: modelID, providerOptions }),
42
- video: (modelID) => GoogleInteractionsVideo.model({ ...media, id: modelID }),
42
+ video: (modelID, providerOptions) => GoogleInteractionsVideo.model({ ...media, id: modelID, providerOptions }),
43
43
  speech: (modelID) => GoogleSpeech.model({ ...media, id: modelID }),
44
44
  transcription: (modelID) => GoogleTranscription.model({ ...media, id: modelID }),
45
45
  embedding: (modelID, providerOptions) => embeddingRoute.model({ id: modelID, providerOptions }),
@@ -55,7 +55,10 @@ export const imageModel = (modelID, settings) => {
55
55
  const input = toConfig(settings);
56
56
  return configure(input).image(modelID, input.providerOptions);
57
57
  };
58
- export const videoModel = (modelID, settings) => configure(toConfig(settings)).video(modelID);
58
+ export const videoModel = (modelID, settings) => {
59
+ const input = toConfig(settings);
60
+ return configure(input).video(modelID, input.providerOptions);
61
+ };
59
62
  export const embeddingModel = (modelID, settings) => {
60
63
  const input = toConfig(settings);
61
64
  return configure(input).embedding(modelID, input.providerOptions);
@@ -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;
@@ -265,14 +265,36 @@ export declare const routes: (Route<{
265
265
  })[];
266
266
  } | {
267
267
  readonly role: "system";
268
- 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
+ } | {
269
291
  readonly type: "text";
270
292
  readonly text: string;
271
293
  readonly cache_control?: {
272
294
  readonly type: "ephemeral";
273
295
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
274
296
  } | undefined;
275
- }[];
297
+ })[];
276
298
  readonly output_config?: {
277
299
  readonly effort: string;
278
300
  } | undefined;
@@ -350,6 +372,32 @@ export declare const routes: (Route<{
350
372
  readonly reasoning: {
351
373
  readonly effort: import("../schema/options.js").ReasoningEffort;
352
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
+ })[];
353
401
  } | {
354
402
  readonly type: "message";
355
403
  readonly role: "system";
@@ -260,14 +260,36 @@ export declare const routes: (Route<{
260
260
  })[];
261
261
  } | {
262
262
  readonly role: "system";
263
- readonly content: readonly {
263
+ readonly content: readonly ({
264
+ readonly type: "tool_addition";
265
+ readonly tool: {
266
+ readonly type: "tool_definition";
267
+ readonly definition: {
268
+ readonly name: string;
269
+ readonly description: string;
270
+ readonly input_schema: {
271
+ readonly [x: string]: unknown;
272
+ };
273
+ readonly cache_control?: {
274
+ readonly type: "ephemeral";
275
+ readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
276
+ } | undefined;
277
+ };
278
+ };
279
+ } | {
280
+ readonly type: "tool_removal";
281
+ readonly tool: {
282
+ readonly type: "tool_reference";
283
+ readonly name: string;
284
+ };
285
+ } | {
264
286
  readonly type: "text";
265
287
  readonly text: string;
266
288
  readonly cache_control?: {
267
289
  readonly type: "ephemeral";
268
290
  readonly ttl?: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s` | undefined;
269
291
  } | undefined;
270
- }[];
292
+ })[];
271
293
  readonly output_config?: {
272
294
  readonly effort: string;
273
295
  } | undefined;
@@ -345,6 +367,32 @@ export declare const routes: (Route<{
345
367
  readonly reasoning: {
346
368
  readonly effort: import("../schema/options.js").ReasoningEffort;
347
369
  };
370
+ } | {
371
+ readonly type: "additional_tools";
372
+ readonly role: "developer";
373
+ readonly tools: readonly ({
374
+ readonly type: "custom";
375
+ readonly name: string;
376
+ readonly description: string;
377
+ readonly format: {
378
+ readonly type: "text";
379
+ } | {
380
+ readonly type: "grammar";
381
+ readonly syntax: "lark" | "regex";
382
+ readonly definition: string;
383
+ };
384
+ } | {
385
+ readonly type: "function";
386
+ readonly name: string;
387
+ readonly description: string;
388
+ readonly parameters: {
389
+ readonly [x: string]: unknown;
390
+ };
391
+ readonly strict?: boolean | undefined;
392
+ } | {
393
+ readonly [x: string]: unknown;
394
+ readonly type: string;
395
+ })[];
348
396
  } | {
349
397
  readonly type: "message";
350
398
  readonly role: "system";
@@ -21,6 +21,32 @@ export declare const routes: import("../route.js").Route<{
21
21
  readonly reasoning: {
22
22
  readonly effort: import("../schema/options.js").ReasoningEffort;
23
23
  };
24
+ } | {
25
+ readonly type: "additional_tools";
26
+ readonly role: "developer";
27
+ readonly tools: readonly ({
28
+ readonly type: "custom";
29
+ readonly name: string;
30
+ readonly description: string;
31
+ readonly format: {
32
+ readonly type: "text";
33
+ } | {
34
+ readonly type: "grammar";
35
+ readonly syntax: "lark" | "regex";
36
+ readonly definition: string;
37
+ };
38
+ } | {
39
+ readonly type: "function";
40
+ readonly name: string;
41
+ readonly description: string;
42
+ readonly parameters: {
43
+ readonly [x: string]: unknown;
44
+ };
45
+ readonly strict?: boolean | undefined;
46
+ } | {
47
+ readonly [x: string]: unknown;
48
+ readonly type: string;
49
+ })[];
24
50
  } | {
25
51
  readonly type: "message";
26
52
  readonly role: "system";