@opencode-ai/ai 0.0.0-next-17239 → 0.0.0-next-17250

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 (176) hide show
  1. package/dist/cache-policy.d.ts +1 -1
  2. package/dist/cache-policy.js +2 -2
  3. package/dist/image-client.d.ts +3 -3
  4. package/dist/image-client.js +1 -1
  5. package/dist/image.d.ts +2 -2
  6. package/dist/image.js +2 -2
  7. package/dist/index.d.ts +18 -18
  8. package/dist/index.js +12 -12
  9. package/dist/llm.d.ts +8 -8
  10. package/dist/llm.js +3 -3
  11. package/dist/protocols/anthropic-messages.d.ts +7 -7
  12. package/dist/protocols/anthropic-messages.js +13 -13
  13. package/dist/protocols/bedrock-converse.d.ts +10 -10
  14. package/dist/protocols/bedrock-converse.js +14 -14
  15. package/dist/protocols/bedrock-event-stream.d.ts +2 -2
  16. package/dist/protocols/bedrock-event-stream.js +3 -3
  17. package/dist/protocols/gemini.d.ts +6 -6
  18. package/dist/protocols/gemini.js +11 -11
  19. package/dist/protocols/google-images.d.ts +3 -3
  20. package/dist/protocols/google-images.js +5 -5
  21. package/dist/protocols/index.d.ts +9 -9
  22. package/dist/protocols/index.js +9 -9
  23. package/dist/protocols/open-responses.d.ts +7 -7
  24. package/dist/protocols/open-responses.js +10 -10
  25. package/dist/protocols/openai-chat.d.ts +7 -7
  26. package/dist/protocols/openai-chat.js +13 -13
  27. package/dist/protocols/openai-compatible-chat.d.ts +3 -3
  28. package/dist/protocols/openai-compatible-chat.js +5 -5
  29. package/dist/protocols/openai-compatible-responses.d.ts +3 -3
  30. package/dist/protocols/openai-compatible-responses.js +4 -4
  31. package/dist/protocols/openai-images.d.ts +3 -3
  32. package/dist/protocols/openai-images.js +6 -6
  33. package/dist/protocols/openai-responses.d.ts +7 -7
  34. package/dist/protocols/openai-responses.js +12 -12
  35. package/dist/protocols/shared.d.ts +7 -7
  36. package/dist/protocols/shared.js +3 -3
  37. package/dist/protocols/utils/bedrock-auth.d.ts +2 -2
  38. package/dist/protocols/utils/bedrock-auth.js +3 -3
  39. package/dist/protocols/utils/bedrock-cache.d.ts +4 -4
  40. package/dist/protocols/utils/bedrock-cache.js +2 -2
  41. package/dist/protocols/utils/bedrock-media.d.ts +2 -2
  42. package/dist/protocols/utils/bedrock-media.js +2 -2
  43. package/dist/protocols/utils/gemini-tool-schema.d.ts +1 -1
  44. package/dist/protocols/utils/gemini-tool-schema.js +2 -2
  45. package/dist/protocols/utils/image-input.d.ts +2 -2
  46. package/dist/protocols/utils/image-input.js +1 -1
  47. package/dist/protocols/utils/lifecycle.d.ts +2 -2
  48. package/dist/protocols/utils/lifecycle.js +2 -2
  49. package/dist/protocols/utils/open-responses-options.d.ts +2 -2
  50. package/dist/protocols/utils/open-responses-options.js +2 -2
  51. package/dist/protocols/utils/openai-options.d.ts +3 -3
  52. package/dist/protocols/utils/openai-options.js +3 -3
  53. package/dist/protocols/utils/tool-schema.d.ts +1 -1
  54. package/dist/protocols/utils/tool-schema.js +2 -2
  55. package/dist/protocols/utils/tool-stream.d.ts +9 -9
  56. package/dist/protocols/utils/tool-stream.js +3 -3
  57. package/dist/protocols/xai-images.d.ts +3 -3
  58. package/dist/protocols/xai-images.js +5 -5
  59. package/dist/protocols/zai-images.d.ts +3 -3
  60. package/dist/protocols/zai-images.js +5 -5
  61. package/dist/protocols.d.ts +1 -1
  62. package/dist/protocols.js +1 -1
  63. package/dist/provider-error.d.ts +1 -1
  64. package/dist/provider-error.js +1 -1
  65. package/dist/provider-package.d.ts +2 -2
  66. package/dist/provider-package.js +1 -1
  67. package/dist/provider.d.ts +2 -2
  68. package/dist/provider.js +1 -1
  69. package/dist/providers/amazon-bedrock/mantle/chat.d.ts +2 -2
  70. package/dist/providers/amazon-bedrock/mantle/chat.js +1 -1
  71. package/dist/providers/amazon-bedrock/mantle/responses.d.ts +2 -2
  72. package/dist/providers/amazon-bedrock/mantle/responses.js +1 -1
  73. package/dist/providers/amazon-bedrock/mantle.d.ts +2 -2
  74. package/dist/providers/amazon-bedrock/mantle.js +1 -1
  75. package/dist/providers/amazon-bedrock-mantle.d.ts +17 -17
  76. package/dist/providers/amazon-bedrock-mantle.js +6 -6
  77. package/dist/providers/amazon-bedrock.d.ts +9 -9
  78. package/dist/providers/amazon-bedrock.js +3 -3
  79. package/dist/providers/anthropic-compatible.d.ts +10 -10
  80. package/dist/providers/anthropic-compatible.js +4 -4
  81. package/dist/providers/anthropic.d.ts +10 -10
  82. package/dist/providers/anthropic.js +4 -4
  83. package/dist/providers/azure/chat.d.ts +2 -2
  84. package/dist/providers/azure/chat.js +1 -1
  85. package/dist/providers/azure/responses.d.ts +2 -2
  86. package/dist/providers/azure/responses.js +1 -1
  87. package/dist/providers/azure.d.ts +14 -14
  88. package/dist/providers/azure.js +7 -7
  89. package/dist/providers/cloudflare.d.ts +12 -12
  90. package/dist/providers/cloudflare.js +4 -4
  91. package/dist/providers/google-vertex/chat.d.ts +2 -2
  92. package/dist/providers/google-vertex/chat.js +1 -1
  93. package/dist/providers/google-vertex/gemini.d.ts +2 -2
  94. package/dist/providers/google-vertex/gemini.js +1 -1
  95. package/dist/providers/google-vertex/messages.d.ts +2 -2
  96. package/dist/providers/google-vertex/messages.js +1 -1
  97. package/dist/providers/google-vertex/responses.d.ts +2 -2
  98. package/dist/providers/google-vertex/responses.js +1 -1
  99. package/dist/providers/google-vertex-chat.d.ts +9 -9
  100. package/dist/providers/google-vertex-chat.js +3 -3
  101. package/dist/providers/google-vertex-messages.d.ts +8 -8
  102. package/dist/providers/google-vertex-messages.js +8 -8
  103. package/dist/providers/google-vertex-responses.d.ts +9 -9
  104. package/dist/providers/google-vertex-responses.js +3 -3
  105. package/dist/providers/google-vertex-shared.d.ts +2 -2
  106. package/dist/providers/google-vertex-shared.js +2 -2
  107. package/dist/providers/google-vertex.d.ts +8 -8
  108. package/dist/providers/google-vertex.js +7 -7
  109. package/dist/providers/google.d.ts +15 -15
  110. package/dist/providers/google.js +4 -4
  111. package/dist/providers/index.d.ts +18 -18
  112. package/dist/providers/index.js +18 -18
  113. package/dist/providers/open-responses-options.d.ts +3 -3
  114. package/dist/providers/open-responses-options.js +1 -1
  115. package/dist/providers/openai/chat.d.ts +2 -2
  116. package/dist/providers/openai/chat.js +1 -1
  117. package/dist/providers/openai/responses.d.ts +2 -2
  118. package/dist/providers/openai/responses.js +1 -1
  119. package/dist/providers/openai-compatible/responses.d.ts +1 -1
  120. package/dist/providers/openai-compatible/responses.js +1 -1
  121. package/dist/providers/openai-compatible-responses.d.ts +10 -10
  122. package/dist/providers/openai-compatible-responses.js +3 -3
  123. package/dist/providers/openai-compatible.d.ts +16 -16
  124. package/dist/providers/openai-compatible.js +4 -4
  125. package/dist/providers/openai-options.d.ts +4 -4
  126. package/dist/providers/openai-options.js +2 -2
  127. package/dist/providers/openai.d.ts +30 -30
  128. package/dist/providers/openai.js +6 -6
  129. package/dist/providers/openrouter.d.ts +11 -11
  130. package/dist/providers/openrouter.js +10 -10
  131. package/dist/providers/xai.d.ts +23 -23
  132. package/dist/providers/xai.js +9 -9
  133. package/dist/providers/zai.d.ts +7 -7
  134. package/dist/providers/zai.js +3 -3
  135. package/dist/providers.d.ts +1 -1
  136. package/dist/providers.js +1 -1
  137. package/dist/route/auth-options.d.ts +2 -2
  138. package/dist/route/auth-options.js +2 -2
  139. package/dist/route/auth.d.ts +2 -2
  140. package/dist/route/auth.js +2 -2
  141. package/dist/route/client.d.ts +11 -11
  142. package/dist/route/client.js +9 -9
  143. package/dist/route/endpoint.d.ts +2 -2
  144. package/dist/route/endpoint.js +2 -2
  145. package/dist/route/executor.d.ts +3 -3
  146. package/dist/route/executor.js +3 -3
  147. package/dist/route/framing.d.ts +2 -2
  148. package/dist/route/framing.js +2 -2
  149. package/dist/route/index.d.ts +16 -16
  150. package/dist/route/index.js +9 -9
  151. package/dist/route/protocol.d.ts +2 -2
  152. package/dist/route/protocol.js +1 -1
  153. package/dist/route/transport/http.d.ts +3 -3
  154. package/dist/route/transport/http.js +5 -5
  155. package/dist/route/transport/index.d.ts +8 -8
  156. package/dist/route/transport/index.js +4 -4
  157. package/dist/route/transport/websocket.d.ts +2 -2
  158. package/dist/route/transport/websocket.js +2 -2
  159. package/dist/route.d.ts +1 -1
  160. package/dist/route.js +1 -1
  161. package/dist/schema/errors.js +1 -1
  162. package/dist/schema/events.d.ts +2 -2
  163. package/dist/schema/events.js +3 -3
  164. package/dist/schema/index.d.ts +5 -5
  165. package/dist/schema/index.js +5 -5
  166. package/dist/schema/messages.d.ts +3 -3
  167. package/dist/schema/messages.js +3 -3
  168. package/dist/schema/options.d.ts +2 -2
  169. package/dist/schema/options.js +2 -2
  170. package/dist/testing.d.ts +20 -20
  171. package/dist/testing.js +3 -3
  172. package/dist/tool-runtime.d.ts +2 -2
  173. package/dist/tool-runtime.js +2 -2
  174. package/dist/tool.d.ts +3 -3
  175. package/dist/tool.js +2 -2
  176. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import { type ProviderAuthOption } from "../route/auth-options";
