@opencode/ai 0.0.0-dev-794 → 0.0.0-dev-821

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 (79) hide show
  1. package/dist/protocols/alibaba-chat.d.ts +5 -1
  2. package/dist/protocols/alibaba-chat.js +1 -1
  3. package/dist/protocols/anthropic-messages.js +6 -4
  4. package/dist/protocols/openai-chat.js +4 -4
  5. package/dist/protocols/openai-compatible-responses.js +1 -1
  6. package/dist/protocols/openai-responses.js +2 -2
  7. package/dist/protocols/shared.js +1 -1
  8. package/dist/protocols/venice-chat.d.ts +3 -1
  9. package/dist/protocols/venice-chat.js +2 -2
  10. package/dist/protocols/zai-chat.d.ts +5 -1
  11. package/dist/protocols/zai-chat.js +1 -1
  12. package/dist/providers/alibaba.d.ts +3 -3
  13. package/dist/providers/alibaba.js +3 -1
  14. package/dist/providers/amazon-bedrock-mantle.d.ts +3 -3
  15. package/dist/providers/amazon-bedrock-mantle.js +2 -2
  16. package/dist/providers/amazon-bedrock.d.ts +6 -7
  17. package/dist/providers/anthropic-compatible.d.ts +5 -6
  18. package/dist/providers/anthropic.d.ts +6 -7
  19. package/dist/providers/azure.d.ts +3 -3
  20. package/dist/providers/azure.js +2 -2
  21. package/dist/providers/baseten.d.ts +3 -3
  22. package/dist/providers/cerebras.d.ts +3 -3
  23. package/dist/providers/cerebras.js +1 -1
  24. package/dist/providers/cloudflare-ai-gateway.d.ts +12 -13
  25. package/dist/providers/cloudflare-workers-ai.d.ts +3 -3
  26. package/dist/providers/cohere.d.ts +3 -3
  27. package/dist/providers/cohere.js +1 -1
  28. package/dist/providers/deepinfra.d.ts +3 -3
  29. package/dist/providers/deepinfra.js +1 -1
  30. package/dist/providers/deepseek.d.ts +3 -3
  31. package/dist/providers/digitalocean.d.ts +3 -3
  32. package/dist/providers/digitalocean.js +2 -4
  33. package/dist/providers/fireworks.d.ts +3 -3
  34. package/dist/providers/fireworks.js +1 -1
  35. package/dist/providers/google-vertex-chat.d.ts +3 -3
  36. package/dist/providers/google-vertex-interactions.d.ts +3 -3
  37. package/dist/providers/google-vertex-messages.d.ts +3 -3
  38. package/dist/providers/google-vertex-mistral.d.ts +3 -3
  39. package/dist/providers/google-vertex-responses.d.ts +3 -3
  40. package/dist/providers/google-vertex-responses.js +1 -1
  41. package/dist/providers/google-vertex-shared.d.ts +3 -2
  42. package/dist/providers/google-vertex.d.ts +3 -3
  43. package/dist/providers/google.d.ts +13 -14
  44. package/dist/providers/groq.d.ts +3 -3
  45. package/dist/providers/groq.js +1 -1
  46. package/dist/providers/meta.d.ts +3 -3
  47. package/dist/providers/meta.js +4 -3
  48. package/dist/providers/minimax.d.ts +3 -3
  49. package/dist/providers/minimax.js +2 -2
  50. package/dist/providers/mistral.d.ts +8 -9
  51. package/dist/providers/moonshot.d.ts +3 -3
  52. package/dist/providers/moonshot.js +1 -2
  53. package/dist/providers/openai-compatible-responses.d.ts +5 -6
  54. package/dist/providers/openai-compatible.d.ts +5 -6
  55. package/dist/providers/openai-compatible.js +1 -1
  56. package/dist/providers/openai.d.ts +3 -3
  57. package/dist/providers/openai.js +2 -2
  58. package/dist/providers/openrouter.d.ts +3 -3
  59. package/dist/providers/openrouter.js +3 -3
  60. package/dist/providers/settings.d.ts +1 -1
  61. package/dist/providers/togetherai.d.ts +3 -3
  62. package/dist/providers/togetherai.js +2 -1
  63. package/dist/providers/venice.d.ts +3 -3
  64. package/dist/providers/venice.js +6 -2
  65. package/dist/providers/vercel-ai-gateway.d.ts +3 -3
  66. package/dist/providers/vercel-ai-gateway.js +3 -3
  67. package/dist/providers/xai.d.ts +3 -3
  68. package/dist/providers/xai.js +1 -1
  69. package/dist/providers/zai-coding-plan.d.ts +3 -3
  70. package/dist/providers/zai-coding-plan.js +5 -1
  71. package/dist/providers/zai.d.ts +3 -3
  72. package/dist/providers/zai.js +5 -1
  73. package/dist/public.d.ts +1 -1
  74. package/dist/route/client.d.ts +8 -9
  75. package/dist/route/client.js +10 -18
  76. package/dist/route/index.d.ts +1 -1
  77. package/dist/schema/options.d.ts +70 -11
  78. package/dist/schema/options.js +18 -14
  79. package/package.json +3 -3
