@opencode/ai 2.2.5 → 2.2.7

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 (306) hide show
  1. package/README.md +228 -72
  2. package/dist/ai-client.d.ts +2 -2
  3. package/dist/ai-client.js +2 -1
  4. package/dist/cache-policy.d.ts +1 -1
  5. package/dist/cache-policy.js +16 -4
  6. package/dist/decision-client.d.ts +3 -3
  7. package/dist/decision.d.ts +30 -125
  8. package/dist/decision.js +27 -15
  9. package/dist/effect.d.ts +10 -15
  10. package/dist/effect.js +6 -6
  11. package/dist/effort-updates.d.ts +3 -3
  12. package/dist/effort-updates.js +2 -2
  13. package/dist/embedding-client.d.ts +21 -0
  14. package/dist/embedding-client.js +30 -0
  15. package/dist/embedding.d.ts +111 -0
  16. package/dist/embedding.js +75 -0
  17. package/dist/experimental/cloudflare-run-extraction.d.ts +7 -3
  18. package/dist/experimental/cloudflare-run-extraction.js +4 -1
  19. package/dist/experimental/extraction.d.ts +10 -40
  20. package/dist/experimental/extraction.js +14 -13
  21. package/dist/experimental.d.ts +8 -8
  22. package/dist/experimental.js +4 -4
  23. package/dist/generation.d.ts +0 -2
  24. package/dist/generation.js +2 -2
  25. package/dist/image-client.d.ts +13 -7
  26. package/dist/image-client.js +1 -1
  27. package/dist/image.d.ts +357 -465
  28. package/dist/image.js +17 -18
  29. package/dist/index.d.ts +35 -467
  30. package/dist/index.js +23 -17
  31. package/dist/llm.d.ts +65 -266
  32. package/dist/llm.js +101 -92
  33. package/dist/loop.d.ts +38 -0
  34. package/dist/loop.js +136 -0
  35. package/dist/media-model.d.ts +1 -1
  36. package/dist/media-model.js +8 -6
  37. package/dist/media.d.ts +9 -0
  38. package/dist/media.js +37 -2
  39. package/dist/protocols/alibaba-chat.d.ts +9 -1
  40. package/dist/protocols/alibaba-chat.js +3 -3
  41. package/dist/protocols/alibaba-images.d.ts +2 -2
  42. package/dist/protocols/alibaba-messages.js +3 -3
  43. package/dist/protocols/alibaba-responses.js +8 -20
  44. package/dist/protocols/anthropic-messages.d.ts +1 -1
  45. package/dist/protocols/anthropic-messages.js +57 -176
  46. package/dist/protocols/assemblyai-transcription.d.ts +2 -2
  47. package/dist/protocols/bedrock-converse.js +10 -16
  48. package/dist/protocols/cartesia-speech.d.ts +2 -2
  49. package/dist/protocols/cloudflare-workers-ai-images.d.ts +2 -2
  50. package/dist/protocols/cohere-chat.js +9 -12
  51. package/dist/protocols/deepgram-speech.d.ts +2 -2
  52. package/dist/protocols/deepgram-transcription.d.ts +2 -2
  53. package/dist/protocols/elevenlabs-speech.d.ts +2 -2
  54. package/dist/protocols/elevenlabs-transcription.d.ts +2 -2
  55. package/dist/protocols/gemini.d.ts +3 -0
  56. package/dist/protocols/gemini.js +54 -72
  57. package/dist/protocols/google-embed-content.d.ts +34 -0
  58. package/dist/protocols/google-embed-content.js +110 -0
  59. package/dist/protocols/google-images.d.ts +2 -2
  60. package/dist/protocols/google-interactions.d.ts +3 -4
  61. package/dist/protocols/google-interactions.js +44 -30
  62. package/dist/protocols/google-speech.d.ts +2 -2
  63. package/dist/protocols/google-transcription.d.ts +2 -2
  64. package/dist/protocols/google-vertex-predict-embeddings.d.ts +18 -0
  65. package/dist/protocols/google-vertex-predict-embeddings.js +74 -0
  66. package/dist/protocols/google-video.d.ts +2 -2
  67. package/dist/protocols/index.d.ts +3 -0
  68. package/dist/protocols/index.js +3 -0
  69. package/dist/protocols/meta-images.d.ts +2 -2
  70. package/dist/protocols/meta-responses.js +26 -23
  71. package/dist/protocols/minimax-images.d.ts +2 -2
  72. package/dist/protocols/mistral-chat.js +7 -10
  73. package/dist/protocols/open-responses-channel.js +6 -19
  74. package/dist/protocols/open-responses-continuation.d.ts +1 -5
  75. package/dist/protocols/open-responses-continuation.js +1 -3
  76. package/dist/protocols/open-responses.d.ts +2 -22
  77. package/dist/protocols/open-responses.js +41 -23
  78. package/dist/protocols/openai-chat.d.ts +27 -23
  79. package/dist/protocols/openai-chat.js +62 -57
  80. package/dist/protocols/openai-compatible-chat.d.ts +2 -1
  81. package/dist/protocols/openai-compatible-responses.d.ts +2 -2
  82. package/dist/protocols/openai-compatible-responses.js +1 -1
  83. package/dist/protocols/openai-decisions.js +15 -2
  84. package/dist/protocols/openai-embeddings.d.ts +16 -0
  85. package/dist/protocols/openai-embeddings.js +76 -0
  86. package/dist/protocols/openai-images.d.ts +2 -2
  87. package/dist/protocols/openai-responses.js +10 -29
  88. package/dist/protocols/openai-speech.d.ts +2 -2
  89. package/dist/protocols/openai-transcription.d.ts +2 -2
  90. package/dist/protocols/runway-video.d.ts +2 -2
  91. package/dist/protocols/shared.d.ts +14 -7
  92. package/dist/protocols/shared.js +40 -15
  93. package/dist/protocols/system-one.d.ts +4 -4
  94. package/dist/protocols/system-one.js +8 -1
  95. package/dist/protocols/utils/bedrock-cache.js +2 -5
  96. package/dist/protocols/utils/bedrock-media.d.ts +0 -3
  97. package/dist/protocols/utils/cache.d.ts +3 -0
  98. package/dist/protocols/utils/cache.js +15 -2
  99. package/dist/protocols/utils/image-sizing.d.ts +1 -1
  100. package/dist/protocols/utils/responses-checkpoint.js +1 -1
  101. package/dist/protocols/utils/responses-compaction.d.ts +1 -1
  102. package/dist/protocols/utils/responses-compaction.js +6 -5
  103. package/dist/protocols/utils/responses-hosted-tools.d.ts +97 -1
  104. package/dist/protocols/utils/responses-hosted-tools.js +31 -0
  105. package/dist/protocols/utils/tool-stream.d.ts +5 -271
  106. package/dist/protocols/utils/tool-stream.js +3 -13
  107. package/dist/protocols/venice-chat.d.ts +7 -1
  108. package/dist/protocols/venice-chat.js +4 -4
  109. package/dist/protocols/xai-images.d.ts +2 -2
  110. package/dist/protocols/xai-responses.js +5 -25
  111. package/dist/protocols/xai-video.d.ts +2 -2
  112. package/dist/protocols/zai-chat.d.ts +9 -1
  113. package/dist/protocols/zai-chat.js +1 -1
  114. package/dist/protocols/zai-images.d.ts +2 -2
  115. package/dist/protocols/zai-messages.js +3 -3
  116. package/dist/provider-error.d.ts +0 -1
  117. package/dist/provider-error.js +7 -80
  118. package/dist/providers/alibaba/embeddings.d.ts +2 -0
  119. package/dist/providers/alibaba/embeddings.js +1 -0
  120. package/dist/providers/alibaba.d.ts +70 -4
  121. package/dist/providers/alibaba.js +20 -2
  122. package/dist/providers/amazon-bedrock-mantle.d.ts +7 -3
  123. package/dist/providers/amazon-bedrock-mantle.js +6 -3
  124. package/dist/providers/amazon-bedrock.d.ts +6 -7
  125. package/dist/providers/amazon-bedrock.js +1 -1
  126. package/dist/providers/anthropic-compatible.d.ts +7 -8
  127. package/dist/providers/anthropic-compatible.js +2 -5
  128. package/dist/providers/anthropic.d.ts +8 -9
  129. package/dist/providers/anthropic.js +2 -7
  130. package/dist/providers/assemblyai.d.ts +2 -2
  131. package/dist/providers/assemblyai.js +2 -7
  132. package/dist/providers/azure/embeddings.d.ts +2 -0
  133. package/dist/providers/azure/embeddings.js +1 -0
  134. package/dist/providers/azure/messages.d.ts +2 -0
  135. package/dist/providers/azure/messages.js +1 -0
  136. package/dist/providers/azure.d.ts +325 -7
  137. package/dist/providers/azure.js +40 -9
  138. package/dist/providers/baseten.d.ts +7 -5
  139. package/dist/providers/baseten.js +7 -21
  140. package/dist/providers/cartesia.d.ts +1 -1
  141. package/dist/providers/cerebras.d.ts +7 -5
  142. package/dist/providers/cerebras.js +4 -15
  143. package/dist/providers/cloudflare-ai-gateway.d.ts +23 -13
  144. package/dist/providers/cloudflare-ai-gateway.js +28 -40
  145. package/dist/providers/cloudflare-shared.d.ts +9 -0
  146. package/dist/providers/cloudflare-shared.js +25 -0
  147. package/dist/providers/cloudflare-workers-ai.d.ts +6 -4
  148. package/dist/providers/cloudflare-workers-ai.js +4 -20
  149. package/dist/providers/cohere/chat.js +2 -7
  150. package/dist/providers/cohere/embeddings.d.ts +2 -0
  151. package/dist/providers/cohere/embeddings.js +1 -0
  152. package/dist/providers/cohere.d.ts +14 -5
  153. package/dist/providers/cohere.js +23 -13
  154. package/dist/providers/deepgram.d.ts +2 -2
  155. package/dist/providers/deepgram.js +2 -7
  156. package/dist/providers/deepinfra/embeddings.d.ts +2 -0
  157. package/dist/providers/deepinfra/embeddings.js +1 -0
  158. package/dist/providers/deepinfra.d.ts +10 -5
  159. package/dist/providers/deepinfra.js +20 -14
  160. package/dist/providers/deepseek.d.ts +7 -5
  161. package/dist/providers/deepseek.js +3 -14
  162. package/dist/providers/digitalocean/embeddings.d.ts +2 -0
  163. package/dist/providers/digitalocean/embeddings.js +1 -0
  164. package/dist/providers/digitalocean.d.ts +18 -5
  165. package/dist/providers/digitalocean.js +28 -14
  166. package/dist/providers/elevenlabs.d.ts +2 -2
  167. package/dist/providers/elevenlabs.js +2 -7
  168. package/dist/providers/fireworks/embeddings.d.ts +2 -0
  169. package/dist/providers/fireworks/embeddings.js +1 -0
  170. package/dist/providers/fireworks.d.ts +10 -5
  171. package/dist/providers/fireworks.js +17 -14
  172. package/dist/providers/google/embeddings.d.ts +2 -0
  173. package/dist/providers/google/embeddings.js +1 -0
  174. package/dist/providers/google/interactions.d.ts +1 -1
  175. package/dist/providers/google/interactions.js +2 -7
  176. package/dist/providers/google-vertex/embeddings.d.ts +2 -0
  177. package/dist/providers/google-vertex/embeddings.js +1 -0
  178. package/dist/providers/google-vertex-chat.d.ts +4 -3
  179. package/dist/providers/google-vertex-chat.js +3 -29
  180. package/dist/providers/google-vertex-interactions.d.ts +3 -3
  181. package/dist/providers/google-vertex-messages.d.ts +3 -3
  182. package/dist/providers/google-vertex-messages.js +3 -29
  183. package/dist/providers/google-vertex-mistral.d.ts +3 -3
  184. package/dist/providers/google-vertex-mistral.js +3 -29
  185. package/dist/providers/google-vertex-responses.d.ts +3 -3
  186. package/dist/providers/google-vertex-responses.js +4 -30
  187. package/dist/providers/google-vertex-shared.d.ts +31 -0
  188. package/dist/providers/google-vertex-shared.js +25 -0
  189. package/dist/providers/google-vertex.d.ts +10 -3
  190. package/dist/providers/google-vertex.js +52 -0
  191. package/dist/providers/google.d.ts +21 -13
  192. package/dist/providers/google.js +23 -19
  193. package/dist/providers/groq.d.ts +10 -5
  194. package/dist/providers/groq.js +4 -15
  195. package/dist/providers/meta.d.ts +6 -5
  196. package/dist/providers/meta.js +10 -23
  197. package/dist/providers/minimax/chat.js +2 -7
  198. package/dist/providers/minimax/responses.js +2 -7
  199. package/dist/providers/minimax.d.ts +6 -5
  200. package/dist/providers/minimax.js +7 -22
  201. package/dist/providers/mistral.d.ts +10 -11
  202. package/dist/providers/mistral.js +3 -14
  203. package/dist/providers/moonshot/messages.js +2 -7
  204. package/dist/providers/moonshot/responses.js +2 -7
  205. package/dist/providers/moonshot.d.ts +6 -5
  206. package/dist/providers/moonshot.js +4 -16
  207. package/dist/providers/openai/embeddings.d.ts +2 -0
  208. package/dist/providers/openai/embeddings.js +1 -0
  209. package/dist/providers/openai-compatible/embeddings.d.ts +2 -0
  210. package/dist/providers/openai-compatible/embeddings.js +1 -0
  211. package/dist/providers/openai-compatible-responses.d.ts +6 -7
  212. package/dist/providers/openai-compatible-responses.js +2 -8
  213. package/dist/providers/openai-compatible.d.ts +10 -7
  214. package/dist/providers/openai-compatible.js +17 -10
  215. package/dist/providers/openai.d.ts +11 -4
  216. package/dist/providers/openai.js +17 -3
  217. package/dist/providers/opencode.d.ts +4 -4
  218. package/dist/providers/opencode.js +6 -2
  219. package/dist/providers/openrouter/embeddings.d.ts +2 -0
  220. package/dist/providers/openrouter/embeddings.js +1 -0
  221. package/dist/providers/openrouter.d.ts +24 -5
  222. package/dist/providers/openrouter.js +31 -24
  223. package/dist/providers/runway.d.ts +1 -1
  224. package/dist/providers/settings.d.ts +40 -0
  225. package/dist/providers/settings.js +19 -0
  226. package/dist/providers/togetherai.d.ts +7 -5
  227. package/dist/providers/togetherai.js +5 -15
  228. package/dist/providers/typesafe-ai.d.ts +4 -4
  229. package/dist/providers/typesafe-ai.js +6 -2
  230. package/dist/providers/venice.d.ts +5 -4
  231. package/dist/providers/venice.js +6 -2
  232. package/dist/providers/vercel-ai-gateway/embeddings.d.ts +2 -0
  233. package/dist/providers/vercel-ai-gateway/embeddings.js +1 -0
  234. package/dist/providers/vercel-ai-gateway.d.ts +9 -5
  235. package/dist/providers/vercel-ai-gateway.js +30 -29
  236. package/dist/providers/xai.d.ts +5 -4
  237. package/dist/providers/xai.js +4 -12
  238. package/dist/providers/zai-coding-plan/messages.js +2 -7
  239. package/dist/providers/zai-coding-plan/responses.js +2 -7
  240. package/dist/providers/zai-coding-plan.d.ts +6 -5
  241. package/dist/providers/zai-coding-plan.js +8 -15
  242. package/dist/providers/zai.d.ts +6 -5
  243. package/dist/providers/zai.js +10 -22
  244. package/dist/public.d.ts +14 -0
  245. package/dist/public.js +6 -0
  246. package/dist/route/auth-options.d.ts +9 -5
  247. package/dist/route/auth-options.js +10 -7
  248. package/dist/route/client.d.ts +50 -37
  249. package/dist/route/client.js +42 -53
  250. package/dist/route/decision.d.ts +8 -8
  251. package/dist/route/decision.js +3 -3
  252. package/dist/route/embedding.d.ts +61 -0
  253. package/dist/route/embedding.js +88 -0
  254. package/dist/route/executor.d.ts +5 -0
  255. package/dist/route/executor.js +10 -0
  256. package/dist/route/index.d.ts +5 -7
  257. package/dist/route/index.js +1 -1
  258. package/dist/route/media.d.ts +7 -11
  259. package/dist/route/media.js +22 -26
  260. package/dist/route/transport/http.js +6 -5
  261. package/dist/route/transport/websocket.js +7 -1
  262. package/dist/schema/errors.d.ts +16 -17
  263. package/dist/schema/errors.js +63 -12
  264. package/dist/schema/events.d.ts +2563 -2954
  265. package/dist/schema/events.js +54 -109
  266. package/dist/schema/messages.d.ts +194 -137
  267. package/dist/schema/messages.js +66 -83
  268. package/dist/schema/options.d.ts +112 -65
  269. package/dist/schema/options.js +52 -101
  270. package/dist/speech-client.d.ts +7 -7
  271. package/dist/speech.d.ts +306 -316
  272. package/dist/speech.js +16 -14
  273. package/dist/testing.d.ts +31 -175
  274. package/dist/testing.js +60 -5
  275. package/dist/tool-history.d.ts +1 -1
  276. package/dist/tool-history.js +3 -10
  277. package/dist/tool-runtime.d.ts +9 -2
  278. package/dist/tool-runtime.js +17 -31
  279. package/dist/tool.d.ts +39 -43
  280. package/dist/tool.js +16 -26
  281. package/dist/transcription-client.d.ts +7 -7
  282. package/dist/transcription.d.ts +314 -265
  283. package/dist/transcription.js +16 -14
  284. package/dist/utils/provider-codes.d.ts +3 -0
  285. package/dist/utils/provider-codes.js +41 -0
  286. package/dist/video-client.d.ts +7 -7
  287. package/dist/video-client.js +1 -1
  288. package/dist/video.d.ts +269 -287
  289. package/dist/video.js +16 -14
  290. package/package.json +309 -257
  291. package/dist/experimental/testing.d.ts +0 -3
  292. package/dist/experimental/testing.js +0 -3
  293. package/dist/testing/decision.d.ts +0 -16
  294. package/dist/testing/decision.js +0 -20
  295. package/dist/testing/image.d.ts +0 -14
  296. package/dist/testing/image.js +0 -12
  297. package/dist/testing/media.d.ts +0 -18
  298. package/dist/testing/media.js +0 -36
  299. package/dist/testing/script.d.ts +0 -28
  300. package/dist/testing/script.js +0 -60
  301. package/dist/testing/speech.d.ts +0 -14
  302. package/dist/testing/speech.js +0 -12
  303. package/dist/testing/transcription.d.ts +0 -14
  304. package/dist/testing/transcription.js +0 -12
  305. package/dist/testing/video.d.ts +0 -14
  306. package/dist/testing/video.js +0 -12