2
- import type { Route, RouteDefaultsInput } from "../route/client";
3
- import type { ProviderPackage } from "../provider-package";
4
- import { ToolDefinition, type ModelID } from "../schema";
5
- import { type OpenAIProviderOptionsInput } from "./openai-options";
6
- import { type OpenAIImageString } from "../protocols/openai-images";
7
- export type { OpenAIOptionsInput, OpenAIResponseIncludable } from "./openai-options";
8
- export type { OpenAIImageOptions } from "../protocols/openai-images";
1
+ import { type ProviderAuthOption } from "../route/auth-options.js";
2
+ import type { Route, RouteDefaultsInput } from "../route/client.js";
3
+ import type { ProviderPackage } from "../provider-package.js";
4
+ import { ToolDefinition, type ModelID } from "../schema/index.js";
5
+ import { type OpenAIProviderOptionsInput } from "./openai-options.js";
6
+ import { type OpenAIImageString } from "../protocols/openai-images.js";
7
+ export type { OpenAIOptionsInput, OpenAIResponseIncludable } from "./openai-options.js";
8
+ export type { OpenAIImageOptions } from "../protocols/openai-images.js";
9
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
10
10
  export declare const routes: (Route<{
11
11
  readonly model: string;
@@ -103,7 +103,7 @@ export declare const routes: (Route<{
103
103
  readonly reasoning_effort?: string | undefined;
104
104
  readonly frequency_penalty?: number | undefined;
105
105
  readonly presence_penalty?: number | undefined;
106
- }, import("../route/transport/http").HttpPrepared<string>> | Route<{
106
+ }, import("../route/transport/http.js").HttpPrepared<string>> | Route<{
107
107
  readonly input: readonly ({
108
108
  readonly type: "reasoning";
109
109
  readonly summary: readonly {
@@ -209,7 +209,7 @@ export declare const routes: (Route<{
209
209
  readonly prompt_cache_key?: string | undefined;
210
210
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
211
211
  readonly max_output_tokens?: number | undefined;
212
- }, import("../route/transport/http").HttpPrepared<string>> | Route<{
212
+ }, import("../route/transport/http.js").HttpPrepared<string>> | Route<{
213
213
  readonly input: readonly ({
214
214
  readonly type: "reasoning";
215
215
  readonly summary: readonly {
@@ -315,7 +315,7 @@ export declare const routes: (Route<{
315
315
  readonly prompt_cache_key?: string | undefined;
316
316
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
317
317
  readonly max_output_tokens?: number | undefined;
318
- }, import("../route/transport/websocket").JsonPrepared>)[];
318
+ }, import("../route/transport/websocket.js").JsonPrepared>)[];
319
319
  export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
320
320
  readonly baseURL?: string;
321
321
  readonly queryParams?: Record<string, string>;
@@ -343,33 +343,33 @@ export interface Settings extends ProviderPackage.Settings {
343
343
  }
344
344
  export declare const configure: (input?: Config) => {
345
345
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
346
- model: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
347
- responses: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
348
- responsesWebSocket: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
349
- chat: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
350
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./openai").OpenAIImageOptions>;
346
+ model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
347
+ responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
348
+ responsesWebSocket: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
349
+ chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
350
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
351
351
  configure: (input?: Config) => /*elided*/ any;
352
352
  };
353
353
  export declare const provider: {
354
354
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
355
- model: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
356
- responses: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
357
- responsesWebSocket: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
358
- chat: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
359
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./openai").OpenAIImageOptions>;
355
+ model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
356
+ responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
357
+ responsesWebSocket: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
358
+ chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
359
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
360
360
  configure: (input?: Config) => {
361
361
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
362
- model: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
363
- responses: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
364
- responsesWebSocket: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
365
- chat: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
366
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./openai").OpenAIImageOptions>;
362
+ model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
363
+ responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
364
+ responsesWebSocket: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
365
+ chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
366
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
367
367
  configure: /*elided*/ any;
368
368
  };
369
369
  };
370
370
  export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
371
371
  export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
372
- export declare const responses: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
373
- export declare const responsesWebSocket: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
374
- export declare const chat: (id: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
375
- export declare const image: (modelID: string | ModelID) => import("..").ImageModel<import("./openai").OpenAIImageOptions>;
372
+ export declare const responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
373
+ export declare const responsesWebSocket: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
374
+ export declare const chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
375
+ export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
@@ -1,9 +1,9 @@
1
- import { AuthOptions } from "../route/auth-options";
2
- import { HttpOptions, ProviderID, ToolDefinition, mergeHttpOptions } from "../schema";
3
- import * as OpenAIChat from "../protocols/openai-chat";
4
- import * as OpenAIResponses from "../protocols/openai-responses";
5
- import { withOpenAIOptions } from "./openai-options";
6
- import { OpenAIImages } from "../protocols/openai-images";
1
+ import { AuthOptions } from "../route/auth-options.js";
2
+ import { HttpOptions, ProviderID, ToolDefinition, mergeHttpOptions } from "../schema/index.js";
3
+ import * as OpenAIChat from "../protocols/openai-chat.js";
4
+ import * as OpenAIResponses from "../protocols/openai-responses.js";
5
+ import { withOpenAIOptions } from "./openai-options.js";
6
+ import { OpenAIImages } from "../protocols/openai-images.js";
7
7
  export const id = ProviderID.make("openai");
8
8
  export const routes = [OpenAIResponses.route, OpenAIResponses.webSocketRoute, OpenAIChat.route];
9
9
  export const imageGeneration = (options = {}) => ToolDefinition.make({
@@ -1,10 +1,10 @@
1
1
  import { Schema } from "effect";
2
- import { Route, type RouteDefaultsInput } from "../route/client";
3
- import { Protocol } from "../route/protocol";
4
- import { type ProviderAuthOption } from "../route/auth-options";
5
- import { type ModelID, type ProviderOptions } from "../schema";
6
- import type { ProviderPackage } from "../provider-package";
7
- import * as OpenAIChat from "../protocols/openai-chat";
2
+ import { Route, type RouteDefaultsInput } from "../route/client.js";
3
+ import { Protocol } from "../route/protocol.js";
4
+ import { type ProviderAuthOption } from "../route/auth-options.js";
5
+ import { type ModelID, type ProviderOptions } from "../schema/index.js";
6
+ import type { ProviderPackage } from "../provider-package.js";
7
+ import * as OpenAIChat from "../protocols/openai-chat.js";
8
8
  export declare const profile: {
9
9
  readonly provider: "openrouter";
10
10
  readonly baseURL: "https://openrouter.ai/api/v1";
@@ -420,7 +420,7 @@ export declare const route: Route<{
420
420
  readonly reasoning_effort?: string | undefined;
421
421
  readonly frequency_penalty?: number | undefined;
422
422
  readonly presence_penalty?: number | undefined;
423
- }, import("../route/transport/http").HttpPrepared<string>>;
423
+ }, import("../route/transport/http.js").HttpPrepared<string>>;
424
424
  export declare const routes: Route<{
425
425
  readonly [x: string]: any;
426
426
  readonly model: string;
@@ -518,18 +518,18 @@ export declare const routes: Route<{
518
518
  readonly reasoning_effort?: string | undefined;
519
519
  readonly frequency_penalty?: number | undefined;
520
520
  readonly presence_penalty?: number | undefined;
521
- }, import("../route/transport/http").HttpPrepared<string>>[];
521
+ }, import("../route/transport/http.js").HttpPrepared<string>>[];
522
522
  export declare const configure: (input?: LanguageModelOptions) => {
523
523
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
524
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenRouterProviderOptionsInput>;
524
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterProviderOptionsInput>;
525
525
  configure: (input?: LanguageModelOptions) => /*elided*/ any;
526
526
  };
527
527
  export declare const provider: {
528
528
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
529
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenRouterProviderOptionsInput>;
529
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterProviderOptionsInput>;
530
530
  configure: (input?: LanguageModelOptions) => {
531
531
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
532
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenRouterProviderOptionsInput>;
532
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterProviderOptionsInput>;
533
533
  configure: /*elided*/ any;
534
534
  };
535
535
  };
@@ -1,14 +1,14 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { Route } from "../route/client";
3
- import { Endpoint } from "../route/endpoint";
4
- import { Framing } from "../route/framing";
5
- import { Protocol } from "../route/protocol";
6
- import { AuthOptions } from "../route/auth-options";
7
- import { ProviderID } from "../schema";
8
- import * as OpenAICompatibleProfiles from "./openai-compatible-profile";
9
- import * as OpenAIChat from "../protocols/openai-chat";
10
- import { newBreakpoints, ttlBucket } from "../protocols/utils/cache";
11
- import { isRecord } from "../protocols/shared";
2
+ import { Route } from "../route/client.js";
3
+ import { Endpoint } from "../route/endpoint.js";
4
+ import { Framing } from "../route/framing.js";
5
+ import { Protocol } from "../route/protocol.js";
6
+ import { AuthOptions } from "../route/auth-options.js";
7
+ import { ProviderID } from "../schema/index.js";
8
+ import * as OpenAICompatibleProfiles from "./openai-compatible-profile.js";
9
+ import * as OpenAIChat from "../protocols/openai-chat.js";
10
+ import { newBreakpoints, ttlBucket } from "../protocols/utils/cache.js";
11
+ import { isRecord } from "../protocols/shared.js";
12
12
  export const profile = OpenAICompatibleProfiles.profiles.openrouter;
13
13
  export const id = ProviderID.make(profile.provider);
14
14
  const ADAPTER = "openrouter";
@@ -1,8 +1,8 @@
1
- import { type ProviderAuthOption } from "../route/auth-options";
2
- import { Route, type RouteDefaultsInput } from "../route/client";
3
- import { type ModelID, type ProviderOptions } from "../schema";
4
- import type { OpenAIOptionsInput } from "./openai-options";
5
- import type { ProviderPackage } from "../provider-package";
1
+ import { type ProviderAuthOption } from "../route/auth-options.js";
2
+ import { Route, type RouteDefaultsInput } from "../route/client.js";
3
+ import { type ModelID, type ProviderOptions } from "../schema/index.js";
4
+ import type { OpenAIOptionsInput } from "./openai-options.js";
5
+ import type { ProviderPackage } from "../provider-package.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
7
  export type XAIProviderOptionsInput = ProviderOptions & {
8
8
  readonly xai?: OpenAIOptionsInput;
@@ -16,7 +16,7 @@ export interface Settings extends ProviderPackage.Settings {
16
16
  readonly baseURL?: string;
17
17
  readonly providerOptions?: XAIProviderOptionsInput;
18
18
  }
19
- export type { XAIImageOptions } from "../protocols/xai-images";
19
+ export type { XAIImageOptions } from "../protocols/xai-images.js";
20
20
  export declare const routes: (Route<{
21
21
  readonly model: string;
22
22
  readonly messages: readonly ({
@@ -113,7 +113,7 @@ export declare const routes: (Route<{
113
113
  readonly reasoning_effort?: string | undefined;
114
114
  readonly frequency_penalty?: number | undefined;
115
115
  readonly presence_penalty?: number | undefined;
116
- }, import("../route/transport/http").HttpPrepared<string>> | Route<{
116
+ }, import("../route/transport/http.js").HttpPrepared<string>> | Route<{
117
117
  readonly input: readonly ({
118
118
  readonly type: "reasoning";
119
119
  readonly summary: readonly {
@@ -219,31 +219,31 @@ export declare const routes: (Route<{
219
219
  readonly prompt_cache_key?: string | undefined;
220
220
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
221
221
  readonly max_output_tokens?: number | undefined;
222
- }, import("../route/transport/http").HttpPrepared<string>>)[];
222
+ }, import("../route/transport/http.js").HttpPrepared<string>>)[];
223
223
  export declare const configure: (input?: LanguageModelOptions) => {
224
224
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
225
- model: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
226
- responses: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
227
- chat: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
228
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./xai").XAIImageOptions>;
225
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
226
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
227
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
228
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
229
229
  configure: (input?: LanguageModelOptions) => /*elided*/ any;
230
230
  };
231
231
  export declare const provider: {
232
232
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
233
- model: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
234
- responses: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
235
- chat: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
236
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./xai").XAIImageOptions>;
233
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
234
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
235
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
236
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
237
237
  configure: (input?: LanguageModelOptions) => {
238
238
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
239
- model: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
240
- responses: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
241
- chat: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
242
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./xai").XAIImageOptions>;
239
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
240
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
241
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
242
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
243
243
  configure: /*elided*/ any;
244
244
  };
245
245
  };
246
246
  export declare const model: ProviderPackage.Definition<Settings, XAIProviderOptionsInput>["model"];
247
- export declare const responses: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
248
- export declare const chat: (modelID: string | ModelID) => import("..").LanguageModel<XAIProviderOptionsInput>;
249
- export declare const image: (modelID: string | ModelID) => import("..").ImageModel<import("./xai").XAIImageOptions>;
247
+ export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
248
+ export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<XAIProviderOptionsInput>;
249
+ export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/xai-images.js").XAIImageOptions>;
@@ -1,12 +1,12 @@
1
- import { AuthOptions } from "../route/auth-options";
2
- import { Route } from "../route/client";
3
- import { Endpoint } from "../route/endpoint";
4
- import { HttpOptions, ProviderID } from "../schema";
5
- import * as OpenAICompatibleProfiles from "./openai-compatible-profile";
6
- import * as OpenAICompatibleChat from "../protocols/openai-compatible-chat";
7
- import * as OpenAIChat from "../protocols/openai-chat";
8
- import * as OpenAIResponses from "../protocols/openai-responses";
9
- import { XAIImages } from "../protocols/xai-images";
1
+ import { AuthOptions } from "../route/auth-options.js";
2
+ import { Route } from "../route/client.js";
3
+ import { Endpoint } from "../route/endpoint.js";
4
+ import { HttpOptions, ProviderID } from "../schema/index.js";
5
+ import * as OpenAICompatibleProfiles from "./openai-compatible-profile.js";
6
+ import * as OpenAICompatibleChat from "../protocols/openai-compatible-chat.js";
7
+ import * as OpenAIChat from "../protocols/openai-chat.js";
8
+ import * as OpenAIResponses from "../protocols/openai-responses.js";
9
+ import { XAIImages } from "../protocols/xai-images.js";
10
10
  export const id = ProviderID.make("xai");
11
11
  const responsesRoute = Route.make({
12
12
  id: "openai-responses",
@@ -1,24 +1,24 @@
1
- import { type ProviderAuthOption } from "../route/auth-options";
2
- import { HttpOptions, type ModelID } from "../schema";
1
+ import { type ProviderAuthOption } from "../route/auth-options.js";
2
+ import { HttpOptions, type ModelID } from "../schema/index.js";
3
3
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
4
4
  export type Config = ProviderAuthOption<"optional"> & {
5
5
  readonly baseURL?: string;
6
6
  readonly headers?: Record<string, string>;
7
7
  readonly http?: HttpOptions.Input;
8
8
  };
9
- export type { ZAIImageOptions } from "../protocols/zai-images";
9
+ export type { ZAIImageOptions } from "../protocols/zai-images.js";
10
10
  export declare const configure: (input?: Config) => {
11
11
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
12
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./zai").ZAIImageOptions>;
12
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/zai-images.js").ZAIImageOptions>;
13
13
  configure: (input?: Config) => /*elided*/ any;
14
14
  };
15
15
  export declare const provider: {
16
16
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
17
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./zai").ZAIImageOptions>;
17
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/zai-images.js").ZAIImageOptions>;
18
18
  configure: (input?: Config) => {
19
19
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
20
- image: (modelID: string | ModelID) => import("..").ImageModel<import("./zai").ZAIImageOptions>;
20
+ image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/zai-images.js").ZAIImageOptions>;
21
21
  configure: /*elided*/ any;
22
22
  };
23
23
  };
24
- export declare const image: (modelID: string | ModelID) => import("..").ImageModel<import("./zai").ZAIImageOptions>;
24
+ export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/zai-images.js").ZAIImageOptions>;
@@ -1,6 +1,6 @@
1
- import { ZAIImages } from "../protocols/zai-images";
2
- import { AuthOptions } from "../route/auth-options";
3
- import { HttpOptions, ProviderID } from "../schema";
1
+ import { ZAIImages } from "../protocols/zai-images.js";
2
+ import { AuthOptions } from "../route/auth-options.js";
3
+ import { HttpOptions, ProviderID } from "../schema/index.js";
4
4
  export const id = ProviderID.make("zai");
5
5
  const auth = (options) => AuthOptions.bearer(options, "ZAI_API_KEY");
6
6
  export const configure = (input = {}) => {
@@ -1 +1 @@
1
- export * from "./providers/index";
1
+ export * from "./providers/index.js";
package/dist/providers.js CHANGED
@@ -1 +1 @@
1
- export * from "./providers/index";
1
+ export * from "./providers/index.js";
@@ -1,5 +1,5 @@
1
1
  import type { Config, Redacted } from "effect";
2
- import { Auth } from "./auth";
2
+ import { Auth } from "./auth.js";
3
3
  export type ApiKeyMode = "optional" | "required";
4
4
  export type AuthOverride = {
5
5
  readonly auth: Auth.Definition;
@@ -31,4 +31,4 @@ export type AtLeastOne<T> = {
31
31
  * a bearer token.
32
32
  */
33
33
  export declare const bearer: (options: ProviderAuthOption<"optional">, envVar: string | ReadonlyArray<string>) => Auth.Definition;
34
- export * as AuthOptions from "./auth-options";
34
+ export * as AuthOptions from "./auth-options.js";
@@ -1,4 +1,4 @@
1
- import { Auth } from "./auth";
1
+ import { Auth } from "./auth.js";
2
2
  /**
3
3
  * Standard bearer-auth resolution for providers: honor an explicit `auth`
4
4
  * override, otherwise resolve `apiKey` (option > config var) and apply it as
@@ -11,4 +11,4 @@ export const bearer = (options, envVar) => {
11
11
  .reduce((auth, name) => auth.orElse(Auth.config(name)), Auth.optional("apiKey" in options ? options.apiKey : undefined, "apiKey"))
12
12
  .bearer();
13
13
  };
14
- export * as AuthOptions from "./auth-options";
14
+ export * as AuthOptions from "./auth-options.js";
@@ -1,6 +1,6 @@
1
1
  import { Config, Effect, Redacted } from "effect";
2
2
  import { Headers } from "effect/unstable/http";
3
- import { AIError, type HttpOptions } from "../schema";
3
+ import { AIError, type HttpOptions } from "../schema/index.js";
4
4
  export declare class MissingCredentialError extends Error {
5
5
  readonly source: string;
6
6
  readonly _tag = "MissingCredentialError";
@@ -48,4 +48,4 @@ export declare function header(name: string, source: Secret | Credential): Defin
48
48
  export declare function bearerHeader(name: string): (source: Secret | Credential) => Definition;
49
49
  export declare function bearerHeader(name: string, source: Secret | Credential): Definition;
50
50
  export declare const toEffect: (input: Definition) => (authInput: AuthInput) => Effect.Effect<Headers.Headers, AIError>;
51
- export * as Auth from "./auth";
51
+ export * as Auth from "./auth.js";
@@ -1,6 +1,6 @@
1
1
  import { Config, Effect, Redacted } from "effect";
2
2
  import { Headers } from "effect/unstable/http";
3
- import { AuthenticationReason, InvalidRequestReason, AIError } from "../schema";
3
+ import { AuthenticationReason, InvalidRequestReason, AIError } from "../schema/index.js";
4
4
  export class MissingCredentialError extends Error {
5
5
  source;
6
6
  _tag = "MissingCredentialError";
@@ -86,4 +86,4 @@ const toAIError = (error) => {
86
86
  return error;
87
87
  };
88
88
  export const toEffect = (input) => (authInput) => input.apply(authInput).pipe(Effect.mapError(toAIError));
89
- export * as Auth from "./auth";
89
+ export * as Auth from "./auth.js";
@@ -1,13 +1,13 @@
1
1
  import { Context, Effect, Layer, Schema, Stream } from "effect";
2
- import { Auth } from "./auth";
3
- import { Endpoint, type EndpointPatch } from "./endpoint";
4
- import { RequestExecutor } from "./executor";
5
- import { Framing } from "./framing";
6
- import { HttpTransport } from "./transport";
7
- import type { HttpMiddleware, Transport, TransportRuntime } from "./transport";
8
- import type { Protocol } from "./protocol";
9
- import type { ProtocolID, ProviderOptions } from "../schema";
10
- import { AIError, GenerationOptions, HttpOptions, LLMRequest, LLMResponse, LanguageModel, LanguageModelLimits, LLMEvent, ProviderID } from "../schema";
2
+ import { Auth } from "./auth.js";
3
+ import { Endpoint, type EndpointPatch } from "./endpoint.js";
4
+ import { RequestExecutor } from "./executor.js";
5
+ import { Framing } from "./framing.js";
6
+ import { HttpTransport } from "./transport/index.js";
7
+ import type { HttpMiddleware, Transport, TransportRuntime } from "./transport/index.js";
8
+ import type { Protocol } from "./protocol.js";
9
+ import type { ProtocolID, ProviderOptions } from "../schema/index.js";
10
+ import { AIError, GenerationOptions, HttpOptions, LLMRequest, LLMResponse, LanguageModel, LanguageModelLimits, LLMEvent, ProviderID } from "../schema/index.js";
11
11
  export interface RouteBody<Body> {
12
12
  /** Schema for the validated provider-native body sent as the JSON request. */
13
13
  readonly schema: Schema.Codec<Body, unknown>;
@@ -311,7 +311,7 @@ export declare const streamRequest: (request: LLMRequest, options?: StreamOption
311
311
  readonly [x: string]: unknown;
312
312
  };
313
313
  } | undefined;
314
- readonly usage?: import("..").Usage | undefined;
314
+ readonly usage?: import("../schema/events.js").Usage | undefined;
315
315
  } | {
316
316
  readonly type: "finish";
317
317
  readonly reason: {
@@ -323,7 +323,7 @@ export declare const streamRequest: (request: LLMRequest, options?: StreamOption
323
323
  readonly [x: string]: unknown;
324
324
  };
325
325
  } | undefined;
326
- readonly usage?: import("..").Usage | undefined;
326
+ readonly usage?: import("../schema/events.js").Usage | undefined;
327
327
  } | {
328
328
  readonly type: "provider-error";
329
329
  readonly message: string;
@@ -1,14 +1,14 @@
1
1
  import { Cause, Context, Effect, Layer, Schema, Stream } from "effect";
2
2
  import * as Option from "effect/Option";
3
- import { Auth } from "./auth";
4
- import { Endpoint } from "./endpoint";
5
- import { RequestExecutor } from "./executor";
6
- import { Framing } from "./framing";
7
- import { HttpTransport } from "./transport";
8
- import { WebSocketExecutor } from "./transport";
9
- import { applyCachePolicy } from "../cache-policy";
10
- import * as ProviderShared from "../protocols/shared";
11
- import { AIError, GenerationOptions, HttpOptions, LLMRequest, LLMResponse, LanguageModel, LanguageModelLimits, LLMEvent, InvalidProviderOutputReason, ProviderID, mergeGenerationOptions, mergeHttpOptions, mergeProviderOptions, } from "../schema";
3
+ import { Auth } from "./auth.js";
4
+ import { Endpoint } from "./endpoint.js";
5
+ import { RequestExecutor } from "./executor.js";
6
+ import { Framing } from "./framing.js";
7
+ import { HttpTransport } from "./transport/index.js";
8
+ import { WebSocketExecutor } from "./transport/index.js";
9
+ import { applyCachePolicy } from "../cache-policy.js";
10
+ import * as ProviderShared from "../protocols/shared.js";
11
+ import { AIError, GenerationOptions, HttpOptions, LLMRequest, LLMResponse, LanguageModel, LanguageModelLimits, LLMEvent, InvalidProviderOutputReason, ProviderID, mergeGenerationOptions, mergeHttpOptions, mergeProviderOptions, } from "../schema/index.js";
12
12
  const makeRouteLanguageModel = (route, mapped) => {
13
13
  const provider = route.provider ?? ("provider" in mapped ? mapped.provider : undefined);
14
14
  if (!provider)
@@ -1,4 +1,4 @@
1
- import type { LLMRequest } from "../schema";
1
+ import type { LLMRequest } from "../schema/index.js";
2
2
  export interface EndpointInput<Body> {
3
3
  readonly request: LLMRequest;
4
4
  readonly body: Body;
@@ -25,4 +25,4 @@ export type EndpointPatch<Body> = Partial<Definition<Body>>;
25
25
  export declare const path: <Body>(value: EndpointPart<Body>, options?: Omit<Definition<Body>, "path">) => Definition<Body>;
26
26
  export declare const merge: <Body>(base: Definition<Body>, patch: EndpointPatch<Body>) => Definition<Body>;
27
27
  export declare const render: <Body>(endpoint: Definition<Body>, input: EndpointInput<Body>) => URL;
28
- export * as Endpoint from "./endpoint";
28
+ export * as Endpoint from "./endpoint.js";
@@ -1,4 +1,4 @@
1
- import * as ProviderShared from "../protocols/shared";
1
+ import * as ProviderShared from "../protocols/shared.js";
2
2
  /** Construct an `Endpoint` from a path string or path function. */
3
3
  export const path = (value, options = {}) => ({
4
4
  ...options,
@@ -18,4 +18,4 @@ export const render = (endpoint, input) => {
18
18
  url.searchParams.set(key, value);
19
19
  return url;
20
20
  };
21
- export * as Endpoint from "./endpoint";
21
+ export * as Endpoint from "./endpoint.js";
@@ -1,6 +1,6 @@
1
1
  import { Context, Effect, Layer } from "effect";
2
2
  import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http";
3
- import { AIError, TransportReason } from "../schema";
3
+ import { AIError, TransportReason } from "../schema/index.js";
4
4
  export interface Interface {
5
5
  readonly execute: (request: HttpClientRequest.HttpClientRequest, middleware?: HttpMiddleware) => Effect.Effect<HttpClientResponse.HttpClientResponse, AIError>;
6
6
  }
@@ -16,7 +16,7 @@ export declare const classifyHttpFailure: (input: {
16
16
  readonly code?: string | undefined;
17
17
  readonly responseHeaders?: Record<string, string> | undefined;
18
18
  readonly responseBody?: string | undefined;
19
- }) => import("..").InvalidRequestReason | import("..").NoRouteReason | import("..").AuthenticationReason | import("..").RateLimitReason | import("..").QuotaExceededReason | import("..").ContentPolicyReason | import("..").ProviderInternalReason | TransportReason | import("..").InvalidProviderOutputReason | import("..").UnknownProviderReason;
19
+ }) => import("../schema/errors.js").InvalidRequestReason | import("../schema/errors.js").NoRouteReason | import("../schema/errors.js").AuthenticationReason | import("../schema/errors.js").RateLimitReason | import("../schema/errors.js").QuotaExceededReason | import("../schema/errors.js").ContentPolicyReason | import("../schema/errors.js").ProviderInternalReason | TransportReason | import("../schema/errors.js").InvalidProviderOutputReason | import("../schema/errors.js").UnknownProviderReason;
20
20
  export declare const layer: Layer.Layer<Service, never, HttpClient.HttpClient>;
21
21
  export declare const fetchLayer: Layer.Layer<Service, never, never>;
22
- export * as RequestExecutor from "./executor";
22
+ export * as RequestExecutor from "./executor.js";
@@ -1,7 +1,7 @@
1
1
  import { Cause, Context, Effect, Layer, Option, Schema } from "effect";
2
2
  import { FetchHttpClient, Headers, HttpClient, HttpClientError, HttpClientRequest, HttpClientResponse, } from "effect/unstable/http";
3
- import { HttpContext, HttpRateLimitDetails, HttpRequestDetails, HttpResponseDetails, AIError, TransportReason, } from "../schema";
4
- import { classifyProviderFailure } from "../provider-error";
3
+ import { HttpContext, HttpRateLimitDetails, HttpRequestDetails, HttpResponseDetails, AIError, TransportReason, } from "../schema/index.js";
4
+ import { classifyProviderFailure } from "../provider-error.js";
5
5
  export class Service extends Context.Service()("@opencode/AI/RequestExecutor") {
6
6
  }
7
7
  const BODY_LIMIT = 16_384;
@@ -264,4 +264,4 @@ export const layer = Layer.effect(Service, Effect.gen(function* () {
264
264
  });
265
265
  }));
266
266
  export const fetchLayer = layer.pipe(Layer.provide(FetchHttpClient.layer));
267
- export * as RequestExecutor from "./executor";
267
+ export * as RequestExecutor from "./executor.js";
@@ -1,5 +1,5 @@
1
1
  import type { Stream } from "effect";
2
- import type { AIError } from "../schema";
2
+ import type { AIError } from "../schema/index.js";
3
3
  /**
4
4
  * Decode a streaming HTTP response body into provider-protocol frames.
5
5
  *
@@ -20,4 +20,4 @@ export interface Definition<Frame> {
20
20
  }
21
21
  /** Server-Sent Events framing. Used by every JSON-streaming HTTP provider. */
22
22
  export declare const sse: Definition<string>;
23
- export * as Framing from "./framing";
23
+ export * as Framing from "./framing.js";
@@ -1,4 +1,4 @@
1
- import * as ProviderShared from "../protocols/shared";
1
+ import * as ProviderShared from "../protocols/shared.js";
2
2
  /** Server-Sent Events framing. Used by every JSON-streaming HTTP provider. */
3
3
  export const sse = { id: "sse", frame: ProviderShared.sseFraming };
4
- export * as Framing from "./framing";
4
+ export * as Framing from "./framing.js";
@@ -1,16 +1,16 @@
1
- export { Route, LLMClient } from "./client";
2
- export type { Route as RouteShape, RouteLanguageModelInput, RouteRoutedLanguageModelInput, RouteDefaults, RouteDefaultsInput, AnyRoute, Interface as LLMClientShape, Service as LLMClientService, StreamOptions, } from "./client";
3
- export * from "./executor";
4
- export { Auth } from "./auth";
5
- export { AuthOptions } from "./auth-options";
6
- export { Endpoint } from "./endpoint";
7
- export { Framing } from "./framing";
8
- export { Protocol } from "./protocol";
9
- export { HttpTransport, WebSocketExecutor, WebSocketTransport } from "./transport";
10
- export * as Transport from "./transport";
11
- export type { Definition as AuthShape, AuthInput, Credential, CredentialError } from "./auth";
12
- export type { ApiKeyMode, AuthOverride, ProviderAuthOption } from "./auth-options";
13
- export type { Definition as EndpointFn, EndpointInput } from "./endpoint";
14
- export type { Definition as FramingDef } from "./framing";
15
- export type { Protocol as ProtocolDef } from "./protocol";
16
- export type { HttpHandler, HttpMiddleware, Transport as TransportDef, TransportRuntime } from "./transport";
1
+ export { Route, LLMClient } from "./client.js";
2
+ export type { Route as RouteShape, RouteLanguageModelInput, RouteRoutedLanguageModelInput, RouteDefaults, RouteDefaultsInput, AnyRoute, Interface as LLMClientShape, Service as LLMClientService, StreamOptions, } from "./client.js";
3
+ export * from "./executor.js";
4
+ export { Auth } from "./auth.js";
5
+ export { AuthOptions } from "./auth-options.js";
6
+ export { Endpoint } from "./endpoint.js";
7
+ export { Framing } from "./framing.js";
8
+ export { Protocol } from "./protocol.js";
9
+ export { HttpTransport, WebSocketExecutor, WebSocketTransport } from "./transport/index.js";
10
+ export * as Transport from "./transport/index.js";
11
+ export type { Definition as AuthShape, AuthInput, Credential, CredentialError } from "./auth.js";
12
+ export type { ApiKeyMode, AuthOverride, ProviderAuthOption } from "./auth-options.js";
13
+ export type { Definition as EndpointFn, EndpointInput } from "./endpoint.js";
14
+ export type { Definition as FramingDef } from "./framing.js";
15
+ export type { Protocol as ProtocolDef } from "./protocol.js";
16
+ export type { HttpHandler, HttpMiddleware, Transport as TransportDef, TransportRuntime } from "./transport/index.js";