@@ -1,10 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import type { ProviderAuthOption } from "../route/auth-options.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID } from "../schema/index.js";
3
+ import { Route } from "../route/client.js";
4
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
5
5
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
7
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
8
8
  readonly baseURL?: string;
9
9
  readonly providerOptions?: OpenAIProviderOptionsInput;
10
10
  };
@@ -29,8 +29,8 @@ export const configure = (input = {}) => {
29
29
  compatibility: {
30
30
  maxTokensField: "max_tokens",
31
31
  reasoningField: "reasoning_content",
32
- supportsPromptCacheKey: true,
33
32
  },
33
+ capabilities: { promptCacheKey: true },
34
34
  }),
35
35
  configure,
36
36
  };
@@ -1,10 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import type { ProviderAuthOption } from "../route/auth-options.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID } from "../schema/index.js";
3
+ import { Route } from "../route/client.js";
4
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
5
5
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
7
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
8
8
  readonly baseURL?: string;
9
9
  readonly providerOptions?: OpenAIProviderOptionsInput;
10
10
  };
@@ -1,13 +1,13 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { OpenAIChat } from "../protocols/openai-chat.js";
3
3
  import type { ProviderAuthOption } from "../route/auth-options.js";
4
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
+ import { Route } from "../route/client.js";
5
5
  import { Protocol } from "../route/protocol.js";
6
- import { type ModelID, type ProviderOptions } from "../schema/index.js";
6
+ import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
7
7
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
8
8
  import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
9
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
10
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
10
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
11
11
  readonly baseURL?: string;
12
12
  readonly providerOptions?: OpenAIProviderOptionsInput | OpenResponsesProviderOptionsInput;
13
13
  };
@@ -34,7 +34,7 @@ const responsesRoute = Route.make({
34
34
  protocol: OpenResponses.protocol,
35
35
  endpoint: Endpoint.path("/responses", { baseURL }),
36
36
  transport: OpenResponses.httpTransport,
37
- defaults: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
37
+ options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
38
38
  });
39
39
  export const routes = [route, responsesRoute];