package/dist/image.js CHANGED
@@ -3,7 +3,7 @@ import { Generation, ProgressEvent, QueuedEvent } from "./generation.js";
3
3
  import { Media } from "./media.js";
4
4
  import { MediaModel, composeRoute, tryRequest } from "./media-model.js";
5
5
  import { MediaRoute } from "./route/media.js";
6
- import { AIError, HttpOptions, MediaUsage, ProviderMetadata, ProviderOptions } from "./schema/index.js";
6
+ import { AIError, MediaUsage, ProviderMetadata, ProviderOptions, } from "./schema/index.js";
7
7
  import { ImageClient, Service } from "./image-client.js";
8
8
  export class ImageModel extends MediaModel {
9
9
  static fromRoute(route, input) {
@@ -20,18 +20,15 @@ export const ImageModelSchema = Schema.declare((value) => value instanceof Image
20
20
  expected: "Image.Model",
21
21
  });
22
22
  export const ImageAspectRatio = Media.AspectRatio;
23
- export class ImageRequest extends Schema.Class("Image.Request")({
23
+ const ImageRequestSchema = Schema.Struct({
24
24
  model: ImageModelSchema,
25
25
  prompt: Schema.String,
26
- /** Edit sources or style/subject references, in order. */
27
26
  images: Schema.optional(Schema.Array(Media.AssetSchema)),
28
27
  n: Schema.optional(Schema.Int),
29
28
  aspect: Schema.optional(ImageAspectRatio),
30
29
  resolution: Schema.optional(Schema.String),
31
30
  providerOptions: Schema.optional(ProviderOptions),
32
- http: Schema.optional(HttpOptions),
33
- }) {
34
- }
31
+ });
35
32
  // ---------------------------------------------------------------------------
36
33
  // Response and events
37
34
  // ---------------------------------------------------------------------------
@@ -40,9 +37,6 @@ export class ImageResponse extends Schema.Class("Image.Response")({
40
37
  usage: Schema.optional(MediaUsage),
41
38
  providerMetadata: Schema.optional(ProviderMetadata),
42
39
  }) {
43
- get image() {
44
- return this.images[0];
45
- }
46
40
  }
47
41
  /** The `index`-th lower-fidelity preview of an image still generating; the `image` event supersedes it. */
48
42
  export const ImagePartialEvent = Schema.Struct({
@@ -87,15 +81,20 @@ const collectResponse = (events) => {
87
81
  providerMetadata: finish.providerMetadata,
88
82
  }));
89
83
  };
