@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.
- package/dist/cache-policy.d.ts +1 -1
- package/dist/cache-policy.js +2 -2
- package/dist/image-client.d.ts +3 -3
- package/dist/image-client.js +1 -1
- package/dist/image.d.ts +2 -2
- package/dist/image.js +2 -2
- package/dist/index.d.ts +18 -18
- package/dist/index.js +12 -12
- package/dist/llm.d.ts +8 -8
- package/dist/llm.js +3 -3
- package/dist/protocols/anthropic-messages.d.ts +7 -7
- package/dist/protocols/anthropic-messages.js +13 -13
- package/dist/protocols/bedrock-converse.d.ts +10 -10
- package/dist/protocols/bedrock-converse.js +14 -14
- package/dist/protocols/bedrock-event-stream.d.ts +2 -2
- package/dist/protocols/bedrock-event-stream.js +3 -3
- package/dist/protocols/gemini.d.ts +6 -6
- package/dist/protocols/gemini.js +11 -11
- package/dist/protocols/google-images.d.ts +3 -3
- package/dist/protocols/google-images.js +5 -5
- package/dist/protocols/index.d.ts +9 -9
- package/dist/protocols/index.js +9 -9
- package/dist/protocols/open-responses.d.ts +7 -7
- package/dist/protocols/open-responses.js +10 -10
- package/dist/protocols/openai-chat.d.ts +7 -7
- package/dist/protocols/openai-chat.js +13 -13
- package/dist/protocols/openai-compatible-chat.d.ts +3 -3
- package/dist/protocols/openai-compatible-chat.js +5 -5
- package/dist/protocols/openai-compatible-responses.d.ts +3 -3
- package/dist/protocols/openai-compatible-responses.js +4 -4
- package/dist/protocols/openai-images.d.ts +3 -3
- package/dist/protocols/openai-images.js +6 -6
- package/dist/protocols/openai-responses.d.ts +7 -7
- package/dist/protocols/openai-responses.js +12 -12
- package/dist/protocols/shared.d.ts +7 -7
- package/dist/protocols/shared.js +3 -3
- package/dist/protocols/utils/bedrock-auth.d.ts +2 -2
- package/dist/protocols/utils/bedrock-auth.js +3 -3
- package/dist/protocols/utils/bedrock-cache.d.ts +4 -4
- package/dist/protocols/utils/bedrock-cache.js +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.js +2 -2
- package/dist/protocols/utils/gemini-tool-schema.d.ts +1 -1
- package/dist/protocols/utils/gemini-tool-schema.js +2 -2
- package/dist/protocols/utils/image-input.d.ts +2 -2
- package/dist/protocols/utils/image-input.js +1 -1
- package/dist/protocols/utils/lifecycle.d.ts +2 -2
- package/dist/protocols/utils/lifecycle.js +2 -2
- package/dist/protocols/utils/open-responses-options.d.ts +2 -2
- package/dist/protocols/utils/open-responses-options.js +2 -2
- package/dist/protocols/utils/openai-options.d.ts +3 -3
- package/dist/protocols/utils/openai-options.js +3 -3
- package/dist/protocols/utils/tool-schema.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.js +2 -2
- package/dist/protocols/utils/tool-stream.d.ts +9 -9
- package/dist/protocols/utils/tool-stream.js +3 -3
- package/dist/protocols/xai-images.d.ts +3 -3
- package/dist/protocols/xai-images.js +5 -5
- package/dist/protocols/zai-images.d.ts +3 -3
- package/dist/protocols/zai-images.js +5 -5
- package/dist/protocols.d.ts +1 -1
- package/dist/protocols.js +1 -1
- package/dist/provider-error.d.ts +1 -1
- package/dist/provider-error.js +1 -1
- package/dist/provider-package.d.ts +2 -2
- package/dist/provider-package.js +1 -1
- package/dist/provider.d.ts +2 -2
- package/dist/provider.js +1 -1
- package/dist/providers/amazon-bedrock/mantle/chat.d.ts +2 -2
- package/dist/providers/amazon-bedrock/mantle/chat.js +1 -1
- package/dist/providers/amazon-bedrock/mantle/responses.d.ts +2 -2
- package/dist/providers/amazon-bedrock/mantle/responses.js +1 -1
- package/dist/providers/amazon-bedrock/mantle.d.ts +2 -2
- package/dist/providers/amazon-bedrock/mantle.js +1 -1
- package/dist/providers/amazon-bedrock-mantle.d.ts +17 -17
- package/dist/providers/amazon-bedrock-mantle.js +6 -6
- package/dist/providers/amazon-bedrock.d.ts +9 -9
- package/dist/providers/amazon-bedrock.js +3 -3
- package/dist/providers/anthropic-compatible.d.ts +10 -10
- package/dist/providers/anthropic-compatible.js +4 -4
- package/dist/providers/anthropic.d.ts +10 -10
- package/dist/providers/anthropic.js +4 -4
- package/dist/providers/azure/chat.d.ts +2 -2
- package/dist/providers/azure/chat.js +1 -1
- package/dist/providers/azure/responses.d.ts +2 -2
- package/dist/providers/azure/responses.js +1 -1
- package/dist/providers/azure.d.ts +14 -14
- package/dist/providers/azure.js +7 -7
- package/dist/providers/cloudflare.d.ts +12 -12
- package/dist/providers/cloudflare.js +4 -4
- package/dist/providers/google-vertex/chat.d.ts +2 -2
- package/dist/providers/google-vertex/chat.js +1 -1
- package/dist/providers/google-vertex/gemini.d.ts +2 -2
- package/dist/providers/google-vertex/gemini.js +1 -1
- package/dist/providers/google-vertex/messages.d.ts +2 -2
- package/dist/providers/google-vertex/messages.js +1 -1
- package/dist/providers/google-vertex/responses.d.ts +2 -2
- package/dist/providers/google-vertex/responses.js +1 -1
- package/dist/providers/google-vertex-chat.d.ts +9 -9
- package/dist/providers/google-vertex-chat.js +3 -3
- package/dist/providers/google-vertex-messages.d.ts +8 -8
- package/dist/providers/google-vertex-messages.js +8 -8
- package/dist/providers/google-vertex-responses.d.ts +9 -9
- package/dist/providers/google-vertex-responses.js +3 -3
- package/dist/providers/google-vertex-shared.d.ts +2 -2
- package/dist/providers/google-vertex-shared.js +2 -2
- package/dist/providers/google-vertex.d.ts +8 -8
- package/dist/providers/google-vertex.js +7 -7
- package/dist/providers/google.d.ts +15 -15
- package/dist/providers/google.js +4 -4
- package/dist/providers/index.d.ts +18 -18
- package/dist/providers/index.js +18 -18
- package/dist/providers/open-responses-options.d.ts +3 -3
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai/chat.d.ts +2 -2
- package/dist/providers/openai/chat.js +1 -1
- package/dist/providers/openai/responses.d.ts +2 -2
- package/dist/providers/openai/responses.js +1 -1
- package/dist/providers/openai-compatible/responses.d.ts +1 -1
- package/dist/providers/openai-compatible/responses.js +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +10 -10
- package/dist/providers/openai-compatible-responses.js +3 -3
- package/dist/providers/openai-compatible.d.ts +16 -16
- package/dist/providers/openai-compatible.js +4 -4
- package/dist/providers/openai-options.d.ts +4 -4
- package/dist/providers/openai-options.js +2 -2
- package/dist/providers/openai.d.ts +30 -30
- package/dist/providers/openai.js +6 -6
- package/dist/providers/openrouter.d.ts +11 -11
- package/dist/providers/openrouter.js +10 -10
- package/dist/providers/xai.d.ts +23 -23
- package/dist/providers/xai.js +9 -9
- package/dist/providers/zai.d.ts +7 -7
- package/dist/providers/zai.js +3 -3
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +1 -1
- package/dist/route/auth-options.d.ts +2 -2
- package/dist/route/auth-options.js +2 -2
- package/dist/route/auth.d.ts +2 -2
- package/dist/route/auth.js +2 -2
- package/dist/route/client.d.ts +11 -11
- package/dist/route/client.js +9 -9
- package/dist/route/endpoint.d.ts +2 -2
- package/dist/route/endpoint.js +2 -2
- package/dist/route/executor.d.ts +3 -3
- package/dist/route/executor.js +3 -3
- package/dist/route/framing.d.ts +2 -2
- package/dist/route/framing.js +2 -2
- package/dist/route/index.d.ts +16 -16
- package/dist/route/index.js +9 -9
- package/dist/route/protocol.d.ts +2 -2
- package/dist/route/protocol.js +1 -1
- package/dist/route/transport/http.d.ts +3 -3
- package/dist/route/transport/http.js +5 -5
- package/dist/route/transport/index.d.ts +8 -8
- package/dist/route/transport/index.js +4 -4
- package/dist/route/transport/websocket.d.ts +2 -2
- package/dist/route/transport/websocket.js +2 -2
- package/dist/route.d.ts +1 -1
- package/dist/route.js +1 -1
- package/dist/schema/errors.js +1 -1
- package/dist/schema/events.d.ts +2 -2
- package/dist/schema/events.js +3 -3
- package/dist/schema/index.d.ts +5 -5
- package/dist/schema/index.js +5 -5
- package/dist/schema/messages.d.ts +3 -3
- package/dist/schema/messages.js +3 -3
- package/dist/schema/options.d.ts +2 -2
- package/dist/schema/options.js +2 -2
- package/dist/testing.d.ts +20 -20
- package/dist/testing.js +3 -3
- package/dist/tool-runtime.d.ts +2 -2
- package/dist/tool-runtime.js +2 -2
- package/dist/tool.d.ts +3 -3
- package/dist/tool.js +2 -2
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ProviderPackage } from "../provider-package";
|
|
2
|
-
import { AnthropicMessages } from "../protocols/anthropic-messages";
|
|
3
|
-
import { Route, type RouteDefaultsInput } from "../route/client";
|
|
4
|
-
import { type ModelID } from "../schema";
|
|
5
|
-
import { GoogleVertexShared } from "./google-vertex-shared";
|
|
1
|
+
import type { ProviderPackage } from "../provider-package.js";
|
|
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";
|
|
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;
|
|
@@ -198,17 +198,17 @@ export declare const routes: Route<{
|
|
|
198
198
|
output_config?: {
|
|
199
199
|
readonly effort?: string | undefined;
|
|
200
200
|
} | undefined;
|
|
201
|
-
}, import("../route/transport/http").HttpPrepared<string>>[];
|
|
201
|
+
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
202
202
|
export declare const configure: (input?: Config) => {
|
|
203
203
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
204
|
-
model: (modelID: string | ModelID) => import("
|
|
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
209
|
configure: (input?: Config) => {
|
|
210
210
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
211
|
-
model: (modelID: string | ModelID) => import("
|
|
211
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<AnthropicMessages.ProviderOptionsInput>;
|
|
212
212
|
configure: /*elided*/ any;
|
|
213
213
|
};
|
|
214
214
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Schema, Struct } from "effect";
|
|
2
|
-
import { AnthropicMessages } from "../protocols/anthropic-messages";
|
|
3
|
-
import { Auth } from "../route/auth";
|
|
4
|
-
import { Route } from "../route/client";
|
|
5
|
-
import { Endpoint } from "../route/endpoint";
|
|
6
|
-
import { Framing } from "../route/framing";
|
|
7
|
-
import { Protocol } from "../route/protocol";
|
|
8
|
-
import { ProviderID } from "../schema";
|
|
9
|
-
import { GoogleVertexShared } from "./google-vertex-shared";
|
|
2
|
+
import { AnthropicMessages } from "../protocols/anthropic-messages.js";
|
|
3
|
+
import { Auth } from "../route/auth.js";
|
|
4
|
+
import { Route } from "../route/client.js";
|
|
5
|
+
import { Endpoint } from "../route/endpoint.js";
|
|
6
|
+
import { Framing } from "../route/framing.js";
|
|
7
|
+
import { Protocol } from "../route/protocol.js";
|
|
8
|
+
import { ProviderID } from "../schema/index.js";
|
|
9
|
+
import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
10
10
|
const VERSION = "vertex-2023-10-16";
|
|
11
11
|
export const id = ProviderID.make("google-vertex");
|
|
12
12
|
const route = Route.make({
|
|
@@ -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 { OpenResponsesProviderOptionsInput } from "./open-responses-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 { OpenResponsesProviderOptionsInput } from "./open-responses-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?: OpenResponsesProviderOptionsInput;
|
|
20
20
|
}
|
|
21
|
-
export declare const routes: import("../route").Route<{
|
|
21
|
+
export declare const routes: import("../route/client.js").Route<{
|
|
22
22
|
readonly input: readonly ({
|
|
23
23
|
readonly type: "reasoning";
|
|
24
24
|
readonly summary: readonly {
|
|
@@ -105,17 +105,17 @@ export declare const routes: import("../route").Route<{
|
|
|
105
105
|
readonly prompt_cache_key?: string | undefined;
|
|
106
106
|
readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
107
107
|
readonly max_output_tokens?: number | undefined;
|
|
108
|
-
}, import("../route/transport/http").HttpPrepared<string>>[];
|
|
108
|
+
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
109
109
|
export declare const configure: (input?: Config) => {
|
|
110
110
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
111
|
-
model: (modelID: string | ModelID) => import("
|
|
111
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenResponsesProviderOptionsInput>;
|
|
112
112
|
configure: (input?: Config) => /*elided*/ any;
|
|
113
113
|
};
|
|
114
114
|
export declare const provider: {
|
|
115
115
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
116
116
|
configure: (input?: Config) => {
|
|
117
117
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
118
|
-
model: (modelID: string | ModelID) => import("
|
|
118
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenResponsesProviderOptionsInput>;
|
|
119
119
|
configure: /*elided*/ any;
|
|
120
120
|
};
|
|
121
121
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OpenAICompatibleResponses } from "../protocols/openai-compatible-responses";
|
|
2
|
-
import { ProviderID } from "../schema";
|
|
3
|
-
import { GoogleVertexShared } from "./google-vertex-shared";
|
|
1
|
+
import { OpenAICompatibleResponses } from "../protocols/openai-compatible-responses.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 = OpenAICompatibleResponses.route.with({
|
|
6
6
|
id: "google-vertex-responses",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Auth } from "../route/auth";
|
|
1
|
+
import { Auth } from "../route/auth.js";
|
|
2
2
|
export type OAuthOptions = {
|
|
3
3
|
readonly accessToken?: string;
|
|
4
4
|
readonly auth?: never;
|
|
@@ -19,4 +19,4 @@ export declare const host: (location: string) => string;
|
|
|
19
19
|
export declare const requireProject: (value: string | undefined) => string;
|
|
20
20
|
export declare const apiKey: (input: ApiKeyOptions) => string | undefined;
|
|
21
21
|
export declare const oauth: (input: OAuthOptions, project?: string) => Auth.Definition;
|
|
22
|
-
export * as GoogleVertexShared from "./google-vertex-shared";
|
|
22
|
+
export * as GoogleVertexShared from "./google-vertex-shared.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Redacted } from "effect";
|
|
2
|
-
import { Auth, MissingCredentialError } from "../route/auth";
|
|
2
|
+
import { Auth, MissingCredentialError } from "../route/auth.js";
|
|
3
3
|
const SCOPE = "https://www.googleapis.com/auth/cloud-platform";
|
|
4
4
|
export const project = (value) => value ??
|
|
5
5
|
process.env.GOOGLE_VERTEX_PROJECT ??
|
|
@@ -58,4 +58,4 @@ export const oauth = (input, project) => {
|
|
|
58
58
|
return Auth.bearer(input.accessToken);
|
|
59
59
|
return adc(project);
|
|
60
60
|
};
|
|
61
|
-
export * as GoogleVertexShared from "./google-vertex-shared";
|
|
61
|
+
export * as GoogleVertexShared from "./google-vertex-shared.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ProviderPackage } from "../provider-package";
|
|
2
|
-
import { Gemini } from "../protocols/gemini";
|
|
3
|
-
import { Route, type RouteDefaultsInput } from "../route/client";
|
|
4
|
-
import { type ModelID } from "../schema";
|
|
5
|
-
import { GoogleVertexShared } from "./google-vertex-shared";
|
|
1
|
+
import type { ProviderPackage } from "../provider-package.js";
|
|
2
|
+
import { Gemini } from "../protocols/gemini.js";
|
|
3
|
+
import { Route, type RouteDefaultsInput } from "../route/client.js";
|
|
4
|
+
import { type ModelID } from "../schema/index.js";
|
|
5
|
+
import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
6
6
|
export type GeminiOptionsInput = Gemini.OptionsInput;
|
|
7
7
|
export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
|
|
8
8
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
@@ -98,17 +98,17 @@ export declare const routes: Route<{
|
|
|
98
98
|
} | undefined;
|
|
99
99
|
readonly maxOutputTokens?: number | undefined;
|
|
100
100
|
} | undefined;
|
|
101
|
-
}, import("../route/transport/http").HttpPrepared<string>>[];
|
|
101
|
+
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
102
102
|
export declare const configure: (input?: Config) => {
|
|
103
103
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
104
|
-
model: (modelID: string | ModelID) => import("
|
|
104
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
|
|
105
105
|
configure: (input?: Config) => /*elided*/ any;
|
|
106
106
|
};
|
|
107
107
|
export declare const provider: {
|
|
108
108
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
109
109
|
configure: (input?: Config) => {
|
|
110
110
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
111
|
-
model: (modelID: string | ModelID) => import("
|
|
111
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
|
|
112
112
|
configure: /*elided*/ any;
|
|
113
113
|
};
|
|
114
114
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Gemini } from "../protocols/gemini";
|
|
2
|
-
import { Auth } from "../route/auth";
|
|
3
|
-
import { Route } from "../route/client";
|
|
4
|
-
import { Endpoint } from "../route/endpoint";
|
|
5
|
-
import { Framing } from "../route/framing";
|
|
6
|
-
import { ProviderID } from "../schema";
|
|
7
|
-
import { GoogleVertexShared } from "./google-vertex-shared";
|
|
1
|
+
import { Gemini } from "../protocols/gemini.js";
|
|
2
|
+
import { Auth } from "../route/auth.js";
|
|
3
|
+
import { Route } from "../route/client.js";
|
|
4
|
+
import { Endpoint } from "../route/endpoint.js";
|
|
5
|
+
import { Framing } from "../route/framing.js";
|
|
6
|
+
import { ProviderID } from "../schema/index.js";
|
|
7
|
+
import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
8
8
|
export const id = ProviderID.make("google-vertex");
|
|
9
9
|
const route = Route.make({
|
|
10
10
|
id: "google-vertex-gemini",
|
|
@@ -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 { Gemini } from "../protocols/gemini";
|
|
6
|
-
export type { GoogleImageOptions } from "../protocols/google-images";
|
|
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 { Gemini } from "../protocols/gemini.js";
|
|
6
|
+
export type { GoogleImageOptions } from "../protocols/google-images.js";
|
|
7
7
|
export type GeminiOptionsInput = Gemini.OptionsInput;
|
|
8
8
|
export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
|
|
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 contents: readonly {
|
|
12
12
|
readonly role: "user" | "model";
|
|
13
13
|
readonly parts: readonly ({
|
|
@@ -81,7 +81,7 @@ export declare const routes: import("../route").Route<{
|
|
|
81
81
|
} | undefined;
|
|
82
82
|
readonly maxOutputTokens?: number | undefined;
|
|
83
83
|
} | undefined;
|
|
84
|
-
}, import("../route/transport/http").HttpPrepared<string>>[];
|
|
84
|
+
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
85
85
|
export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
|
|
86
86
|
readonly baseURL?: string;
|
|
87
87
|
readonly providerOptions?: Gemini.ProviderOptionsInput;
|
|
@@ -93,20 +93,20 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
93
93
|
}
|
|
94
94
|
export declare const configure: (input?: Config) => {
|
|
95
95
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
96
|
-
model: (modelID: string | ModelID) => import("
|
|
97
|
-
image: (modelID: string | ModelID) => import("
|
|
96
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
|
|
97
|
+
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
98
98
|
configure: (input?: Config) => /*elided*/ any;
|
|
99
99
|
};
|
|
100
100
|
export declare const provider: {
|
|
101
101
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
102
|
-
model: (modelID: string | ModelID) => import("
|
|
103
|
-
image: (modelID: string | ModelID) => import("
|
|
102
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
|
|
103
|
+
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
104
104
|
configure: (input?: Config) => {
|
|
105
105
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
106
|
-
model: (modelID: string | ModelID) => import("
|
|
107
|
-
image: (modelID: string | ModelID) => import("
|
|
106
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.ProviderOptionsInput>;
|
|
107
|
+
image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
108
108
|
configure: /*elided*/ any;
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
export declare const model: ProviderPackage.Definition<Settings, Gemini.ProviderOptionsInput>["model"];
|
|
112
|
-
export declare const image: (modelID: string | ModelID) => import("
|
|
112
|
+
export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
package/dist/providers/google.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Auth } from "../route/auth";
|
|
2
|
-
import { HttpOptions, ProviderID, mergeHttpOptions } from "../schema";
|
|
3
|
-
import { Gemini } from "../protocols/gemini";
|
|
4
|
-
import { GoogleImages } from "../protocols/google-images";
|
|
1
|
+
import { Auth } from "../route/auth.js";
|
|
2
|
+
import { HttpOptions, ProviderID, mergeHttpOptions } from "../schema/index.js";
|
|
3
|
+
import { Gemini } from "../protocols/gemini.js";
|
|
4
|
+
import { GoogleImages } from "../protocols/google-images.js";
|
|
5
5
|
export const id = ProviderID.make("google");
|
|
6
6
|
export const routes = [Gemini.route];
|
|
7
7
|
const auth = (options) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * as Anthropic from "./anthropic";
|
|
2
|
-
export * as AnthropicCompatible from "./anthropic-compatible";
|
|
3
|
-
export * as AmazonBedrock from "./amazon-bedrock";
|
|
4
|
-
export * as AmazonBedrockMantle from "./amazon-bedrock-mantle";
|
|
5
|
-
export * as Azure from "./azure";
|
|
6
|
-
export * as Cloudflare from "./cloudflare";
|
|
7
|
-
export { CloudflareAIGateway, CloudflareWorkersAI } from "./cloudflare";
|
|
8
|
-
export * as Google from "./google";
|
|
9
|
-
export * as GoogleVertex from "./google-vertex";
|
|
10
|
-
export * as GoogleVertexChat from "./google-vertex-chat";
|
|
11
|
-
export * as GoogleVertexMessages from "./google-vertex-messages";
|
|
12
|
-
export * as GoogleVertexResponses from "./google-vertex-responses";
|
|
13
|
-
export * as OpenAI from "./openai";
|
|
14
|
-
export * as OpenAICompatible from "./openai-compatible";
|
|
15
|
-
export * as OpenAICompatibleResponses from "./openai-compatible-responses";
|
|
16
|
-
export * as OpenRouter from "./openrouter";
|
|
17
|
-
export * as XAI from "./xai";
|
|
18
|
-
export * as ZAI from "./zai";
|
|
1
|
+
export * as Anthropic from "./anthropic.js";
|
|
2
|
+
export * as AnthropicCompatible from "./anthropic-compatible.js";
|
|
3
|
+
export * as AmazonBedrock from "./amazon-bedrock.js";
|
|
4
|
+
export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
|
|
5
|
+
export * as Azure from "./azure.js";
|
|
6
|
+
export * as Cloudflare from "./cloudflare.js";
|
|
7
|
+
export { CloudflareAIGateway, CloudflareWorkersAI } from "./cloudflare.js";
|
|
8
|
+
export * as Google from "./google.js";
|
|
9
|
+
export * as GoogleVertex from "./google-vertex.js";
|
|
10
|
+
export * as GoogleVertexChat from "./google-vertex-chat.js";
|
|
11
|
+
export * as GoogleVertexMessages from "./google-vertex-messages.js";
|
|
12
|
+
export * as GoogleVertexResponses from "./google-vertex-responses.js";
|
|
13
|
+
export * as OpenAI from "./openai.js";
|
|
14
|
+
export * as OpenAICompatible from "./openai-compatible.js";
|
|
15
|
+
export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
|
|
16
|
+
export * as OpenRouter from "./openrouter.js";
|
|
17
|
+
export * as XAI from "./xai.js";
|
|
18
|
+
export * as ZAI from "./zai.js";
|
package/dist/providers/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * as Anthropic from "./anthropic";
|
|
2
|
-
export * as AnthropicCompatible from "./anthropic-compatible";
|
|
3
|
-
export * as AmazonBedrock from "./amazon-bedrock";
|
|
4
|
-
export * as AmazonBedrockMantle from "./amazon-bedrock-mantle";
|
|
5
|
-
export * as Azure from "./azure";
|
|
6
|
-
export * as Cloudflare from "./cloudflare";
|
|
7
|
-
export { CloudflareAIGateway, CloudflareWorkersAI } from "./cloudflare";
|
|
8
|
-
export * as Google from "./google";
|
|
9
|
-
export * as GoogleVertex from "./google-vertex";
|
|
10
|
-
export * as GoogleVertexChat from "./google-vertex-chat";
|
|
11
|
-
export * as GoogleVertexMessages from "./google-vertex-messages";
|
|
12
|
-
export * as GoogleVertexResponses from "./google-vertex-responses";
|
|
13
|
-
export * as OpenAI from "./openai";
|
|
14
|
-
export * as OpenAICompatible from "./openai-compatible";
|
|
15
|
-
export * as OpenAICompatibleResponses from "./openai-compatible-responses";
|
|
16
|
-
export * as OpenRouter from "./openrouter";
|
|
17
|
-
export * as XAI from "./xai";
|
|
18
|
-
export * as ZAI from "./zai";
|
|
1
|
+
export * as Anthropic from "./anthropic.js";
|
|
2
|
+
export * as AnthropicCompatible from "./anthropic-compatible.js";
|
|
3
|
+
export * as AmazonBedrock from "./amazon-bedrock.js";
|
|
4
|
+
export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
|
|
5
|
+
export * as Azure from "./azure.js";
|
|
6
|
+
export * as Cloudflare from "./cloudflare.js";
|
|
7
|
+
export { CloudflareAIGateway, CloudflareWorkersAI } from "./cloudflare.js";
|
|
8
|
+
export * as Google from "./google.js";
|
|
9
|
+
export * as GoogleVertex from "./google-vertex.js";
|
|
10
|
+
export * as GoogleVertexChat from "./google-vertex-chat.js";
|
|
11
|
+
export * as GoogleVertexMessages from "./google-vertex-messages.js";
|
|
12
|
+
export * as GoogleVertexResponses from "./google-vertex-responses.js";
|
|
13
|
+
export * as OpenAI from "./openai.js";
|
|
14
|
+
export * as OpenAICompatible from "./openai-compatible.js";
|
|
15
|
+
export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
|
|
16
|
+
export * as OpenRouter from "./openrouter.js";
|
|
17
|
+
export * as XAI from "./xai.js";
|
|
18
|
+
export * as ZAI from "./zai.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ResponseIncludable, ServiceTier } from "../protocols/utils/open-responses-options";
|
|
2
|
-
import type { ProviderOptions, ReasoningEffort, TextVerbosity } from "../schema";
|
|
1
|
+
import type { ResponseIncludable, ServiceTier } from "../protocols/utils/open-responses-options.js";
|
|
2
|
+
import type { ProviderOptions, ReasoningEffort, TextVerbosity } from "../schema/index.js";
|
|
3
3
|
export interface OpenResponsesOptionsInput {
|
|
4
4
|
readonly [key: string]: unknown;
|
|
5
5
|
readonly instructions?: string;
|
|
@@ -13,4 +13,4 @@ export interface OpenResponsesOptionsInput {
|
|
|
13
13
|
export type OpenResponsesProviderOptionsInput = ProviderOptions & {
|
|
14
14
|
readonly openresponses?: OpenResponsesOptionsInput;
|
|
15
15
|
};
|
|
16
|
-
export * as OpenResponsesProviderOptions from "./open-responses-options";
|
|
16
|
+
export * as OpenResponsesProviderOptions from "./open-responses-options.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * as OpenResponsesProviderOptions from "./open-responses-options";
|
|
1
|
+
export * as OpenResponsesProviderOptions from "./open-responses-options.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { chatModel as model } from "../openai";
|
|
2
|
-
export type { Settings } from "../openai";
|
|
1
|
+
export { chatModel as model } from "../openai.js";
|
|
2
|
+
export type { Settings } from "../openai.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { chatModel as model } from "../openai";
|
|
1
|
+
export { chatModel as model } from "../openai.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { model } from "../openai";
|
|
2
|
-
export type { Settings } from "../openai";
|
|
1
|
+
export { model } from "../openai.js";
|
|
2
|
+
export type { Settings } from "../openai.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { model } from "../openai";
|
|
1
|
+
export { model } from "../openai.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../openai-compatible-responses";
|
|
1
|
+
export * from "../openai-compatible-responses.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../openai-compatible-responses";
|
|
1
|
+
export * from "../openai-compatible-responses.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ProviderPackage } from "../provider-package";
|
|
2
|
-
import { type ProviderAuthOption } from "../route/auth-options";
|
|
3
|
-
import type { RouteDefaultsInput } from "../route/client";
|
|
4
|
-
import { type ModelID } from "../schema";
|
|
5
|
-
import type { OpenResponsesProviderOptionsInput } from "./open-responses-options";
|
|
6
|
-
export type { OpenResponsesOptionsInput, OpenResponsesProviderOptionsInput } from "./open-responses-options";
|
|
1
|
+
import type { ProviderPackage } from "../provider-package.js";
|
|
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";
|
|
5
|
+
import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
|
|
6
|
+
export type { OpenResponsesOptionsInput, OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
|
|
7
7
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
8
|
export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
|
|
9
9
|
readonly provider?: string;
|
|
@@ -16,7 +16,7 @@ export interface Settings extends ProviderPackage.Settings {
|
|
|
16
16
|
readonly provider?: string;
|
|
17
17
|
readonly providerOptions?: OpenResponsesProviderOptionsInput;
|
|
18
18
|
}
|
|
19
|
-
export declare const routes: import("../route").Route<{
|
|
19
|
+
export declare const routes: import("../route/client.js").Route<{
|
|
20
20
|
readonly input: readonly ({
|
|
21
21
|
readonly type: "reasoning";
|
|
22
22
|
readonly summary: readonly {
|
|
@@ -103,17 +103,17 @@ export declare const routes: import("../route").Route<{
|
|
|
103
103
|
readonly prompt_cache_key?: string | undefined;
|
|
104
104
|
readonly service_tier?: "default" | "auto" | "flex" | "priority" | undefined;
|
|
105
105
|
readonly max_output_tokens?: number | undefined;
|
|
106
|
-
}, import("../route/transport/http").HttpPrepared<string>>[];
|
|
106
|
+
}, import("../route/transport/http.js").HttpPrepared<string>>[];
|
|
107
107
|
export declare const configure: (input: Config) => {
|
|
108
108
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
109
|
-
model: (modelID: string | ModelID) => import("
|
|
109
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenResponsesProviderOptionsInput>;
|
|
110
110
|
configure: (input: Config) => /*elided*/ any;
|
|
111
111
|
};
|
|
112
112
|
export declare const provider: {
|
|
113
113
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
114
114
|
configure: (input: Config) => {
|
|
115
115
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
116
|
-
model: (modelID: string | ModelID) => import("
|
|
116
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenResponsesProviderOptionsInput>;
|
|
117
117
|
configure: /*elided*/ any;
|
|
118
118
|
};
|
|
119
119
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OpenAICompatibleResponses } from "../protocols/openai-compatible-responses";
|
|
2
|
-
import { AuthOptions } from "../route/auth-options";
|
|
3
|
-
import { ProviderID } from "../schema";
|
|
1
|
+
import { OpenAICompatibleResponses } from "../protocols/openai-compatible-responses.js";
|
|
2
|
+
import { AuthOptions } from "../route/auth-options.js";
|
|
3
|
+
import { ProviderID } from "../schema/index.js";
|
|
4
4
|
export const id = ProviderID.make("openai-compatible");
|
|
5
5
|
export const routes = [OpenAICompatibleResponses.route];
|
|
6
6
|
export const configure = (input) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ModelID } from "../schema";
|
|
2
|
-
import type { RouteDefaultsInput } from "../route/client";
|
|
3
|
-
import { type ProviderAuthOption } from "../route/auth-options";
|
|
4
|
-
import type { ProviderPackage } from "../provider-package";
|
|
5
|
-
import type { OpenAIProviderOptionsInput } from "./openai-options";
|
|
1
|
+
import { type ModelID } from "../schema/index.js";
|
|
2
|
+
import type { RouteDefaultsInput } from "../route/client.js";
|
|
3
|
+
import { type ProviderAuthOption } from "../route/auth-options.js";
|
|
4
|
+
import type { ProviderPackage } from "../provider-package.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 GenericModelOptions = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
|
|
8
8
|
readonly provider?: string;
|
|
@@ -18,7 +18,7 @@ export type FamilyModelOptions = Omit<RouteDefaultsInput, "providerOptions"> & P
|
|
|
18
18
|
readonly baseURL?: 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,54 +114,54 @@ 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: GenericModelOptions) => {
|
|
119
119
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
120
|
-
model: (modelID: string | ModelID) => import("
|
|
120
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
121
121
|
configure: (input: GenericModelOptions) => /*elided*/ any;
|
|
122
122
|
};
|
|
123
123
|
export declare const provider: {
|
|
124
124
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
125
125
|
configure: (input: GenericModelOptions) => {
|
|
126
126
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
127
|
-
model: (modelID: string | ModelID) => import("
|
|
127
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
128
128
|
configure: /*elided*/ any;
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
131
|
export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|
|
132
132
|
export declare const baseten: {
|
|
133
133
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
134
|
-
model: (modelID: string | ModelID) => import("
|
|
134
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
135
135
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
136
136
|
};
|
|
137
137
|
export declare const cerebras: {
|
|
138
138
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
139
|
-
model: (modelID: string | ModelID) => import("
|
|
139
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
140
140
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
141
141
|
};
|
|
142
142
|
export declare const deepinfra: {
|
|
143
143
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
144
|
-
model: (modelID: string | ModelID) => import("
|
|
144
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
145
145
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
146
146
|
};
|
|
147
147
|
export declare const deepseek: {
|
|
148
148
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
149
|
-
model: (modelID: string | ModelID) => import("
|
|
149
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
150
150
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
151
151
|
};
|
|
152
152
|
export declare const fireworks: {
|
|
153
153
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
154
|
-
model: (modelID: string | ModelID) => import("
|
|
154
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
155
155
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
156
156
|
};
|
|
157
157
|
export declare const groq: {
|
|
158
158
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
159
|
-
model: (modelID: string | ModelID) => import("
|
|
159
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
160
160
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
161
161
|
};
|
|
162
162
|
export declare const togetherai: {
|
|
163
163
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
164
|
-
model: (modelID: string | ModelID) => import("
|
|
164
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenAIProviderOptionsInput>;
|
|
165
165
|
configure: (input?: FamilyModelOptions) => /*elided*/ any;
|
|
166
166
|
};
|
|
167
167
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ProviderID } from "../schema";
|
|
2
|
-
import * as OpenAICompatibleChat from "../protocols/openai-compatible-chat";
|
|
3
|
-
import { AuthOptions } from "../route/auth-options";
|
|
4
|
-
import { profiles } from "./openai-compatible-profile";
|
|
1
|
+
import { ProviderID } from "../schema/index.js";
|
|
2
|
+
import * as OpenAICompatibleChat from "../protocols/openai-compatible-chat.js";
|
|
3
|
+
import { AuthOptions } from "../route/auth-options.js";
|
|
4
|
+
import { profiles } from "./openai-compatible-profile.js";
|
|
5
5
|
export const id = ProviderID.make("openai-compatible");
|
|
6
6
|
export const routes = [OpenAICompatibleChat.route];
|
|
7
7
|
export const configure = (input) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ProviderOptions } from "../schema";
|
|
2
|
-
import type { OpenResponsesOptionsInput } from "./open-responses-options";
|
|
3
|
-
export type { OpenAIResponseIncludable, OpenAIServiceTier } from "../protocols/utils/openai-options";
|
|
1
|
+
import type { ProviderOptions } from "../schema/index.js";
|
|
2
|
+
import type { OpenResponsesOptionsInput } from "./open-responses-options.js";
|
|
3
|
+
export type { OpenAIResponseIncludable, OpenAIServiceTier } from "../protocols/utils/openai-options.js";
|
|
4
4
|
export type OpenAIOptionsInput = OpenResponsesOptionsInput;
|
|
5
5
|
export type OpenAIProviderOptionsInput = ProviderOptions & {
|
|
6
6
|
readonly openai?: OpenAIOptionsInput;
|
|
@@ -18,4 +18,4 @@ export declare const withOpenAIOptions: <Options extends {
|
|
|
18
18
|
}) => Omit<Options, "providerOptions"> & {
|
|
19
19
|
readonly providerOptions?: ProviderOptions;
|
|
20
20
|
};
|
|
21
|
-
export * as OpenAIProviderOptions from "./openai-options";
|
|
21
|
+
export * as OpenAIProviderOptions from "./openai-options.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeProviderOptions } from "../schema";
|
|
1
|
+
import { mergeProviderOptions } from "../schema/index.js";
|
|
2
2
|
const definedEntries = (input) => Object.entries(input).filter((entry) => entry[1] !== undefined);
|
|
3
3
|
const openAIProviderOptions = (options) => {
|
|
4
4
|
const openai = Object.fromEntries(definedEntries({
|
|
@@ -38,4 +38,4 @@ export const withOpenAIOptions = (modelID, options, defaults = {}) => {
|
|
|
38
38
|
providerOptions: mergeProviderOptions(openAIDefaultOptions(modelID, defaults), options.providerOptions),
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
export * as OpenAIProviderOptions from "./openai-options";
|
|
41
|
+
export * as OpenAIProviderOptions from "./openai-options.js";
|