40
40
  export const configure = (input = {}) => {
@@ -55,9 +55,7 @@ export const configure = (input = {}) => {
55
55
  const image = (modelID, providerOptions) => OpenAIImages.model({ ...media, id: modelID, provider: id, providerOptions });
56
56
  const chat = (modelID) => configured.model({
57
57
  id: modelID,
58
- compatibility: {
59
- supportsPromptCacheKey: true,
60
- },
58
+ capabilities: { promptCacheKey: true },
61
59
  });
62
60
  return {
63
61
  id,
@@ -1,10 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import type { ProviderAuthOption } from "../route/auth-options.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID } from "../schema/index.js";
3
+ import { Route } from "../route/client.js";
4
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
5
5
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
7
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
8
8
  readonly baseURL?: string;
9
9
  readonly providerOptions?: OpenAIProviderOptionsInput;
10
10
  };
@@ -18,7 +18,7 @@ export const configure = (input = {}) => {
18
18
  const configured = route.with(bearerRouteDefaults(input, "FIREWORKS_API_KEY", baseURL));
19
19
  return {
20
20
  id,
21
- model: (modelID) => configured.model({ id: modelID, compatibility: { supportsPromptCacheKey: true } }),
21
+ model: (modelID) => configured.model({ id: modelID, capabilities: { promptCacheKey: true } }),
22
22
  configure,
23
23
  };
24
24
  };
@@ -1,10 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
- import { Route, type RouteDefaultsInput } from "../route/client.js";
3
- import { type ModelID } from "../schema/index.js";
2
+ import { Route } from "../route/client.js";
3
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
4
4
  import { GoogleVertexShared } from "./google-vertex-shared.js";
5
5
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
- export type Config = RouteDefaultsInput & GoogleVertexShared.OAuthOptions & {
7
+ export type Config = RequestOptions & GoogleVertexShared.OAuthOptions & {
8
8
  readonly baseURL?: string;
9
9
  readonly location?: string;
10
10
  readonly project?: string;
@@ -1,11 +1,11 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { GoogleInteractions } from "../protocols/google-interactions.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID } from "../schema/index.js";
3
+ import { Route } from "../route/client.js";
4
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
5
5
  import { GoogleVertexShared } from "./google-vertex-shared.js";
6
6
  export type GoogleInteractionsOptionsInput = GoogleInteractions.OptionsInput;
7
7
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
8
- export type Config = RouteDefaultsInput & GoogleVertexShared.ApiKeyOptions & {
8
+ export type Config = RequestOptions & GoogleVertexShared.ApiKeyOptions & {
9
9
  readonly baseURL?: string;
10
10
  readonly location?: string;
11
11
  readonly project?: string;
@@ -1,13 +1,13 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { AnthropicMessages } from "../protocols/anthropic-messages.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID } from "../schema/index.js";
3
+ import { Route } from "../route/client.js";
4
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
5
5
  import { GoogleVertexShared } from "./google-vertex-shared.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 type Config = RouteDefaultsInput & GoogleVertexShared.OAuthOptions & {
10
+ export type Config = RequestOptions & GoogleVertexShared.OAuthOptions & {
11
11
  readonly baseURL?: string;
12
12
  readonly location?: string;
13
13
  readonly project?: string;
@@ -1,11 +1,11 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { MistralChat } from "../protocols/mistral-chat.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
3
+ import { Route } from "../route/client.js";
4
4
  import { HttpTransport } from "../route/transport/index.js";
5
- import { type ModelID } from "../schema/index.js";
5
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
6
6
  import { GoogleVertexShared } from "./google-vertex-shared.js";
7
7
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
8
- export type Config = RouteDefaultsInput & GoogleVertexShared.OAuthOptions & {
8
+ export type Config = RequestOptions & GoogleVertexShared.OAuthOptions & {
9
9
  readonly baseURL?: string;
10
10
  readonly location?: string;
11
11
  readonly project?: string;
@@ -1,10 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
- import { Route, type RouteDefaultsInput } from "../route/client.js";
3
- import { type ModelID } from "../schema/index.js";
2
+ import { Route } from "../route/client.js";
3
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
4
4
  import { GoogleVertexShared } from "./google-vertex-shared.js";
5
5
  import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
- export type Config = RouteDefaultsInput & GoogleVertexShared.OAuthOptions & {
7
+ export type Config = RequestOptions & GoogleVertexShared.OAuthOptions & {
8
8
  readonly baseURL?: string;
9
9
  readonly location?: string;
10
10
  readonly project?: string;
@@ -11,7 +11,7 @@ const route = Route.make({
11
11
  protocol: OpenResponses.protocol,
12
12
  endpoint: Endpoint.path(OpenResponses.PATH),
13
13
  transport: OpenResponses.httpTransport,
14
- defaults: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
14
+ options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
15
15
  });
16
16
  export const routes = [route];
17
17
  const configuredRoute = (input) => GoogleVertexShared.oauthRoute(route, "Responses", input, (project, location) => `https://aiplatform.googleapis.com/v1/projects/${project}/locations/${location}/endpoints/openapi`);
@@ -1,7 +1,8 @@
1
1
  import type { AnyAuthClient } from "google-auth-library";
2
2
  import type { ProviderPackage } from "../provider-package.js";
3
3
  import { Auth } from "../route/auth.js";
4
- import type { CompactionOperations, Route, RouteDefaultsInput } from "../route/client.js";
4
+ import type { CompactionOperations, Route } from "../route/client.js";
5
+ import { type RequestOptions } from "../schema/index.js";
5
6
  export declare const loadADCClient: (project?: string) => Promise<AnyAuthClient>;
6
7
  export type OAuthOptions = {
7
8
  readonly accessToken?: string;
@@ -26,7 +27,7 @@ export declare const apiKey: (input: ApiKeyOptions & {
26
27
  readonly location?: string;
27
28
  }) => string | undefined;
28
29
  export declare const oauth: (input: OAuthOptions, project?: string) => Auth.Definition;
29
- export declare const oauthRoute: <Body, Prepared, Compact extends CompactionOperations | undefined>(route: Route<Body, Prepared, Compact>, label: string, input: RouteDefaultsInput & OAuthOptions & {
30
+ export declare const oauthRoute: <Body, Prepared, Compact extends CompactionOperations | undefined>(route: Route<Body, Prepared, Compact>, label: string, input: RequestOptions & OAuthOptions & {
30
31
  readonly baseURL?: string;
31
32
  readonly location?: string;
32
33
  readonly project?: string;
@@ -1,14 +1,14 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { Gemini } from "../protocols/gemini.js";
3
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID, type ProviderOptions } from "../schema/index.js";
3
+ import { Route } from "../route/client.js";
4
+ import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
5
5
  import { GoogleVertexShared } from "./google-vertex-shared.js";
6
6
  export interface GeminiOptionsInput extends Gemini.OptionsInput {
7
7
  readonly labels?: Readonly<Record<string, string>>;
8
8
  }
9
9
  export type GeminiProviderOptionsInput = GeminiOptionsInput;
10
10
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
11
- export type Config = RouteDefaultsInput & GoogleVertexShared.ApiKeyOptions & {
11
+ export type Config = RequestOptions & GoogleVertexShared.ApiKeyOptions & {
12
12
  readonly baseURL?: string;
13
13
  readonly location?: string;
14
14
  readonly project?: string;
@@ -1,7 +1,6 @@
1
- import type { RouteDefaultsInput } from "../route/client.js";
2
1
  import { type ProviderAuthOption } from "../route/auth-options.js";
3
2
  import type { ProviderPackage } from "../provider-package.js";
4
- import { type ModelID, type ProviderOptions } from "../schema/index.js";
3
+ import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
5
4
  import { Gemini } from "../protocols/gemini.js";
6
5
  import { GoogleInteractions } from "../protocols/google-interactions.js";
7
6
  export type { GoogleImageOptions } from "../protocols/google-images.js";
@@ -12,7 +11,7 @@ export type GeminiOptionsInput = Gemini.OptionsInput;
12
11
  export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
13
12
  export type GoogleInteractionsOptionsInput = GoogleInteractions.OptionsInput;
14
13
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
15
- export declare const routes: (import("../route/client.js").Route<{
14
+ export declare const routes: (import("../route.js").Route<{
16
15
  readonly cachedContent?: string | undefined;
17
16
  readonly contents: readonly {
18
17
  readonly role?: "model" | "user" | null | undefined;
@@ -97,7 +96,7 @@ export declare const routes: (import("../route/client.js").Route<{
97
96
  } | undefined;
98
97
  } | undefined;
99
98
  readonly continuationToken?: string | undefined;
100
- }, Gemini.Prepared, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
99
+ }, Gemini.Prepared, import("../route.js").CompactionOperations | undefined> | import("../route.js").Route<{
101
100
  readonly model: string;
102
101
  readonly input: readonly ({
103
102
  readonly type: "model_output" | "user_input";
@@ -158,8 +157,8 @@ export declare const routes: (import("../route/client.js").Route<{
158
157
  };
159
158
  } | undefined;
160
159
  };
161
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
162
- export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
160
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route.js").CompactionOperations | undefined>)[];
161
+ export type Config = RequestOptions & ProviderAuthOption<"optional"> & {
163
162
  readonly baseURL?: string;
164
163
  readonly providerOptions?: Gemini.ProviderOptionsInput & GoogleInteractions.ProviderOptionsInput;
165
164
  };
@@ -169,15 +168,15 @@ export type Settings = ProviderPackage.Settings & Gemini.ProviderOptionsInput &
169
168
  };
170
169
  export declare const configure: (input?: Config) => {
171
170
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
172
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
173
- gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
171
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
172
+ gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
174
173
  interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
175
174
  readonly previousInteractionId?: string | undefined;
176
175
  readonly store?: boolean | undefined;
177
176
  readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
178
177
  readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
179
178
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
180
- }, import("../route/client.js").CompactionOperations | undefined>;
179
+ }, import("../route.js").CompactionOperations | undefined>;
181
180
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
182
181
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
183
182
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -186,15 +185,15 @@ export declare const configure: (input?: Config) => {
186
185
  };
187
186
  export declare const provider: {
188
187
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
189
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
190
- gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
188
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
189
+ gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
191
190
  interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
192
191
  readonly previousInteractionId?: string | undefined;
193
192
  readonly store?: boolean | undefined;
194
193
  readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
195
194
  readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
196
195
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
197
- }, import("../route/client.js").CompactionOperations | undefined>;
196
+ }, import("../route.js").CompactionOperations | undefined>;
198
197
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
199
198
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
200
199
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -204,14 +203,14 @@ export declare const provider: {
204
203
  export declare const model: ProviderPackage.Model<Settings, Gemini.ProviderOptionsInput>;
205
204
  export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
206
205
  export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
207
- export declare const gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
206
+ export declare const gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
208
207
  export declare const interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
209
208
  readonly previousInteractionId?: string | undefined;
210
209
  readonly store?: boolean | undefined;
211
210
  readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
212
211
  readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
213
212
  readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
214
- }, import("../route/client.js").CompactionOperations | undefined>;
213
+ }, import("../route.js").CompactionOperations | undefined>;
215
214
  export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
216
215
  export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
217
216
  export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
@@ -1,9 +1,9 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { OpenAIChat } from "../protocols/openai-chat.js";
3
3
  import type { ProviderAuthOption } from "../route/auth-options.js";
4
- import { Route, type RouteDefaultsInput } from "../route/client.js";
4
+ import { Route } from "../route/client.js";
5
5
  import { Protocol } from "../route/protocol.js";
6
- import { type ModelID } from "../schema/index.js";
6
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
7
7
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
8
8
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
9
9
  export type ProviderOptions = Pick<OpenAIProviderOptionsInput, "reasoningEffort"> & {
@@ -13,7 +13,7 @@ export type ProviderOptions = Pick<OpenAIProviderOptionsInput, "reasoningEffort"
13
13
  readonly serviceTier?: "on_demand" | "flex" | "auto" | "performance" | (string & {});
14
14
  readonly user?: string;
15
15
  };
16
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
16
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
17
17
  readonly baseURL?: string;
18
18
  readonly providerOptions?: ProviderOptions;
19
19
  };
@@ -52,8 +52,8 @@ export const configure = (input = {}) => {
52
52
  maxTokensField: "max_completion_tokens",
53
53
  reasoningField: "reasoning",
54
54
  requireReasoning: false,
55
- supportsStrictMode: false,
56
55
  },
56
+ capabilities: { tools: { strict: false } },
57
57
  }),
58
58
  configure,
59
59
  };
@@ -2,8 +2,8 @@ import type { ProviderPackage } from "../provider-package.js";
2
2
  import { AnthropicMessages } from "../protocols/anthropic-messages.js";
3
3
  import { MetaImages } from "../protocols/meta-images.js";
4
4
  import type { ProviderAuthOption } from "../route/auth-options.js";
5
- import { Route, type RouteDefaultsInput } from "../route/client.js";
6
- import { ToolDefinition, type ModelID, type OpenString } from "../schema/index.js";
5
+ import { Route } from "../route/client.js";
6
+ import { ToolDefinition, type ModelID, type OpenString, type RequestOptions } from "../schema/index.js";
7
7
  import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
8
8
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
9
9
  export type ProviderOptionsInput = OpenResponsesProviderOptionsInput & Pick<AnthropicMessages.OptionsInput, "thinking" | "effort">;
@@ -30,7 +30,7 @@ export interface ImageGenerationOptions {
30
30
  readonly enableShell?: boolean;
31
31
  }
32
32
  export declare const imageGeneration: (options?: ImageGenerationOptions) => ToolDefinition;
33
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
33
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
34
34
  readonly baseURL?: string;
35
35
  readonly providerOptions?: ProviderOptionsInput;
36
36
  };
@@ -46,7 +46,7 @@ const responsesRoute = Route.make({
46
46
  endpoint: Endpoint.path("/responses", { baseURL }),
47
47
  // Meta Responses does not support WebSocket upgrades; always use HTTP/SSE.
48
48
  transport: MetaResponses.httpTransport,
49
- defaults: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
49
+ options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
50
50
  });
51
51
  const chatRoute = Route.make({
52
52
  id: "meta-chat",
@@ -63,7 +63,7 @@ const messagesRoute = Route.make({
63
63
  protocol: MetaMessages.protocol,
64
64
  endpoint: Endpoint.path("/messages", { baseURL }),
65
65
  framing: AnthropicMessages.framing,
66
- defaults: { providerOptions: { thinking: { type: "adaptive", display: "omitted" } } },
66
+ options: { providerOptions: { thinking: { type: "adaptive", display: "omitted" } } },
67
67
  });
68
68
  export const routes = [responsesRoute, chatRoute, messagesRoute];
69
69
  export const configure = (input = {}) => {
@@ -74,7 +74,8 @@ export const configure = (input = {}) => {
74
74
  const responses = (modelID) => configuredResponses.model({ id: modelID });
75
75
  const chat = (modelID) => configuredChat.model({
76
76
  id: modelID,
77
- compatibility: { maxTokensField: "max_completion_tokens", supportsPromptCacheKey: true },
77
+ compatibility: { maxTokensField: "max_completion_tokens" },
78
+ capabilities: { promptCacheKey: true },
78
79
  });
79
80
  const messages = (modelID) => configuredMessages.model({
80
81
  id: modelID,
@@ -2,8 +2,8 @@ import type { ProviderPackage } from "../provider-package.js";
2
2
  import { AnthropicMessages } from "../protocols/anthropic-messages.js";
3
3
  import { type MiniMaxImageOptions } from "../protocols/minimax-images.js";
4
4
  import type { ProviderAuthOption } from "../route/auth-options.js";
5
- import { Route, type RouteDefaultsInput } from "../route/client.js";
6
- import { type ModelID, type ProviderOptions } from "../schema/index.js";
5
+ import { Route } from "../route/client.js";
6
+ import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
7
7
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
8
8
  export type MessagesOptionsInput = {
9
9
  /** M3 defaults to disabled; M2.x always thinks. */
@@ -25,7 +25,7 @@ export type ResponsesOptionsInput = {
25
25
  readonly reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | (string & {});
26
26
  };
27
27
  export type ProviderOptionsInput = MessagesOptionsInput | ChatOptionsInput | ResponsesOptionsInput;
28
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
28
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
29
29
  /** Overrides the selected API's base URL, including its version prefix. */
30
30
  readonly baseURL?: string;
31
31
  readonly providerOptions?: ProviderOptionsInput;
@@ -9,7 +9,7 @@ import { Endpoint } from "../route/endpoint.js";
9
9
  import { Framing } from "../route/framing.js";
10
10
  import { MediaRoute } from "../route/media.js";
11
11
  import { Protocol } from "../route/protocol.js";
12
- import { ProviderID } from "../schema/index.js";
12
+ import { ProviderID, } from "../schema/index.js";
13
13
  import { bearerRouteDefaults, toConfig } from "./settings.js";
14
14
  export const id = ProviderID.make("minimax");
15
15
  const ChatOptions = Schema.Struct({
@@ -70,7 +70,7 @@ export const configure = (input = {}) => {
70
70
  });
71
71
  const chat = (modelID) => chatRoute.with(defaults).model({
72
72
  id: modelID,
73
- compatibility: { supportsStrictMode: false },
73
+ capabilities: { tools: { strict: false } },
74
74
  });
75
75
  const responses = (modelID) => responsesRoute.with(defaults).model({ id: modelID });
76
76
  const media = MediaRoute.deployment(input, defaults.auth);
@@ -1,11 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { MistralChat } from "../protocols/mistral-chat.js";
3
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";
4
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
6
5
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
6
  export type ProviderOptions = MistralChat.ProviderOptionsInput;
8
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
7
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
9
8
  readonly baseURL?: string;
10
9
  readonly providerOptions?: ProviderOptions;
11
10
  };
@@ -13,7 +12,7 @@ export type Settings = ProviderPackage.Settings & ProviderOptions & {
13
12
  readonly apiKey?: string | false;
14
13
  readonly baseURL?: string;
15
14
  };
16
- export declare const route: import("../route/client.js").Route<{
15
+ export declare const route: import("../route.js").Route<{
17
16
  readonly model: string;
18
17
  readonly messages: readonly ({
19
18
  readonly role: "system";
@@ -103,8 +102,8 @@ export declare const route: import("../route/client.js").Route<{
103
102
  readonly parallel_tool_calls?: boolean | undefined;
104
103
  readonly reasoning_effort?: string | undefined;
105
104
  readonly prompt_mode?: "reasoning" | undefined;
106
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
107
- export declare const routes: import("../route/client.js").Route<{
105
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route.js").CompactionOperations | undefined>;
106
+ export declare const routes: import("../route.js").Route<{
108
107
  readonly model: string;
109
108
  readonly messages: readonly ({
110
109
  readonly role: "system";
@@ -194,15 +193,15 @@ export declare const routes: import("../route/client.js").Route<{
194
193
  readonly parallel_tool_calls?: boolean | undefined;
195
194
  readonly reasoning_effort?: string | undefined;
196
195
  readonly prompt_mode?: "reasoning" | undefined;
197
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
196
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route.js").CompactionOperations | undefined>[];
198
197
  export declare const configure: (input?: Config) => {
199
198
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
200
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
199
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route.js").CompactionOperations | undefined>;
201
200
  configure: typeof configure;
202
201
  };
203
202
  export declare const provider: {
204
203
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
205
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
204
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route.js").CompactionOperations | undefined>;
206
205
  configure: typeof configure;
207
206
  };
208
207
  export declare const model: ProviderPackage.Model<Settings, ProviderOptions>;
@@ -1,8 +1,8 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { AnthropicMessages } from "../protocols/anthropic-messages.js";
3
3
  import type { ProviderAuthOption } from "../route/auth-options.js";
4
- import { Route, type RouteDefaultsInput } from "../route/client.js";
5
- import { type ModelID } from "../schema/index.js";
4
+ import { Route } from "../route/client.js";
5
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
6
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
7
7
  export type ReasoningEffort = "low" | "high" | "max" | (string & {});
8
8
  export type ChatOptionsInput = {
@@ -22,7 +22,7 @@ export type ResponsesOptionsInput = {
22
22
  readonly reasoningEffort?: ReasoningEffort;
23
23
  readonly safetyIdentifier?: string;
24
24
  };
25
- export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
25
+ export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
26
26
  /** Overrides the selected API's base URL, including its version prefix. */
27
27
  readonly baseURL?: string;
28
28
  readonly providerOptions?: ChatOptionsInput | MessagesOptionsInput | ResponsesOptionsInput;
@@ -56,11 +56,10 @@ export const configure = (input = {}) => {
56
56
  id: modelID,
57
57
  compatibility: {
58
58
  maxTokensField: "max_tokens",
59
- supportsStrictMode: false,
60
- supportsPromptCacheKey: true,
61
59
  sanitizer: "moonshot",
62
60
  reasoningField: "reasoning_content",
63
61
  },
62
+ capabilities: { tools: { strict: false }, promptCacheKey: true },
64
63
  });
65
64
  const messages = (modelID) => messagesRoute.with(defaults).model({
66
65
  id: modelID,
@@ -1,11 +1,10 @@
1
1
  import type { ProviderPackage } from "../provider-package.js";
2
2
  import { type ProviderAuthOption } from "../route/auth-options.js";
3
- import type { RouteDefaultsInput } from "../route/client.js";
4
- import { type ModelID } from "../schema/index.js";
3
+ import { type ModelID, type RequestOptions } from "../schema/index.js";
5
4
  import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
6
5
  export type { OpenResponsesOptionsInput, OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
7
6
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
8
- export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
7
+ export type Config = RequestOptions & ProviderAuthOption<"optional"> & {
9
8
  readonly provider?: string;
10
9
  readonly baseURL: string;
11
10
  readonly providerOptions?: OpenResponsesProviderOptionsInput;
@@ -15,7 +14,7 @@ export type Settings = ProviderPackage.Settings & OpenResponsesProviderOptionsIn
15
14
  readonly baseURL: string;
16
15
  readonly provider?: string;
17
16
  };
18
- export declare const routes: import("../route/client.js").Route<{
17
+ export declare const routes: import("../route.js").Route<{
19
18
  readonly model: string;
20
19
  readonly input: readonly ({
21
20
  readonly type: "configuration_update";
@@ -212,10 +211,10 @@ export declare const routes: import("../route/client.js").Route<{
212
211
  readonly presence_penalty?: number | undefined;
213
212
  readonly frequency_penalty?: number | undefined;
214
213
  readonly stream: true;
215
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
214
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route.js").CompactionOperations | undefined>[];
216
215
  export declare const configure: (input: Config) => {
217
216
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
218
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
217
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route.js").CompactionOperations | undefined>;
219
218
  configure: typeof configure;
220
219
  };
221
220
  export declare const provider: {