90
- export function request(input) {
91
- if (input instanceof ImageRequest)
92
- return input;
93
- return new ImageRequest({
94
- ...input,
95
- http: HttpOptions.make(input.http),
96
- });
97
- }
98
- const requestEffect = (input) => tryRequest(() => request(input));
84
+ // ---------------------------------------------------------------------------
85
+ // Request-shaped call API
86
+ // ---------------------------------------------------------------------------
87
+ /** Normalize image request input into a plain `ImageRequest`. */
88
+ export const request = (input) => ({
89
+ ...input,
90
+ images: input.images?.map((image) => Media.make(image)),
91
+ });
92
+ const validate = Schema.decodeUnknownSync(ImageRequestSchema);
93
+ const requestEffect = (input) => tryRequest(() => {
94
+ const normalized = request(input);
95
+ validate(normalized);
96
+ return normalized;
97
+ });
99
98
  export function generate(input, options) {
100
99
  return requestEffect(input).pipe(Effect.flatMap((request) => ImageClient.generate(request, options)));
101
100
  }
package/dist/index.d.ts CHANGED
@@ -1,28 +1,27 @@
1
1
  import { Effect, Layer, Schema } from "effect";
2
2
  import { AIClient } from "./ai-client.js";
3
3
  import { type DecisionModel, type DecisionQuestions, type DecisionRequestInput } from "./decision.js";
