@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,4 +1,4 @@
1
- import type { LanguageModel, ModelID, ProviderID } from "./schema";
1
+ import type { LanguageModel, ModelID, ProviderID } from "./schema/index.js";
2
2
  export type LanguageModelOptions = Pick<LanguageModel.Input, "defaults" | "compatibility">;
3
3
  /**
4
4
  * Advanced structural provider definition helper. Built-in providers should
@@ -20,4 +20,4 @@ type DefinitionShape = {
20
20
  };
21
21
  type NoExtraFields<Input, Shape> = Input & Record<Exclude<keyof Input, keyof Shape>, never>;
22
22
  export declare const make: <DefinitionType extends DefinitionShape>(definition: NoExtraFields<DefinitionType, DefinitionShape>) => NoExtraFields<DefinitionType, DefinitionShape>;
23
- export * as Provider from "./provider";
23
+ export * as Provider from "./provider.js";
package/dist/provider.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const make = (definition) => definition;
2
- export * as Provider from "./provider";
2
+ export * as Provider from "./provider.js";
@@ -1,2 +1,2 @@
1
- export { chatModel as model } from "../../amazon-bedrock-mantle";
2
- export type { Settings } from "../../amazon-bedrock-mantle";
1
+ export { chatModel as model } from "../../amazon-bedrock-mantle.js";
2
+ export type { Settings } from "../../amazon-bedrock-mantle.js";
@@ -1 +1 @@
1
- export { chatModel as model } from "../../amazon-bedrock-mantle";
1
+ export { chatModel as model } from "../../amazon-bedrock-mantle.js";
@@ -1,2 +1,2 @@
1
- export { responsesModel as model } from "../../amazon-bedrock-mantle";
2
- export type { Settings } from "../../amazon-bedrock-mantle";
1
+ export { responsesModel as model } from "../../amazon-bedrock-mantle.js";
2
+ export type { Settings } from "../../amazon-bedrock-mantle.js";
@@ -1 +1 @@
1
- export { responsesModel as model } from "../../amazon-bedrock-mantle";
1
+ export { responsesModel as model } from "../../amazon-bedrock-mantle.js";
@@ -1,2 +1,2 @@
1
- export { chatModel as model } from "../amazon-bedrock-mantle";
2
- export type { Settings } from "../amazon-bedrock-mantle";
1
+ export { chatModel as model } from "../amazon-bedrock-mantle.js";
2
+ export type { Settings } from "../amazon-bedrock-mantle.js";
@@ -1 +1 @@
1
- export { chatModel as model } from "../amazon-bedrock-mantle";
1
+ export { chatModel as model } from "../amazon-bedrock-mantle.js";
@@ -1,8 +1,8 @@
1
- import type { Route as RouteDef, RouteDefaultsInput } from "../route/client";
2
- import type { ProviderPackage } from "../provider-package";
3
- import { type Credentials } from "../protocols/utils/bedrock-auth";
4
- import { type ModelID } from "../schema";
5
- import { type OpenAIProviderOptionsInput } from "./openai-options";
1
+ import type { Route as RouteDef, RouteDefaultsInput } from "../route/client.js";
2
+ import type { ProviderPackage } from "../provider-package.js";
3
+ import { type Credentials } from "../protocols/utils/bedrock-auth.js";
4
+ import { type ModelID } from "../schema/index.js";
5
+ import { type OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
7
  export type Config = RouteDefaultsInput & {
8
8
  readonly apiKey?: string;
@@ -115,7 +115,7 @@ export declare const routes: (RouteDef<{
115
115
  readonly reasoning_effort?: string | undefined;
116
116
  readonly frequency_penalty?: number | undefined;
117
117
  readonly presence_penalty?: number | undefined;
118
- }, import("../route/transport/http").HttpPrepared<string>> | RouteDef<{
118
+ }, import("../route/transport/http.js").HttpPrepared<string>> | RouteDef<{
119
119
  readonly input: readonly ({
120
120
  readonly type: "reasoning";
121
121
  readonly summary: readonly {
@@ -221,27 +221,27 @@ export declare const routes: (RouteDef<{
221
221
  readonly prompt_cache_key?: string | undefined;
222
222
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
223
223
  readonly max_output_tokens?: number | undefined;
224
- }, import("../route/transport/http").HttpPrepared<string>>)[];
224
+ }, import("../route/transport/http.js").HttpPrepared<string>>)[];
225
225
  export declare const configure: (input?: Config) => {
226
226
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
227
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
228
- chat: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
229
- responses: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
227
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
228
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
229
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
230
230
  configure: (input?: Config) => /*elided*/ any;
