@opencode/ai 0.0.0-dev-800 → 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.
- package/dist/protocols/openai-compatible-responses.js +1 -1
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/providers/alibaba.d.ts +3 -3
- package/dist/providers/amazon-bedrock-mantle.d.ts +3 -3
- package/dist/providers/amazon-bedrock-mantle.js +1 -1
- package/dist/providers/amazon-bedrock.d.ts +6 -7
- package/dist/providers/anthropic-compatible.d.ts +5 -6
- package/dist/providers/anthropic.d.ts +6 -7
- package/dist/providers/azure.d.ts +3 -3
- package/dist/providers/azure.js +1 -1
- package/dist/providers/baseten.d.ts +3 -3
- package/dist/providers/cerebras.d.ts +3 -3
- package/dist/providers/cloudflare-ai-gateway.d.ts +12 -13
- package/dist/providers/cloudflare-workers-ai.d.ts +3 -3
- package/dist/providers/cohere.d.ts +3 -3
- package/dist/providers/deepinfra.d.ts +3 -3
- package/dist/providers/deepseek.d.ts +3 -3
- package/dist/providers/digitalocean.d.ts +3 -3
- package/dist/providers/digitalocean.js +1 -1
- package/dist/providers/fireworks.d.ts +3 -3
- package/dist/providers/google-vertex-chat.d.ts +3 -3
- package/dist/providers/google-vertex-interactions.d.ts +3 -3
- package/dist/providers/google-vertex-messages.d.ts +3 -3
- package/dist/providers/google-vertex-mistral.d.ts +3 -3
- package/dist/providers/google-vertex-responses.d.ts +3 -3
- package/dist/providers/google-vertex-responses.js +1 -1
- package/dist/providers/google-vertex-shared.d.ts +3 -2
- package/dist/providers/google-vertex.d.ts +3 -3
- package/dist/providers/google.d.ts +13 -14
- package/dist/providers/groq.d.ts +3 -3
- package/dist/providers/meta.d.ts +3 -3
- package/dist/providers/meta.js +2 -2
- package/dist/providers/minimax.d.ts +3 -3
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +8 -9
- package/dist/providers/moonshot.d.ts +3 -3
- package/dist/providers/openai-compatible-responses.d.ts +5 -6
- package/dist/providers/openai-compatible.d.ts +5 -6
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai.d.ts +3 -3
- package/dist/providers/openai.js +1 -1
- package/dist/providers/openrouter.d.ts +3 -3
- package/dist/providers/openrouter.js +2 -2
- package/dist/providers/settings.d.ts +1 -1
- package/dist/providers/togetherai.d.ts +3 -3
- package/dist/providers/venice.d.ts +3 -3
- package/dist/providers/venice.js +2 -4
- package/dist/providers/vercel-ai-gateway.d.ts +3 -3
- package/dist/providers/vercel-ai-gateway.js +3 -3
- package/dist/providers/xai.d.ts +3 -3
- package/dist/providers/xai.js +1 -1
- package/dist/providers/zai-coding-plan.d.ts +3 -3
- package/dist/providers/zai-coding-plan.js +1 -3
- package/dist/providers/zai.d.ts +3 -3
- package/dist/providers/zai.js +1 -3
- package/dist/public.d.ts +1 -1
- package/dist/route/client.d.ts +8 -9
- package/dist/route/client.js +10 -18
- package/dist/route/index.d.ts +1 -1
- package/dist/schema/options.d.ts +6 -4
- package/dist/schema/options.js +14 -4
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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
|
|
162
|
-
export type Config =
|
|
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
|
|
173
|
-
gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route
|
|
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
|
|
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
|
|
190
|
-
gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route
|
|
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
|
|
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
|
|
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
|
|
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>;
|
package/dist/providers/groq.d.ts
CHANGED
|
@@ -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
|
|
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<
|
|
16
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
17
17
|
readonly baseURL?: string;
|
|
18
18
|
readonly providerOptions?: ProviderOptions;
|
|
19
19
|
};
|
package/dist/providers/meta.d.ts
CHANGED
|
@@ -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
|
|
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<
|
|
33
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
34
34
|
readonly baseURL?: string;
|
|
35
35
|
readonly providerOptions?: ProviderOptionsInput;
|
|
36
36
|
};
|
package/dist/providers/meta.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
66
|
+
options: { providerOptions: { thinking: { type: "adaptive", display: "omitted" } } },
|
|
67
67
|
});
|
|
68
68
|
export const routes = [responsesRoute, chatRoute, messagesRoute];
|
|
69
69
|
export const configure = (input = {}) => {
|
|
@@ -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
|
|
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<
|
|
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({
|
|
@@ -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
|
|
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<
|
|
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
|
|
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
|
|
107
|
-
export declare const routes: import("../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
|
|
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
|
|
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
|
|
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
|
|
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<
|
|
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;
|
|
@@ -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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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: {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type ModelID, type ProviderOptions } from "../schema/index.js";
|
|
2
|
-
import type { RouteDefaultsInput } from "../route/client.js";
|
|
1
|
+
import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
3
2
|
import { type ProviderAuthOption } from "../route/auth-options.js";
|
|
4
3
|
import type { ProviderPackage } from "../provider-package.js";
|
|
5
4
|
import type { OpenAIProviderOptionsInput } from "./openai-options.js";
|
|
6
5
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
7
|
-
export type Config = Omit<
|
|
6
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
8
7
|
readonly provider?: string;
|
|
9
8
|
readonly baseURL: string;
|
|
10
9
|
readonly providerOptions?: OpenAIProviderOptionsInput;
|
|
@@ -14,7 +13,7 @@ export type Settings = ProviderPackage.Settings & OpenAIProviderOptionsInput & {
|
|
|
14
13
|
readonly baseURL: string;
|
|
15
14
|
readonly provider?: string;
|
|
16
15
|
};
|
|
17
|
-
export declare const routes: import("../route
|
|
16
|
+
export declare const routes: import("../route.js").Route<{
|
|
18
17
|
readonly model: string;
|
|
19
18
|
readonly messages: readonly ({
|
|
20
19
|
readonly role: "system";
|
|
@@ -187,10 +186,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
187
186
|
readonly presence_penalty?: number | undefined;
|
|
188
187
|
readonly seed?: number | undefined;
|
|
189
188
|
readonly stop?: readonly string[] | undefined;
|
|
190
|
-
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route
|
|
189
|
+
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route.js").CompactionOperations | undefined>[];
|
|
191
190
|
export declare const configure: (input: Config) => {
|
|
192
191
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
193
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route
|
|
192
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route.js").CompactionOperations | undefined>;
|
|
194
193
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
195
194
|
configure: typeof configure;
|
|
196
195
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeProviderOptions, ProviderID } from "../schema/index.js";
|
|
1
|
+
import { mergeProviderOptions, ProviderID, } from "../schema/index.js";
|
|
2
2
|
import { OpenAICompatibleChat } from "../protocols/openai-compatible-chat.js";
|
|
3
3
|
import { OpenAIImages } from "../protocols/openai-images.js";
|
|
4
4
|
import { MediaRoute } from "../route/media.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ProviderAuthOption } from "../route/auth-options.js";
|
|
2
|
-
import type { Route,
|
|
2
|
+
import type { Route, CompactionOperations } from "../route/client.js";
|
|
3
3
|
import type { ProviderPackage } from "../provider-package.js";
|
|
4
|
-
import { ToolDefinition, type ModelID, type OpenString, type ProviderOptions } from "../schema/index.js";
|
|
4
|
+
import { ToolDefinition, type ModelID, type OpenString, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
5
5
|
import * as OpenAIResponses from "../protocols/openai-responses.js";
|
|
6
6
|
import { type OpenAIProviderOptionsInput } from "./openai-options.js";
|
|
7
7
|
import { type OptionsInput as OpenAIDecisionOptionsInput } from "../protocols/openai-decisions.js";
|
|
@@ -417,7 +417,7 @@ export declare const routes: (Route<{
|
|
|
417
417
|
endpoint: import("../route/client.js").CompactOperation;
|
|
418
418
|
trigger: import("../route/client.js").TriggerCompactOperation;
|
|
419
419
|
}>)[];
|
|
420
|
-
export type Config =
|
|
420
|
+
export type Config = RequestOptions & ProviderAuthOption<"optional"> & {
|
|
421
421
|
readonly baseURL?: string;
|
|
422
422
|
readonly queryParams?: Record<string, string>;
|
|
423
423
|
readonly providerOptions?: OpenAIProviderOptionsInput;
|
package/dist/providers/openai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthOptions } from "../route/auth-options.js";
|
|
2
2
|
import { MediaRoute } from "../route/media.js";
|
|
3
|
-
import { ProviderID, ToolDefinition } from "../schema/index.js";
|
|
3
|
+
import { ProviderID, ToolDefinition, } from "../schema/index.js";
|
|
4
4
|
import * as OpenAIChat from "../protocols/openai-chat.js";
|
|
5
5
|
import * as OpenAIResponses from "../protocols/openai-responses.js";
|
|
6
6
|
import { withOpenAIOptions } from "./openai-options.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { Route
|
|
2
|
+
import { Route } from "../route/client.js";
|
|
3
3
|
import { Protocol } from "../route/protocol.js";
|
|
4
4
|
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
5
|
-
import { type ModelID, type OpenString, type ProviderOptions } from "../schema/index.js";
|
|
5
|
+
import { type ModelID, type OpenString, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
6
6
|
import type { ProviderPackage } from "../provider-package.js";
|
|
7
7
|
import { HttpTransport } from "../route/transport/index.js";
|
|
8
8
|
import { OpenAIChat } from "../protocols/openai-chat.js";
|
|
@@ -82,7 +82,7 @@ export interface OpenRouterDecisionOptions {
|
|
|
82
82
|
readonly trace?: Readonly<Record<string, unknown>>;
|
|
83
83
|
readonly user?: string;
|
|
84
84
|
}
|
|
85
|
-
export type Config = Omit<
|
|
85
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
86
86
|
readonly baseURL?: string;
|
|
87
87
|
readonly providerOptions?: OpenRouterProviderOptionsInput | OpenRouterResponsesProviderOptionsInput;
|
|
88
88
|
};
|
|
@@ -2,7 +2,7 @@ import { Effect, Schema } from "effect";
|
|
|
2
2
|
import { Route } from "../route/client.js";
|
|
3
3
|
import { Endpoint } from "../route/endpoint.js";
|
|
4
4
|
import { Protocol } from "../route/protocol.js";
|
|
5
|
-
import { ProviderID } from "../schema/index.js";
|
|
5
|
+
import { ProviderID, } from "../schema/index.js";
|
|
6
6
|
import { SystemOne } from "../protocols/system-one.js";
|
|
7
7
|
import { OpenAIImages } from "../protocols/openai-images.js";
|
|
8
8
|
import { MediaRoute } from "../route/media.js";
|
|
@@ -130,7 +130,7 @@ const responsesRoute = Route.make({
|
|
|
130
130
|
protocol: responsesProtocol,
|
|
131
131
|
endpoint: Endpoint.path("/responses", { baseURL }),
|
|
132
132
|
transport: HttpTransport.sseJson.with(),
|
|
133
|
-
|
|
133
|
+
options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
|
|
134
134
|
});
|
|
135
135
|
export const routes = [route, responsesRoute];
|
|
136
136
|
export const configure = (input = {}) => {
|
|
@@ -22,7 +22,7 @@ type BearerInput = ProviderAuthOption<"optional"> & {
|
|
|
22
22
|
readonly baseURL?: string;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* Turns provider config into route
|
|
25
|
+
* Turns provider config into route options with `Authorization: Bearer` auth. The endpoint falls back to
|
|
26
26
|
* `baseURL` when given, otherwise it is left to the route.
|
|
27
27
|
*/
|
|
28
28
|
export declare function bearerRouteDefaults<Input extends BearerInput>(input: Input, envVar: string | ReadonlyArray<string>, baseURL: string): Omit<Input, "apiKey" | "auth" | "baseURL"> & {
|
|
@@ -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
|
|
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<
|
|
7
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
8
8
|
readonly baseURL?: string;
|
|
9
9
|
readonly providerOptions?: OpenAIProviderOptionsInput;
|
|
10
10
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ProviderPackage } from "../provider-package.js";
|
|
2
2
|
import { VeniceChat } from "../protocols/venice-chat.js";
|
|
3
3
|
import { type ProviderAuthOption } from "../route/auth-options.js";
|
|
4
|
-
import { Route
|
|
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
|
import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
|
|
7
7
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
8
|
export type ChatOptionsInput = VeniceChat.OptionsInput;
|
|
9
|
-
export type Config = Omit<
|
|
9
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
10
10
|
readonly baseURL?: string;
|
|
11
11
|
readonly queryParams?: Readonly<Record<string, string>>;
|
|
12
12
|
readonly providerOptions?: ChatOptionsInput | OpenResponsesProviderOptionsInput;
|
package/dist/providers/venice.js
CHANGED
|
@@ -22,7 +22,7 @@ const responsesRoute = Route.make({
|
|
|
22
22
|
protocol: OpenResponses.protocol,
|
|
23
23
|
endpoint: Endpoint.path("/responses", { baseURL }),
|
|
24
24
|
transport: OpenResponses.httpTransport,
|
|
25
|
-
|
|
25
|
+
options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
|
|
26
26
|
});
|
|
27
27
|
export const routes = [route, responsesRoute];
|
|
28
28
|
export const configure = (input = {}) => {
|
|
@@ -32,9 +32,7 @@ export const configure = (input = {}) => {
|
|
|
32
32
|
endpoint: { baseURL: endpoint ?? baseURL, query: queryParams },
|
|
33
33
|
auth: AuthOptions.bearer(input, "VENICE_API_KEY"),
|
|
34
34
|
};
|
|
35
|
-
const chat = (modelID) => route
|
|
36
|
-
.with(options)
|
|
37
|
-
.model({
|
|
35
|
+
const chat = (modelID) => route.with(options).model({
|
|
38
36
|
id: modelID,
|
|
39
37
|
compatibility: VeniceChat.compatibility,
|
|
40
38
|
capabilities: VeniceChat.capabilities,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AnthropicMessages } from "../protocols/anthropic-messages.js";
|
|
2
2
|
import type { ProviderPackage } from "../provider-package.js";
|
|
3
3
|
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
4
|
-
import { Route
|
|
5
|
-
import { ModelID, type ProviderOptions } from "../schema/index.js";
|
|
4
|
+
import { Route } from "../route/client.js";
|
|
5
|
+
import { ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
6
6
|
import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
|
|
7
7
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
8
|
export interface GatewayOptions {
|
|
@@ -63,7 +63,7 @@ export type ProviderOptionsInput = OpenResponsesProviderOptionsInput & Omit<Anth
|
|
|
63
63
|
/** Responses API count of stable input items to anchor for caching, sent as top-level `cache_anchor_items`. */
|
|
64
64
|
readonly cacheAnchorItems?: number;
|
|
65
65
|
};
|
|
66
|
-
export type Config = Omit<
|
|
66
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
67
67
|
readonly baseURL?: string;
|
|
68
68
|
readonly providerOptions?: ProviderOptionsInput;
|
|
69
69
|
};
|
|
@@ -82,7 +82,7 @@ const route = (input) => Route.make({
|
|
|
82
82
|
endpoint: Endpoint.path(input.path, { baseURL }),
|
|
83
83
|
framing: input.framing,
|
|
84
84
|
headers: ({ request }) => request.promptCacheKey ? { "x-session-affinity": request.promptCacheKey } : {},
|
|
85
|
-
|
|
85
|
+
options: input.options,
|
|
86
86
|
});
|
|
87
87
|
const messagesRoute = route({
|
|
88
88
|
id: "vercel-ai-gateway-messages",
|
|
@@ -90,7 +90,7 @@ const messagesRoute = route({
|
|
|
90
90
|
api: "messages",
|
|
91
91
|
path: "/messages",
|
|
92
92
|
framing: AnthropicMessages.framing,
|
|
93
|
-
|
|
93
|
+
options: { headers: { "anthropic-version": "2023-06-01" } },
|
|
94
94
|
});
|
|
95
95
|
const responsesRoute = route({
|
|
96
96
|
id: "vercel-ai-gateway-responses",
|
|
@@ -98,7 +98,7 @@ const responsesRoute = route({
|
|
|
98
98
|
api: "responses",
|
|
99
99
|
path: "/responses",
|
|
100
100
|
framing: Framing.sse,
|
|
101
|
-
|
|
101
|
+
options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
|
|
102
102
|
});
|
|
103
103
|
const chatRoute = route({
|
|
104
104
|
id: "vercel-ai-gateway-chat",
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ProviderAuthOption } from "../route/auth-options.js";
|
|
2
|
-
import { Route
|
|
3
|
-
import { type ModelID, type ProviderOptions } from "../schema/index.js";
|
|
2
|
+
import { Route } from "../route/client.js";
|
|
3
|
+
import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
4
4
|
import { XAIResponses } from "../protocols/xai-responses.js";
|
|
5
5
|
import type { OpenAIOptionsInput } from "./openai-options.js";
|
|
6
6
|
import type { ProviderPackage } from "../provider-package.js";
|
|
@@ -8,7 +8,7 @@ export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
|
8
8
|
export type XAIProviderOptionsInput = OpenAIOptionsInput & XAIResponses.OptionsInput & {
|
|
9
9
|
readonly contextManagement?: never;
|
|
10
10
|
};
|
|
11
|
-
export type Config = Omit<
|
|
11
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
12
12
|
readonly baseURL?: string;
|
|
13
13
|
readonly providerOptions?: XAIProviderOptionsInput;
|
|
14
14
|
};
|
package/dist/providers/xai.js
CHANGED
|
@@ -28,7 +28,7 @@ const responsesRoute = Route.make({
|
|
|
28
28
|
// rejects `instructions` next to `previous_response_id` and keeps the instructions of the response it continues.
|
|
29
29
|
continuation: ({ instructions: _instructions, ...request }) => (request.store === false ? undefined : request),
|
|
30
30
|
}),
|
|
31
|
-
|
|
31
|
+
options: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
|
|
32
32
|
});
|
|
33
33
|
const chatRoute = Route.make({
|
|
34
34
|
id: "xai-chat",
|
|
@@ -2,15 +2,15 @@ import type { ProviderPackage } from "../provider-package.js";
|
|
|
2
2
|
import { ZAIChat } from "../protocols/zai-chat.js";
|
|
3
3
|
import { ZAIMessages } from "../protocols/zai-messages.js";
|
|
4
4
|
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
5
|
-
import { Route
|
|
6
|
-
import { type ModelID } from "../schema/index.js";
|
|
5
|
+
import { Route } from "../route/client.js";
|
|
6
|
+
import { type ModelID, type RequestOptions } from "../schema/index.js";
|
|
7
7
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
8
|
export type ChatOptionsInput = ZAIChat.OptionsInput;
|
|
9
9
|
export type MessagesOptionsInput = ZAIMessages.OptionsInput;
|
|
10
10
|
export type ResponsesOptionsInput = {
|
|
11
11
|
readonly reasoningEffort?: ZAIChat.ReasoningEffort;
|
|
12
12
|
};
|
|
13
|
-
export type Config = Omit<
|
|
13
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
14
14
|
/** Overrides the selected API's complete base URL. */
|
|
15
15
|
readonly baseURL?: string;
|
|
16
16
|
readonly providerOptions?: ChatOptionsInput | MessagesOptionsInput | ResponsesOptionsInput;
|
|
@@ -37,9 +37,7 @@ const responsesRoute = Route.make({
|
|
|
37
37
|
export const routes = [chatRoute, messagesRoute, responsesRoute];
|
|
38
38
|
export const configure = (input = {}) => {
|
|
39
39
|
const defaults = bearerRouteDefaults(input, "ZAI_API_KEY");
|
|
40
|
-
const chat = (modelID) => chatRoute
|
|
41
|
-
.with(defaults)
|
|
42
|
-
.model({
|
|
40
|
+
const chat = (modelID) => chatRoute.with(defaults).model({
|
|
43
41
|
id: modelID,
|
|
44
42
|
compatibility: ZAIChat.compatibility,
|
|
45
43
|
capabilities: ZAIChat.capabilities,
|
package/dist/providers/zai.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ProviderPackage } from "../provider-package.js";
|
|
2
2
|
import { ZAIChat } from "../protocols/zai-chat.js";
|
|
3
3
|
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
4
|
-
import { Route
|
|
5
|
-
import { type ModelID, type ProviderOptions } from "../schema/index.js";
|
|
4
|
+
import { Route } from "../route/client.js";
|
|
5
|
+
import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
6
6
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
7
7
|
export type ChatOptionsInput = ZAIChat.OptionsInput;
|
|
8
|
-
export type Config = Omit<
|
|
8
|
+
export type Config = Omit<RequestOptions, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
9
9
|
readonly baseURL?: string;
|
|
10
10
|
readonly providerOptions?: ChatOptionsInput;
|
|
11
11
|
};
|