4
+ import { type EmbeddingModel, type EmbeddingRequestInput } from "./embedding.js";
4
5
  import type { AwaitOptions, Event, Snapshot } from "./generation.js";
5
6
  import { type ImageModel, type ImageRequest, type ImageRequestInput } from "./image.js";
6
7
  import { LLM } from "./llm.js";
7
8
  import { Media } from "./media.js";
8
9
  import { type CheckpointRequest, type CompactionRequest, type EndpointCompactOptions, type StreamOptions, type TriggerCompactOptions } from "./route/client.js";
9
10
  import { RequestExecutor } from "./route/executor.js";
10
- import { LanguageModel, type CompactionCheckpointResponse, type CompactionResponse, type LLMRequest } from "./schema/index.js";
11
- import type { GenerateObjectDynamicOptions, GenerateObjectOptions, GenerateObjectResponse, LoopInput, RequestInput } from "./llm.js";
11
+ import { LanguageModel, type CompactionCheckpointResponse, type CompactionResponse, type LLMEvent, type LLMResponse } from "./schema/index.js";
12
+ import type { LoopObjectEvent, ObjectEvent, ObjectResponse, OutputSchema, OutputType, LLMLoopInput, LLMRequestInput } from "./llm.js";
12
13
  import { type SpeechModel, type SpeechRequest, type SpeechRequestInput } from "./speech.js";
13
14
  import { type TranscriptionModel, type TranscriptionRequest, type TranscriptionRequestInput } from "./transcription.js";
14
- import type { NoExecute, ToolExecuteContext, ToolOptions, ToolSchema } from "./tool.js";
15
+ import type { NoExecute, ToolExecuteContext, ToolInput, ToolInputType, ToolOptions, ToolSchema } from "./tool.js";
15
16
  import { type VideoModel, type VideoRequest, type VideoRequestInput } from "./video.js";