231
231
  };
232
232
  export declare const provider: {
233
233
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
234
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
235
- chat: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
236
- responses: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
234
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
235
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
236
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
237
237
  configure: (input?: Config) => {
238
238
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
239
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
240
- chat: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
241
- responses: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
239
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
240
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
241
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
242
242
  configure: /*elided*/ any;
243
243
  };
244
244
  };
245
245
  export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
246
246
  export declare const responsesModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
247
- export declare const model: (modelID: string, settings: Settings) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
247
+ export declare const model: (modelID: string, settings: Settings) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
@@ -1,9 +1,9 @@
1
- import { Auth } from "../route/auth";
2
- import { OpenAIChat } from "../protocols/openai-chat";
3
- import { OpenAIResponses } from "../protocols/openai-responses";
4
- import { BedrockAuth } from "../protocols/utils/bedrock-auth";
5
- import { ProviderID } from "../schema";
6
- import { withOpenAIOptions } from "./openai-options";
1
+ import { Auth } from "../route/auth.js";
2
+ import { OpenAIChat } from "../protocols/openai-chat.js";
3
+ import { OpenAIResponses } from "../protocols/openai-responses.js";
4
+ import { BedrockAuth } from "../protocols/utils/bedrock-auth.js";
5
+ import { ProviderID } from "../schema/index.js";
6
+ import { withOpenAIOptions } from "./openai-options.js";
7
7
  export const id = ProviderID.make("amazon-bedrock");