16
17
  /**
17
18
  * Promise-first entrypoint for scripts and non-Effect callers. One `ManagedRuntime` hosts the LLM, image, video, speech,
18
- * transcription and decision clients over a request executor; every method runs the corresponding Effect API and rethrows
19
- * `AIError` unchanged. `file` and `write` load `node:fs/promises` on first use, so importing this module does not.
19
+ * transcription, decision and embedding clients over a request executor; every method runs the corresponding Effect API
20
+ * and rethrows `AIError` unchanged. `file` and `write` load `node:fs/promises` on first use, so importing this module does not.
20
21
  */
21
- export interface Options<R = never> {
22
+ export interface Options {
22
23
  /** Executor layer; defaults to `RequestExecutor.fetchLayer`. Inject a recorder or `RequestExecutor.middleware(fn)` here. */
23
24
  readonly layer?: Layer.Layer<RequestExecutor.Service>;
24
- /** Replaces default clients, for example with `TestImage.testLayer()`; its other services are available to `run`. */
25
- readonly clients?: Layer.Layer<R>;
26
25
  }
27
26
  export interface RunOptions {
28
27
  readonly signal?: AbortSignal;
@@ -45,8 +44,8 @@ export type GenerationHandle<Response> = Snapshot & {
45
44
  readonly refresh: (options?: RunOptions) => Promise<GenerationHandle<Response>>;
46
45
  readonly cancel: (options?: RunOptions) => Promise<void>;
47
46
  };
48
- export declare const make: <R = never>(options?: Options<R>) => {
49
- run: <A, E>(effect: Effect.Effect<A, E, Services | R>, options?: RunOptions) => Promise<A>;
47
+ export declare const make: (options?: Options) => {
48
+ run: <A, E>(effect: Effect.Effect<A, E, Services>, options?: RunOptions) => Promise<A>;
50
49
  /** Decoded asset bytes, downloading `url` sources through the executor. */
51
50
  bytes: (asset: Media.Asset, options?: RunOptions) => Promise<Uint8Array<ArrayBufferLike>>;
52
51
  base64: (asset: Media.Asset, options?: RunOptions) => Promise<string>;
@@ -57,451 +56,26 @@ export declare const make: <R = never>(options?: Options<R>) => {
57
56
  /** Write an asset's bytes like `Media.write`, downloading `url` sources through the executor. */
58
57
  write: (asset: Media.Asset, path: string, options?: RunOptions) => Promise<void>;
59
58
  request: typeof LLM.request;
60
- generate: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: StreamOptions & RunOptions) => Promise<import("./index.js").LLMResponse>;
61
- stream: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: StreamOptions & RunOptions) => AsyncIterable<{
62
- readonly type: "step-start";
63
- readonly index: number;
64
- } | {
65
- readonly type: "raw";
66
- readonly data: unknown;
67
- } | {
68
- readonly type: "text-start";
69
- readonly id: string;
70
- readonly providerMetadata?: {
71
- readonly [x: string]: {
72
- readonly [x: string]: unknown;
73
- };
74
- } | undefined;
75
- } | {
76
- readonly type: "text-delta";
77
- readonly id: string;
78
- readonly text: string;
79
- readonly providerMetadata?: {
80
- readonly [x: string]: {
81
- readonly [x: string]: unknown;
82
- };
83
- } | undefined;
84
- } | {
85
- readonly type: "text-end";
86
- readonly id: string;
87
- readonly text?: string | undefined;
88
- readonly providerMetadata?: {
89
- readonly [x: string]: {
90
- readonly [x: string]: unknown;
91
- };
92
- } | undefined;
93
- } | {
94
- readonly type: "reasoning-start";
95
- readonly id: string;
96
- readonly providerMetadata?: {
97
- readonly [x: string]: {
98
- readonly [x: string]: unknown;
99
- };
100
- } | undefined;
101
- } | {
102
- readonly type: "reasoning-delta";
103
- readonly id: string;
104
- readonly text: string;
105
- readonly providerMetadata?: {
106
- readonly [x: string]: {
107
- readonly [x: string]: unknown;
108
- };
109
- } | undefined;
110
- } | {
111
- readonly type: "reasoning-end";
112
- readonly id: string;
113
- readonly text?: string | undefined;
114
- readonly providerMetadata?: {
115
- readonly [x: string]: {
116
- readonly [x: string]: unknown;
117
- };
118
- } | undefined;
119
- } | {
120
- readonly type: "tool-input-start";
121
- readonly id: string;
122
- readonly name: string;
123
- readonly namespace?: string | undefined;
124
- readonly providerExecuted?: boolean | undefined;
125
- readonly providerMetadata?: {
126
- readonly [x: string]: {
127
- readonly [x: string]: unknown;
128
- };
129
- } | undefined;
130
- } | {
131
- readonly type: "tool-input-delta";
132
- readonly id: string;
133
- readonly name: string;
134
- readonly namespace?: string | undefined;
135
- readonly text: string;
136
- readonly input?: unknown;
137
- } | {
138
- readonly type: "tool-input-end";
139
- readonly id: string;
140
- readonly name: string;
141
- readonly namespace?: string | undefined;
142
- readonly providerMetadata?: {
143
- readonly [x: string]: {
144
- readonly [x: string]: unknown;
145
- };
146
- } | undefined;
147
- } | {
148
- readonly type: "tool-input-error";
149
- readonly id: string;
150
- readonly name: string;
151
- readonly namespace?: string | undefined;
152
- readonly raw: string;
153
- } | {
154
- readonly type: "tool-call";
155
- readonly id: string;
156
- readonly name: string;
157
- readonly namespace?: string | undefined;
158
- readonly input: unknown;
159
- readonly providerExecuted?: boolean | undefined;
160
- readonly providerMetadata?: {
161
- readonly [x: string]: {
162
- readonly [x: string]: unknown;
163
- };
164
- } | undefined;
165
- } | {
166
- readonly type: "tool-result";
167
- readonly id: string;
168
- readonly name: string;
169
- readonly namespace?: string | undefined;
170
- readonly result: {
171
- readonly type: "json";
172
- readonly value: unknown;
173
- } | {
174
- readonly type: "text";
175
- readonly value: unknown;
176
- } | {
177
- readonly type: "error";
178
- readonly value: unknown;
179
- } | {
180
- readonly type: "content";
181
- readonly value: readonly ({
182
- readonly type: "text";
183
- readonly text: string;
184
- } | {
185
- readonly type: "file";
186
- readonly uri: string;
187
- readonly mime: string;
188
- readonly name?: string | undefined;
189
- })[];
190
- };
191
- readonly output?: {
192
- readonly structured: unknown;
193
- readonly content: readonly ({
194
- readonly type: "text";
195
- readonly text: string;
196
- } | {
197
- readonly type: "file";
198
- readonly uri: string;
199
- readonly mime: string;
200
- readonly name?: string | undefined;
201
- })[];
202
- } | undefined;
203
- readonly providerExecuted?: boolean | undefined;
204
- readonly providerMetadata?: {
205
- readonly [x: string]: {
206
- readonly [x: string]: unknown;
207
- };
208
- } | undefined;
209
- } | {
210
- readonly type: "tool-error";
211
- readonly id: string;
212
- readonly name: string;
213
- readonly namespace?: string | undefined;
214
- readonly message: string;
215
- readonly error?: unknown;
216
- readonly providerMetadata?: {
217
- readonly [x: string]: {
218
- readonly [x: string]: unknown;
219
- };
220
- } | undefined;
221
- } | {
222
- readonly type: "step-finish";
223
- readonly index: number;
224
- readonly reason: {
225
- readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
226
- readonly raw?: string | undefined;
227
- readonly category?: string | undefined;
228
- readonly explanation?: string | undefined;
229
- };
230
- readonly usage?: import("./index.js").Usage | undefined;
231
- readonly providerMetadata?: {
232
- readonly [x: string]: {
233
- readonly [x: string]: unknown;
234
- };
235
- } | undefined;
236
- } | {
237
- readonly type: "finish";
238
- readonly reason: {
239
- readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
240
- readonly raw?: string | undefined;
241
- readonly category?: string | undefined;
242
- readonly explanation?: string | undefined;
243
- };
244
- readonly usage?: import("./index.js").Usage | undefined;
245
- readonly providerMetadata?: {
246
- readonly [x: string]: {
247
- readonly [x: string]: unknown;
248
- };
249
- } | undefined;
250
- } | {
251
- readonly type: "media";
252
- readonly media: Media.Asset;
253
- readonly providerMetadata?: {
254
- readonly [x: string]: {
255
- readonly [x: string]: unknown;
256
- };
257
- } | undefined;
258
- } | {
259
- readonly type: "provider-error";
260
- readonly message: string;
261
- readonly classification?: "context-overflow" | "payload-too-large" | undefined;
262
- readonly providerMetadata?: {
263
- readonly [x: string]: {
264
- readonly [x: string]: unknown;
265
- };
266
- } | undefined;
267
- } | ({
268
- readonly type: "compaction";
269
- readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
270
- readonly id?: string | undefined;
271
- readonly encrypted?: string | undefined;
272
- readonly text?: string | null | undefined;
273
- } & ({
274
- readonly encrypted: string;
275
- readonly text?: never;
276
- } | {
277
- readonly text: string | null;
278
- readonly encrypted?: never;
279
- }))>;
59
+ generate: {
60
+ <const Model extends LanguageModel, S extends OutputSchema>(input: LLMRequestInput<Model> & {
61
+ readonly schema: S;
62
+ }, options?: StreamOptions & RunOptions): Promise<ObjectResponse<OutputType<S>>>;
63
+ <const Model extends LanguageModel>(input: LLMRequestInput<Model>, options?: StreamOptions & RunOptions): Promise<LLMResponse>;
64
+ };
65
+ stream: {
66
+ <const Model extends LanguageModel, S extends OutputSchema>(input: LLMRequestInput<Model> & {
67
+ readonly schema: S;
68
+ }, options?: StreamOptions & RunOptions): AsyncIterable<ObjectEvent<OutputType<S>>>;
69
+ <const Model extends LanguageModel>(input: LLMRequestInput<Model>, options?: StreamOptions & RunOptions): AsyncIterable<LLMEvent>;
70
+ };
280
71
  /** Stream model calls, running their tool calls, until the model stops calling tools or `until` is true. */
281
- loop: <const Model extends LanguageModel>(input: LoopInput<Model>, options?: StreamOptions & RunOptions) => AsyncIterable<{
282
- readonly type: "step-start";
283
- readonly index: number;
284
- } | {
285
- readonly type: "raw";
286
- readonly data: unknown;
287
- } | {
288
- readonly type: "text-start";
289
- readonly id: string;
290
- readonly providerMetadata?: {
291
- readonly [x: string]: {
292
- readonly [x: string]: unknown;
293
- };
294
- } | undefined;
295
- } | {
296
- readonly type: "text-delta";
297
- readonly id: string;
298
- readonly text: string;
299
- readonly providerMetadata?: {
300
- readonly [x: string]: {
301
- readonly [x: string]: unknown;
302
- };
303
- } | undefined;
304
- } | {
305
- readonly type: "text-end";
306
- readonly id: string;
307
- readonly text?: string | undefined;
308
- readonly providerMetadata?: {
309
- readonly [x: string]: {
310
- readonly [x: string]: unknown;
311
- };
312
- } | undefined;
313
- } | {
314
- readonly type: "reasoning-start";
315
- readonly id: string;
316
- readonly providerMetadata?: {
317
- readonly [x: string]: {
318
- readonly [x: string]: unknown;
319
- };
320
- } | undefined;
321
- } | {
322
- readonly type: "reasoning-delta";
323
- readonly id: string;
324
- readonly text: string;
325
- readonly providerMetadata?: {
326
- readonly [x: string]: {
327
- readonly [x: string]: unknown;
328
- };
329
- } | undefined;
330
- } | {
331
- readonly type: "reasoning-end";
332
- readonly id: string;
333
- readonly text?: string | undefined;
334
- readonly providerMetadata?: {
335
- readonly [x: string]: {
336
- readonly [x: string]: unknown;
337
- };
338
- } | undefined;
339
- } | {
340
- readonly type: "tool-input-start";
341
- readonly id: string;
342
- readonly name: string;
343
- readonly namespace?: string | undefined;
344
- readonly providerExecuted?: boolean | undefined;
345
- readonly providerMetadata?: {
346
- readonly [x: string]: {
347
- readonly [x: string]: unknown;
348
- };
349
- } | undefined;
350
- } | {
351
- readonly type: "tool-input-delta";
352
- readonly id: string;
353
- readonly name: string;
354
- readonly namespace?: string | undefined;
355
- readonly text: string;
356
- readonly input?: unknown;
357
- } | {
358
- readonly type: "tool-input-end";
359
- readonly id: string;
360
- readonly name: string;
361
- readonly namespace?: string | undefined;
362
- readonly providerMetadata?: {
363
- readonly [x: string]: {
364
- readonly [x: string]: unknown;
365
- };
366
- } | undefined;
367
- } | {
368
- readonly type: "tool-input-error";
369
- readonly id: string;
370
- readonly name: string;
371
- readonly namespace?: string | undefined;
372
- readonly raw: string;
373
- } | {
374
- readonly type: "tool-call";
375
- readonly id: string;
376
- readonly name: string;
377
- readonly namespace?: string | undefined;
378
- readonly input: unknown;
379
- readonly providerExecuted?: boolean | undefined;
380
- readonly providerMetadata?: {
381
- readonly [x: string]: {
382
- readonly [x: string]: unknown;
383
- };
384
- } | undefined;
385
- } | {
386
- readonly type: "tool-result";
387
- readonly id: string;
388
- readonly name: string;
389
- readonly namespace?: string | undefined;
390
- readonly result: {
391
- readonly type: "json";
392
- readonly value: unknown;
393
- } | {
394
- readonly type: "text";
395
- readonly value: unknown;
396
- } | {
397
- readonly type: "error";
398
- readonly value: unknown;
399
- } | {
400
- readonly type: "content";
401
- readonly value: readonly ({
402
- readonly type: "text";
403
- readonly text: string;
404
- } | {
405
- readonly type: "file";
406
- readonly uri: string;
407
- readonly mime: string;
408
- readonly name?: string | undefined;
409
- })[];
410
- };
411
- readonly output?: {
412
- readonly structured: unknown;
413
- readonly content: readonly ({
414
- readonly type: "text";
415
- readonly text: string;
416
- } | {
417
- readonly type: "file";
418
- readonly uri: string;
419
- readonly mime: string;
420
- readonly name?: string | undefined;
421
- })[];
422
- } | undefined;
423
- readonly providerExecuted?: boolean | undefined;
424
- readonly providerMetadata?: {
425
- readonly [x: string]: {
426
- readonly [x: string]: unknown;
427
- };
428
- } | undefined;
429
- } | {
430
- readonly type: "tool-error";
431
- readonly id: string;
432
- readonly name: string;
433
- readonly namespace?: string | undefined;
434
- readonly message: string;
435
- readonly error?: unknown;
436
- readonly providerMetadata?: {
437
- readonly [x: string]: {
438
- readonly [x: string]: unknown;
439
- };
440
- } | undefined;
441
- } | {
442
- readonly type: "step-finish";
443
- readonly index: number;
444
- readonly reason: {
445
- readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
446
- readonly raw?: string | undefined;
447
- readonly category?: string | undefined;
448
- readonly explanation?: string | undefined;
449
- };
450
- readonly usage?: import("./index.js").Usage | undefined;
451
- readonly providerMetadata?: {
452
- readonly [x: string]: {
453
- readonly [x: string]: unknown;
454
- };
455
- } | undefined;
456
- } | {
457
- readonly type: "finish";
458
- readonly reason: {
459
- readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
460
- readonly raw?: string | undefined;
461
- readonly category?: string | undefined;
462
- readonly explanation?: string | undefined;
463
- };
464
- readonly usage?: import("./index.js").Usage | undefined;
465
- readonly providerMetadata?: {
466
- readonly [x: string]: {
467
- readonly [x: string]: unknown;
468
- };
469
- } | undefined;
470
- } | {
471
- readonly type: "media";
472
- readonly media: Media.Asset;
473
- readonly providerMetadata?: {
474
- readonly [x: string]: {
475
- readonly [x: string]: unknown;
476
- };
477
- } | undefined;
478
- } | {
479
- readonly type: "provider-error";
480
- readonly message: string;
481
- readonly classification?: "context-overflow" | "payload-too-large" | undefined;
482
- readonly providerMetadata?: {
483
- readonly [x: string]: {
484
- readonly [x: string]: unknown;
485
- };
486
- } | undefined;
487
- } | ({
488
- readonly type: "compaction";
489
- readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
490
- readonly id?: string | undefined;
491
- readonly encrypted?: string | undefined;
492
- readonly text?: string | null | undefined;
493
- } & ({
494
- readonly encrypted: string;
495
- readonly text?: never;
496
- } | {
497
- readonly text: string | null;
498
- readonly encrypted?: never;
499
- }))>;
500
- /** Decode the model's output against `schema` (or `jsonSchema`, unvalidated). */
501
- generateObject: {
502
- <const Model extends LanguageModel, S extends ToolSchema<any>>(input: GenerateObjectOptions<S, Model>, options?: RunOptions): Promise<GenerateObjectResponse<Schema.Schema.Type<S>>>;
503
- <const Model extends LanguageModel>(input: GenerateObjectDynamicOptions<Model>, options?: RunOptions): Promise<GenerateObjectResponse<unknown>>;
72
+ loop: {
73
+ <const Model extends LanguageModel, S extends OutputSchema>(input: LLMLoopInput<Model> & {
74
+ readonly schema: S;
75
+ }, options?: StreamOptions & RunOptions): AsyncIterable<LoopObjectEvent<OutputType<S>>>;
76
+ <const Model extends LanguageModel>(input: LLMLoopInput<Model>, options?: StreamOptions & RunOptions): AsyncIterable<LLMEvent>;
504
77
  };
78
+ collect: <Event extends LLMEvent>(events: AsyncIterable<Event>, options?: RunOptions) => Promise<LLM.CollectResult<Event>>;
505
79
  /** Compact a Responses request: a replacement window, or a checkpoint with `mechanism: "trigger"`. */
506
80
  compact: {
507
81
  (request: CheckpointRequest, options: TriggerCompactOptions & RunOptions): Promise<CompactionCheckpointResponse>;
@@ -563,6 +137,10 @@ export declare const make: <R = never>(options?: Options<R>) => {
563
137
  request: typeof import("./decision.js").request;
564
138
  generate: <const Model extends DecisionModel, const Questions extends DecisionQuestions>(input: DecisionRequestInput<Model, Questions>, options?: RunOptions) => Promise<import("./decision.js").DecisionResponseFor<Questions>>;
565
139
  };
140
+ embedding: {
141
+ request: typeof import("./embedding.js").request;
142
+ generate: <const Model extends EmbeddingModel>(input: EmbeddingRequestInput<Model>, options?: RunOptions) => Promise<import("./embedding.js").EmbeddingResponse>;
143
+ };
566
144
  /** Experimental: may change without compatibility guarantees. */
567
145
  experimental: {
568
146
  speech: {
@@ -737,22 +315,12 @@ export declare const make: <R = never>(options?: Options<R>) => {
737
315
  };
738
316
  dispose: () => Promise<void>;
739
317
  };
740
- export type Client<R = never> = ReturnType<typeof make<R>>;
318
+ export type Client = ReturnType<typeof make>;
741
319
  /** `tool` from `@opencode/ai/effect`, with an `execute` that returns a value or a Promise and throws to fail. */
742
- export declare const tool: <Parameters extends ToolSchema<any> = typeof Schema.Unknown, Success extends ToolSchema<any> = typeof Schema.Unknown, Result extends Schema.Schema.Type<Success> | PromiseLike<Schema.Schema.Type<Success>> | NoExecute = NoExecute>(config: ToolOptions<Parameters, Success, (params: Schema.Schema.Type<Parameters>, context: Partial<ToolExecuteContext> & {
320
+ export declare const tool: <Input extends ToolInput = typeof Schema.Unknown, Success extends ToolSchema<any> = typeof Schema.Unknown, Result extends Schema.Schema.Type<Success> | PromiseLike<Schema.Schema.Type<Success>> | NoExecute = NoExecute>(config: ToolOptions<Input, Success, (input: ToolInputType<Input>, context: Partial<ToolExecuteContext> & {
743
321
  signal: AbortSignal;
744
- }) => Result>) => 0 extends 1 & Result ? import("./tool.js").ExecutableTool<Parameters, Success> : [Result, NoExecute] extends [NoExecute, Result] ? import("./tool.js").Tool<Parameters, Success> : import("./tool.js").ExecutableTool<Parameters, Success>;
322
+ }) => Result>) => 0 extends 1 & Result ? import("./tool.js").ExecutableTool<Input, Success> : [Result, NoExecute] extends [NoExecute, Result] ? import("./tool.js").Tool<Input, Success> : import("./tool.js").ExecutableTool<Input, Success>;
745
323
  /** Default client over `RequestExecutor.fetchLayer`; the runtime builds its layer on first use and holds nothing to dispose. */
746
324
  export declare const ai: Omit<Client, "dispose">;
747
325
  export * as AI from "./index.js";
748
- export { isContextOverflow, isContextOverflowFailure, isRetryable } from "./provider-error.js";
749
- export { ProtocolID, RouteID, ModelID, ProviderID, ResponseID, ContentBlockID, ToolCallID, JsonSchema, ProviderOptions, ProviderMetadata, HttpTimeout, RequestEncoding, HttpOptions, GenerationOptions, LanguageModelDefaults, ReasoningEfforts, ReasoningEffort, LanguageModelCompatibility, LanguageModel, LanguageModelSchema, CacheTTL, CacheHint, CachePolicyObject, CachePolicy, MessageRole, SystemPart, TextPart, MediaPart, ToolResultValue, ToolOutput, ToolCallPart, ToolResultPart, ReasoningPart, CompactionPart, EffortPart, ContentPart, Message, Freeform, ToolDefinition, ToolNamespace, ToolEntry, ToolChoice, LLMRequest, FinishReason, Usage, MediaUsage, CompactionResponse, CompactionCheckpointResponse, StepStart, TextStart, TextDelta, TextEnd, ReasoningStart, ReasoningDelta, ReasoningEnd, ToolInputStart, ToolInputDelta, ToolInputEnd, ToolInputError, ToolCall, ToolResult, ToolError, FinishReasonDetails, StepFinish, Finish, MediaEvent, ProviderErrorEvent, LLMEvent, LLMResponse, HttpContext, HttpRateLimitDetails, InvalidRequestError, UnsupportedOperationError, ProviderConfigurationError, NoRouteError, AuthenticationError, RateLimitError, QuotaExceededError, ContentPolicyError, ProviderInternalError, TransportType, TransportOperation, TransportError, InvalidProviderOutputError, UnknownProviderError, TimeoutError, AIErrorReason, AIError, } from "./schema/index.js";
750
- export type { GenerationOptionsFields, GenerationOptionsInput, LanguageModelInput, LanguageModelProviderOptions, ToolDefinitionInput, ToolNamespaceInput, ToolNamespaceEntryInput, ToolEntryInput, UsageInput, } from "./schema/index.js";
751
- export { ImageAspectRatio, ImageEvent, ImageModel, ImageModelSchema, ImageRequest, ImageResponse } from "./image.js";
752
- export type { ImageModelOptions, ImageOptions, ImageRequestFor, ImageRequestInput, ImageResolution, ImageRoute, } from "./image.js";
753
- export { ChoiceAnswer, ChoiceQuestion, ChoiceValue, DecisionAnswer, DecisionJsonPart, DecisionMediaPart, DecisionModel, DecisionModelCompatibility, DecisionModelSchema, DecisionPart, DecisionQuestion, DecisionRequest, DecisionResponse, DecisionTextPart, DecisionUsage, ErrorAnswer, ErrorReason, PredicateAnswer, PredicateQuestion, ScoreAnswer, ScoreQuestion, } from "./decision.js";
754
- export type { AnswerFor, AnswersFor, DecisionInput, DecisionModelOptions, DecisionOptions, DecisionQuestions, DecisionRequestFor, DecisionRequestInput, DecisionResponseFor, DecisionModelRoute, } from "./decision.js";
755
- export { Media } from "./media.js";
756
- export type { AwaitOptions as GenerationAwaitOptions, Event as GenerationEvent, Poll, Route as GenerationRoute, Snapshot as GenerationSnapshot, Status as GenerationStatus, } from "./generation.js";
757
- export type { ExecutableTool, Tool, ToolExecute, ToolExecuteContext, ToolModelOutputInput, ToolOptions, Tools, ToolSchema, ToolToModelOutput, } from "./tool.js";
758
- export type { LLM } from "./llm.js";
326
+ export * from "./public.js";