8
8
  const responsesRoute = OpenAIResponses.route.with({
9
9
  id: "bedrock-mantle-responses",
@@ -1,7 +1,7 @@
1
- import type { RouteDefaultsInput } from "../route/client";
2
- import type { ProviderPackage } from "../provider-package";
3
- import { type ModelID } from "../schema";
4
- import type { BedrockCredentials } from "../protocols/bedrock-converse";
1
+ import type { RouteDefaultsInput } from "../route/client.js";
2
+ import type { ProviderPackage } from "../provider-package.js";
3
+ import { type ModelID } from "../schema/index.js";
4
+ import type { BedrockCredentials } from "../protocols/bedrock-converse.js";
5
5
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
6
6
  export type Config = RouteDefaultsInput & {
7
7
  readonly apiKey?: string;
@@ -20,7 +20,7 @@ export interface Settings extends ProviderPackage.Settings {
20
20
  readonly region?: string;
21
21
  readonly topP?: number;
22
22
  }
23
- export declare const routes: import("../route").Route<{
23
+ export declare const routes: import("../route/client.js").Route<{
24
24
  readonly messages: readonly ({
25
25
  readonly role: "user";
26
26
  readonly content: readonly ({
@@ -142,10 +142,10 @@ export declare const routes: import("../route").Route<{
142
142
  readonly additionalModelRequestFields?: {
143
143
  readonly [x: string]: unknown;
144
144
  } | undefined;
145
- }, import("../route/transport/http").HttpPrepared<object>>[];
145
+ }, import("../route/transport/http.js").HttpPrepared<object>>[];
146
146
  export declare const configure: (input?: Config) => {
147
147
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
148
- model: (modelID: string | ModelID) => import("..").LanguageModel<{
148
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
149
149
  readonly [x: string]: {
150
150
  readonly [x: string]: unknown;
151
151
  };
@@ -154,14 +154,14 @@ export declare const configure: (input?: Config) => {
154
154
  };
155
155
  export declare const provider: {
156
156
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
157
- model: (modelID: string | ModelID) => import("..").LanguageModel<{
157
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
158
158
  readonly [x: string]: {
159
159
  readonly [x: string]: unknown;
160
160
  };
161
161
  }>;
162
162
  configure: (input?: Config) => {
163
163
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
164
- model: (modelID: string | ModelID) => import("..").LanguageModel<{
164
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
165
165
  readonly [x: string]: {
166
166
  readonly [x: string]: unknown;
167
167
  };
@@ -1,6 +1,6 @@
1
- import { Auth } from "../route/auth";
2
- import { ProviderID } from "../schema";
3
- import * as BedrockConverse from "../protocols/bedrock-converse";
1
+ import { Auth } from "../route/auth.js";
2
+ import { ProviderID } from "../schema/index.js";
3
+ import * as BedrockConverse from "../protocols/bedrock-converse.js";
4
4
  export const id = ProviderID.make("amazon-bedrock");
5
5
  export const routes = [BedrockConverse.route];
6
6
  const bedrockBaseURL = (region) => `https://bedrock-runtime.${region}.amazonaws.com`;
@@ -1,8 +1,8 @@
1
- import type { ProviderPackage } from "../provider-package";
2
- import { AnthropicMessages } from "../protocols/anthropic-messages";
3
- import type { ProviderAuthOption } from "../route/auth-options";
4
- import type { RouteDefaultsInput } from "../route/client";
5
- import { type ModelID } from "../schema";
1
+ import type { ProviderPackage } from "../provider-package.js";
2
+ import { AnthropicMessages } from "../protocols/anthropic-messages.js";
3
+ import type { ProviderAuthOption } from "../route/auth-options.js";
4
+ import type { RouteDefaultsInput } from "../route/client.js";
5
+ import { type ModelID } from "../schema/index.js";
6
6
  export type AnthropicOptionsInput = AnthropicMessages.OptionsInput;
7
7
  export type AnthropicProviderOptionsInput = AnthropicMessages.ProviderOptionsInput;
8
8
  export type AnthropicThinkingInput = AnthropicMessages.ThinkingInput;
@@ -23,7 +23,7 @@ export type Settings = ProviderPackage.Settings & ({
23
23
  readonly provider?: string;
24
24
  readonly providerOptions?: AnthropicMessages.ProviderOptionsInput;
25
25
  };
26
- export declare const routes: import("../route").Route<{
26
+ export declare const routes: import("../route/client.js").Route<{
27
27
  readonly max_tokens: number;
28
28
  readonly model: string;
29
29
  readonly messages: readonly ({
@@ -200,19 +200,19 @@ export declare const routes: import("../route").Route<{
200
200
  readonly output_config?: {
201
201
  readonly effort?: string | undefined;
202
202
  } | undefined;
203
- }, import("../route/transport/http").HttpPrepared<string>>[];
203
+ }, import("../route/transport/http.js").HttpPrepared<string>>[];
204
204
  export declare const configure: (input: Config) => {
205
205
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
206
- model: (modelID: string | ModelID) => import("..").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
206
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
207
207
  configure: (input: Config) => /*elided*/ any;
208
208
  };
209
209
  export declare const provider: {
210
210
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
211
211
  configure: (input: Config) => {
212
212
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
213
- model: (modelID: string | ModelID) => import("..").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
213
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
214
214
  configure: /*elided*/ any;
215
215
  };
216
216
  };
217
217
  export declare const model: ProviderPackage.Definition<Settings, AnthropicMessages.ProviderOptionsInput>["model"];
218
- export * as AnthropicCompatible from "./anthropic-compatible";
218
+ export * as AnthropicCompatible from "./anthropic-compatible.js";
@@ -1,6 +1,6 @@
1
- import { AnthropicMessages } from "../protocols/anthropic-messages";
2
- import { Auth } from "../route/auth";
3
- import { ProviderID } from "../schema";
1
+ import { AnthropicMessages } from "../protocols/anthropic-messages.js";
2
+ import { Auth } from "../route/auth.js";
3
+ import { ProviderID } from "../schema/index.js";
4
4
  export const id = ProviderID.make("anthropic-compatible");
5
5
  export const routes = [AnthropicMessages.route];
6
6
  const auth = (input) => {
@@ -42,4 +42,4 @@ export const model = (modelID, settings) => {
42
42
  providerOptions: settings.providerOptions,
43
43
  }).model(modelID);
44
44
  };
45
- export * as AnthropicCompatible from "./anthropic-compatible";
45
+ export * as AnthropicCompatible from "./anthropic-compatible.js";
@@ -1,13 +1,13 @@
1
- import type { RouteDefaultsInput } from "../route/client";
2
- import type { ProviderAuthOption } from "../route/auth-options";
3
- import type { ProviderPackage } from "../provider-package";
4
- import { type ModelID } from "../schema";
5
- import { AnthropicMessages } from "../protocols/anthropic-messages";
1
+ import type { RouteDefaultsInput } from "../route/client.js";
2
+ import type { ProviderAuthOption } from "../route/auth-options.js";
3
+ import type { ProviderPackage } from "../provider-package.js";
4
+ import { type ModelID } from "../schema/index.js";
5
+ import { AnthropicMessages } from "../protocols/anthropic-messages.js";
6
6
  export type AnthropicOptionsInput = AnthropicMessages.OptionsInput;
7
7
  export type AnthropicProviderOptionsInput = AnthropicMessages.ProviderOptionsInput;
8
8
  export type AnthropicThinkingInput = AnthropicMessages.ThinkingInput;
9
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
10
- export declare const routes: import("../route").Route<{
10
+ export declare const routes: import("../route/client.js").Route<{
11
11
  readonly max_tokens: number;
12
12
  readonly model: string;
13
13
  readonly messages: readonly ({
@@ -184,7 +184,7 @@ export declare const routes: import("../route").Route<{
184
184
  readonly output_config?: {
185
185
  readonly effort?: string | undefined;
186
186
  } | undefined;
187
- }, import("../route/transport/http").HttpPrepared<string>>[];
187
+ }, import("../route/transport/http.js").HttpPrepared<string>>[];
188
188
  export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
189
189
  readonly baseURL?: string;
190
190
  readonly providerOptions?: AnthropicMessages.ProviderOptionsInput;
@@ -201,15 +201,15 @@ export type Settings = ProviderPackage.Settings & ({
201
201
  };
202
202
  export declare const configure: (input?: Config) => {
203
203
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
204
- model: (modelID: string | ModelID) => import("..").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
204
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
205
205
  configure: (input?: Config) => /*elided*/ any;
206
206
  };
207
207
  export declare const provider: {
208
208
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
209
- model: (modelID: string | ModelID) => import("..").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
209
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
210
210
  configure: (input?: Config) => {
211
211
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
212
- model: (modelID: string | ModelID) => import("..").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
212
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
213
213
  configure: /*elided*/ any;
214
214
  };
215
215
  };
@@ -1,7 +1,7 @@
1
- import { Auth } from "../route/auth";
2
- import { ProviderID } from "../schema";
3
- import { AnthropicMessages } from "../protocols/anthropic-messages";
4
- import { AnthropicCompatible } from "./anthropic-compatible";
1
+ import { Auth } from "../route/auth.js";
2
+ import { ProviderID } from "../schema/index.js";
3
+ import { AnthropicMessages } from "../protocols/anthropic-messages.js";
4
+ import { AnthropicCompatible } from "./anthropic-compatible.js";
5
5
  export const id = ProviderID.make("anthropic");
6
6
  export const routes = [AnthropicMessages.route];
7
7
  const auth = (options) => {
@@ -1,2 +1,2 @@
1
- export { chatModel as model } from "../azure";
2
- export type { Settings } from "../azure";
1
+ export { chatModel as model } from "../azure.js";
2
+ export type { Settings } from "../azure.js";
@@ -1 +1 @@
1
- export { chatModel as model } from "../azure";
1
+ export { chatModel as model } from "../azure.js";
@@ -1,2 +1,2 @@
1
- export { responsesModel as model } from "../azure";
2
- export type { Settings } from "../azure";
1
+ export { responsesModel as model } from "../azure.js";
2
+ export type { Settings } from "../azure.js";
@@ -1 +1 @@
1
- export { responsesModel as model } from "../azure";
1
+ export { responsesModel as model } from "../azure.js";
@@ -1,8 +1,8 @@
1
- import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options";
2
- import type { Route as RouteDef, RouteDefaultsInput } from "../route/client";
3
- import type { ProviderPackage } from "../provider-package";
4
- import { type ModelID } from "../schema";
5
- import { type OpenAIProviderOptionsInput } from "./openai-options";
1
+ import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options.js";
2
+ import type { Route as RouteDef, RouteDefaultsInput } from "../route/client.js";
3
+ import type { ProviderPackage } from "../provider-package.js";
4
+ import { type ModelID } from "../schema/index.js";
5
+ import { type OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
7
  type AzureURL = AtLeastOne<{
8
8
  readonly resourceName: string;
@@ -118,7 +118,7 @@ export declare const routes: (RouteDef<{
118
118
  readonly reasoning_effort?: string | undefined;
119
119
  readonly frequency_penalty?: number | undefined;
120
120
  readonly presence_penalty?: number | undefined;
121
- }, import("../route/transport/http").HttpPrepared<string>> | RouteDef<{
121
+ }, import("../route/transport/http.js").HttpPrepared<string>> | RouteDef<{
122
122
  readonly input: readonly ({
123
123
  readonly type: "reasoning";
124
124
  readonly summary: readonly {
@@ -224,25 +224,25 @@ export declare const routes: (RouteDef<{
224
224
  readonly prompt_cache_key?: string | undefined;
225
225
  readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
226
226
  readonly max_output_tokens?: number | undefined;
227
- }, import("../route/transport/http").HttpPrepared<string>>)[];
227
+ }, import("../route/transport/http.js").HttpPrepared<string>>)[];
228
228
  export declare const configure: (input: Config) => {
229
229
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
230
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
231
- responses: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
232
- chat: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
230
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
231
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
232
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
233
233
  configure: (input: Config) => /*elided*/ any;
234
234
  };
235
235
  export declare const provider: {
236
236
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
237
237
  configure: (input: Config) => {
238
238
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
239
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
240
- responses: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
241
- chat: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
239
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
240
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
241
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
242
242
  configure: /*elided*/ any;
243
243
  };
244
244
  };
245
245
  export declare const responsesModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
246
246
  export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
247
- export declare const model: (modelID: string, settings: Settings) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
247
+ export declare const model: (modelID: string, settings: Settings) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
248
248
  export {};
@@ -1,10 +1,10 @@
1
- import { Auth } from "../route/auth";
2
- import {} from "../route/auth-options";
3
- import { ProviderID } from "../schema";
4
- import * as OpenAIChat from "../protocols/openai-chat";
5
- import * as OpenAIResponses from "../protocols/openai-responses";
6
- import { ProviderShared } from "../protocols/shared";
7
- import { withOpenAIOptions } from "./openai-options";
1
+ import { Auth } from "../route/auth.js";
2
+ import {} from "../route/auth-options.js";
3
+ import { ProviderID } from "../schema/index.js";
4
+ import * as OpenAIChat from "../protocols/openai-chat.js";
5
+ import * as OpenAIResponses from "../protocols/openai-responses.js";
6
+ import { ProviderShared } from "../protocols/shared.js";
7
+ import { withOpenAIOptions } from "./openai-options.js";
8
8
  export const id = ProviderID.make("azure");
9
9
  const routeAuth = Auth.remove("authorization");
10
10
  const resourceBaseURL = (resourceName) => `https://${resourceName.trim()}.openai.azure.com/openai`;
@@ -1,8 +1,8 @@
1
1
  import type { Config, Redacted } from "effect";
2
- import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options";
3
- import type { RouteDefaultsInput } from "../route/client";
4
- import { type ModelID } from "../schema";
5
- import type { OpenAIProviderOptionsInput } from "./openai-options";
2
+ import { type AtLeastOne, type ProviderAuthOption } from "../route/auth-options.js";
3
+ import type { RouteDefaultsInput } from "../route/client.js";
4
+ import { type ModelID } from "../schema/index.js";
5
+ import type { OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const aiGatewayID: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
7
  export declare const workersAIID: string & import("effect/Brand").Brand<"AI.ProviderID">;
8
8
  export declare const aiGatewayAuthEnvVars: readonly ["CLOUDFLARE_API_TOKEN", "CF_AIG_TOKEN"];
@@ -28,7 +28,7 @@ export type WorkersAIOptions = WorkersAIURL & Omit<RouteDefaultsInput, "provider
28
28
  };
29
29
  export declare const aiGatewayBaseURL: (input: GatewayURL) => string;
30
30
  export declare const workersAIBaseURL: (input: WorkersAIURL) => string;
31
- export declare const aiGatewayRoute: import("../route").Route<{
31
+ export declare const aiGatewayRoute: import("../route/client.js").Route<{
32
32
  readonly model: string;
33
33
  readonly messages: readonly ({
34
34
  readonly role: "system";
@@ -124,8 +124,8 @@ export declare const aiGatewayRoute: import("../route").Route<{
124
124
  readonly reasoning_effort?: string | undefined;
125
125
  readonly frequency_penalty?: number | undefined;
126
126
  readonly presence_penalty?: number | undefined;
127
- }, import("../route/transport/http").HttpPrepared<string>>;
128
- export declare const workersAIRoute: import("../route").Route<{
127
+ }, import("../route/transport/http.js").HttpPrepared<string>>;
128
+ export declare const workersAIRoute: import("../route/client.js").Route<{
129
129
  readonly model: string;
130
130
  readonly messages: readonly ({
131
131
  readonly role: "system";
@@ -221,8 +221,8 @@ export declare const workersAIRoute: import("../route").Route<{
221
221
  readonly reasoning_effort?: string | undefined;
222
222
  readonly frequency_penalty?: number | undefined;
223
223
  readonly presence_penalty?: number | undefined;
224
- }, import("../route/transport/http").HttpPrepared<string>>;
225
- export declare const routes: import("../route").Route<{
224
+ }, import("../route/transport/http.js").HttpPrepared<string>>;
225
+ export declare const routes: import("../route/client.js").Route<{
226
226
  readonly model: string;
227
227
  readonly messages: readonly ({
228
228
  readonly role: "system";
@@ -318,12 +318,12 @@ export declare const routes: import("../route").Route<{
318
318
  readonly reasoning_effort?: string | undefined;
319
319
  readonly frequency_penalty?: number | undefined;
320
320
  readonly presence_penalty?: number | undefined;
321
- }, import("../route/transport/http").HttpPrepared<string>>[];
321
+ }, import("../route/transport/http.js").HttpPrepared<string>>[];
322
322
  export declare const CloudflareAIGateway: {
323
323
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
324
324
  configure: (options: AIGatewayOptions) => {
325
325
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
326
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
326
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
327
327
  configure: /*elided*/ any;
328
328
  };
329
329
  };
@@ -331,7 +331,7 @@ export declare const CloudflareWorkersAI: {
331
331
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
332
332
  configure: (options: WorkersAIOptions) => {
333
333
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
334
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
334
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
335
335
  configure: /*elided*/ any;
336
336
  };
337
337
  };
@@ -1,7 +1,7 @@
1
- import * as OpenAICompatibleChat from "../protocols/openai-compatible-chat";
2
- import { Auth } from "../route/auth";
3
- import { AuthOptions } from "../route/auth-options";
4
- import { ProviderID } from "../schema";
1
+ import * as OpenAICompatibleChat from "../protocols/openai-compatible-chat.js";
2
+ import { Auth } from "../route/auth.js";
3
+ import { AuthOptions } from "../route/auth-options.js";
4
+ import { ProviderID } from "../schema/index.js";
5
5
  export const aiGatewayID = ProviderID.make("cloudflare-ai-gateway");
6
6
  export const workersAIID = ProviderID.make("cloudflare-workers-ai");
7
7
  export const aiGatewayAuthEnvVars = ["CLOUDFLARE_API_TOKEN", "CF_AIG_TOKEN"];
@@ -1,2 +1,2 @@
1
- export { model } from "../google-vertex-chat";
2
- export type { Settings } from "../google-vertex-chat";
1
+ export { model } from "../google-vertex-chat.js";
2
+ export type { Settings } from "../google-vertex-chat.js";
@@ -1 +1 @@
1
- export { model } from "../google-vertex-chat";
1
+ export { model } from "../google-vertex-chat.js";
@@ -1,2 +1,2 @@
1
- export { model } from "../google-vertex";
2
- export type { Settings } from "../google-vertex";
1
+ export { model } from "../google-vertex.js";
2
+ export type { Settings } from "../google-vertex.js";
@@ -1 +1 @@
1
- export { model } from "../google-vertex";
1
+ export { model } from "../google-vertex.js";
@@ -1,2 +1,2 @@
1
- export { model } from "../google-vertex-messages";
2
- export type { Settings } from "../google-vertex-messages";
1
+ export { model } from "../google-vertex-messages.js";
2
+ export type { Settings } from "../google-vertex-messages.js";
@@ -1 +1 @@
1
- export { model } from "../google-vertex-messages";
1
+ export { model } from "../google-vertex-messages.js";
@@ -1,2 +1,2 @@
1
- export { model } from "../google-vertex-responses";
2
- export type { Settings } from "../google-vertex-responses";
1
+ export { model } from "../google-vertex-responses.js";
2
+ export type { Settings } from "../google-vertex-responses.js";
@@ -1 +1 @@
1
- export { model } from "../google-vertex-responses";
1
+ export { model } from "../google-vertex-responses.js";
@@ -1,8 +1,8 @@
1
- import type { ProviderPackage } from "../provider-package";
2
- import type { RouteDefaultsInput } from "../route/client";
3
- import { type ModelID } from "../schema";
4
- import { GoogleVertexShared } from "./google-vertex-shared";
5
- import type { OpenAIProviderOptionsInput } from "./openai-options";
1
+ import type { ProviderPackage } from "../provider-package.js";
2
+ import type { RouteDefaultsInput } from "../route/client.js";
3
+ import { type ModelID } from "../schema/index.js";
4
+ import { GoogleVertexShared } from "./google-vertex-shared.js";
5
+ import type { OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
7
  export type Config = RouteDefaultsInput & GoogleVertexShared.OAuthOptions & {
8
8
  readonly baseURL?: string;
@@ -18,7 +18,7 @@ export interface Settings extends ProviderPackage.Settings {
18
18
  readonly project?: string;
19
19
  readonly providerOptions?: OpenAIProviderOptionsInput;
20
20
  }
21
- export declare const routes: import("../route").Route<{
21
+ export declare const routes: import("../route/client.js").Route<{
22
22
  readonly model: string;
23
23
  readonly messages: readonly ({
24
24
  readonly role: "system";
@@ -114,17 +114,17 @@ export declare const routes: import("../route").Route<{
114
114
  readonly reasoning_effort?: string | undefined;
115
115
  readonly frequency_penalty?: number | undefined;
116
116
  readonly presence_penalty?: number | undefined;
117
- }, import("../route/transport/http").HttpPrepared<string>>[];
117
+ }, import("../route/transport/http.js").HttpPrepared<string>>[];
118
118
  export declare const configure: (input?: Config) => {
119
119
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
120
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
120
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
121
121
  configure: (input?: Config) => /*elided*/ any;
122
122
  };
123
123
  export declare const provider: {
124
124
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
125
125
  configure: (input?: Config) => {
126
126
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
127
- model: (modelID: string | ModelID) => import("..").LanguageModel<OpenAIProviderOptionsInput>;
127
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
128
128
  configure: /*elided*/ any;
129
129
  };
130
130
  };
@@ -1,6 +1,6 @@
1
- import { OpenAICompatibleChat } from "../protocols/openai-compatible-chat";
2
- import { ProviderID } from "../schema";
3
- import { GoogleVertexShared } from "./google-vertex-shared";
1
+ import { OpenAICompatibleChat } from "../protocols/openai-compatible-chat.js";
2
+ import { ProviderID } from "../schema/index.js";
3
+ import { GoogleVertexShared } from "./google-vertex-shared.js";
4
4
  export const id = ProviderID.make("google-vertex");
5
5
  const route = OpenAICompatibleChat.route.with({
6
6
  id: "google-vertex-chat",