@opencode/ai 0.0.0-dev-20777 → 0.0.0-dev-20780
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/mistral-chat.d.ts +1 -1
- package/dist/protocols/mistral-chat.js +1 -1
- package/dist/providers/amazon-bedrock-mantle.js +2 -2
- package/dist/providers/anthropic-compatible.js +2 -2
- package/dist/providers/anthropic.js +2 -2
- package/dist/providers/azure.js +2 -2
- package/dist/providers/baseten.js +2 -2
- package/dist/providers/cerebras.js +2 -2
- package/dist/providers/cloudflare-ai-gateway.js +2 -2
- package/dist/providers/cloudflare-workers-ai.js +2 -2
- package/dist/providers/cohere/chat.js +1 -1
- package/dist/providers/cohere.js +1 -1
- package/dist/providers/deepinfra.js +2 -2
- package/dist/providers/deepseek.js +2 -2
- package/dist/providers/fireworks.js +2 -2
- package/dist/providers/google/interactions.js +2 -2
- package/dist/providers/google-vertex/mistral.d.ts +2 -0
- package/dist/providers/google-vertex/mistral.js +1 -0
- package/dist/providers/google-vertex-chat.js +2 -2
- package/dist/providers/google-vertex-messages.js +2 -2
- package/dist/providers/google-vertex-mistral.d.ts +124 -0
- package/dist/providers/google-vertex-mistral.js +70 -0
- package/dist/providers/google-vertex-responses.js +2 -2
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/google.js +2 -2
- package/dist/providers/groq.js +2 -2
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.js +1 -0
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax/chat.js +1 -1
- package/dist/providers/minimax/responses.js +1 -1
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.js +2 -2
- package/dist/providers/moonshot/messages.js +1 -1
- package/dist/providers/moonshot/responses.js +1 -1
- package/dist/providers/moonshot.js +1 -1
- package/dist/providers/openai-compatible-responses.js +2 -2
- package/dist/providers/openai-compatible.js +2 -2
- package/dist/providers/openai.js +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/togetherai.js +2 -2
- package/dist/providers/venice.js +1 -1
- package/dist/providers/vercel-ai-gateway.js +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/providers/zai-coding-plan/messages.js +1 -1
- package/dist/providers/zai-coding-plan/responses.js +1 -1
- package/dist/providers/zai-coding-plan.js +1 -1
- package/dist/providers/zai.js +1 -1
- package/package.json +3 -3
|
@@ -32,7 +32,7 @@ export type ProviderOptionsInput = {
|
|
|
32
32
|
readonly promptCacheKey?: string;
|
|
33
33
|
readonly [key: string]: unknown;
|
|
34
34
|
};
|
|
35
|
-
declare const MistralBody: Schema.Struct<{
|
|
35
|
+
export declare const MistralBody: Schema.Struct<{
|
|
36
36
|
readonly model: Schema.String;
|
|
37
37
|
readonly messages: Schema.$Array<Schema.toTaggedUnion<"role", readonly [Schema.Struct<{
|
|
38
38
|
readonly role: Schema.Literal<"system">;
|
|
@@ -78,7 +78,7 @@ const MistralOptions = Schema.Struct({
|
|
|
78
78
|
promptMode: Schema.optional(Schema.Literal("reasoning")),
|
|
79
79
|
promptCacheKey: Schema.optional(Schema.String),
|
|
80
80
|
});
|
|
81
|
-
const MistralBody = Schema.Struct({
|
|
81
|
+
export const MistralBody = Schema.Struct({
|
|
82
82
|
model: Schema.String,
|
|
83
83
|
messages: Schema.Array(MistralMessage),
|
|
84
84
|
tools: optionalArray(MistralTool),
|
|
@@ -93,8 +93,8 @@ const fromSettings = ({ apiKey, auth, baseURL, body, credentials, headers, profi
|
|
|
93
93
|
baseURL,
|
|
94
94
|
credentials,
|
|
95
95
|
generation: topP === undefined ? undefined : { topP },
|
|
96
|
-
headers
|
|
97
|
-
http: body === undefined ? undefined : { body
|
|
96
|
+
headers,
|
|
97
|
+
http: body === undefined ? undefined : { body },
|
|
98
98
|
profile,
|
|
99
99
|
providerOptions,
|
|
100
100
|
region,
|
|
@@ -42,8 +42,8 @@ export const model = (modelID, { apiKey, authToken, baseURL, body, headers, prov
|
|
|
42
42
|
return configure({
|
|
43
43
|
...(authToken === undefined ? { apiKey: apiKey } : { auth: Auth.bearer(authToken) }),
|
|
44
44
|
baseURL,
|
|
45
|
-
headers
|
|
46
|
-
http: body === undefined ? undefined : { body
|
|
45
|
+
headers,
|
|
46
|
+
http: body === undefined ? undefined : { body },
|
|
47
47
|
provider,
|
|
48
48
|
providerOptions,
|
|
49
49
|
}).model(modelID);
|
|
@@ -35,8 +35,8 @@ export const model = (modelID, { apiKey, authToken, baseURL, body, headers, ...p
|
|
|
35
35
|
return configure({
|
|
36
36
|
...(authToken === undefined ? { apiKey: apiKey } : { auth: Auth.bearer(authToken) }),
|
|
37
37
|
baseURL,
|
|
38
|
-
headers
|
|
39
|
-
http: body === undefined ? undefined : { body
|
|
38
|
+
headers,
|
|
39
|
+
http: body === undefined ? undefined : { body },
|
|
40
40
|
providerOptions,
|
|
41
41
|
}).model(modelID);
|
|
42
42
|
};
|
package/dist/providers/azure.js
CHANGED
|
@@ -91,8 +91,8 @@ const config = ({ apiKey, apiVersion, baseURL, body, headers, queryParams, resou
|
|
|
91
91
|
const common = {
|
|
92
92
|
apiKey,
|
|
93
93
|
apiVersion,
|
|
94
|
-
headers
|
|
95
|
-
http: body === undefined ? undefined : { body
|
|
94
|
+
headers,
|
|
95
|
+
http: body === undefined ? undefined : { body },
|
|
96
96
|
providerOptions,
|
|
97
97
|
queryParams: queryParams === undefined ? undefined : { ...queryParams },
|
|
98
98
|
useDeploymentBasedUrls,
|
|
@@ -31,8 +31,8 @@ export const provider = configure();
|
|
|
31
31
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
32
32
|
apiKey,
|
|
33
33
|
baseURL,
|
|
34
|
-
headers
|
|
35
|
-
http: body === undefined ? undefined : { body
|
|
34
|
+
headers,
|
|
35
|
+
http: body === undefined ? undefined : { body },
|
|
36
36
|
providerOptions,
|
|
37
37
|
}).model(modelID);
|
|
38
38
|
export * as Baseten from "./baseten.js";
|
|
@@ -39,7 +39,7 @@ export const provider = configure();
|
|
|
39
39
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
40
40
|
apiKey,
|
|
41
41
|
baseURL,
|
|
42
|
-
headers
|
|
43
|
-
http: body === undefined ? undefined : { body
|
|
42
|
+
headers,
|
|
43
|
+
http: body === undefined ? undefined : { body },
|
|
44
44
|
providerOptions,
|
|
45
45
|
}).model(modelID);
|
|
@@ -100,8 +100,8 @@ export const model = (modelID, { accountId, apiKey, baseURL: configuredBaseURL,
|
|
|
100
100
|
collectLog,
|
|
101
101
|
gatewayApiKey,
|
|
102
102
|
gatewayId,
|
|
103
|
-
headers
|
|
104
|
-
http: body === undefined ? undefined : { body
|
|
103
|
+
headers,
|
|
104
|
+
http: body === undefined ? undefined : { body },
|
|
105
105
|
metadata,
|
|
106
106
|
providerOptions,
|
|
107
107
|
skipCache,
|
|
@@ -43,8 +43,8 @@ export const model = (modelID, settings) => {
|
|
|
43
43
|
return configure({
|
|
44
44
|
apiKey,
|
|
45
45
|
baseURL: baseURL(settings),
|
|
46
|
-
headers
|
|
47
|
-
http: body === undefined ? undefined : { body
|
|
46
|
+
headers,
|
|
47
|
+
http: body === undefined ? undefined : { body },
|
|
48
48
|
providerOptions,
|
|
49
49
|
}).model(modelID);
|
|
50
50
|
};
|
package/dist/providers/cohere.js
CHANGED
|
@@ -42,7 +42,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
42
42
|
apiKey,
|
|
43
43
|
baseURL,
|
|
44
44
|
headers,
|
|
45
|
-
http: body === undefined ? undefined : { body
|
|
45
|
+
http: body === undefined ? undefined : { body },
|
|
46
46
|
providerOptions,
|
|
47
47
|
}).model(modelID);
|
|
48
48
|
export * as Cohere from "./cohere.js";
|
|
@@ -42,7 +42,7 @@ export const provider = configure();
|
|
|
42
42
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
43
43
|
apiKey,
|
|
44
44
|
baseURL,
|
|
45
|
-
headers
|
|
46
|
-
http: body === undefined ? undefined : { body
|
|
45
|
+
headers,
|
|
46
|
+
http: body === undefined ? undefined : { body },
|
|
47
47
|
providerOptions,
|
|
48
48
|
}).model(modelID);
|
|
@@ -34,8 +34,8 @@ export const provider = configure();
|
|
|
34
34
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
35
35
|
apiKey,
|
|
36
36
|
baseURL,
|
|
37
|
-
headers
|
|
38
|
-
http: body === undefined ? undefined : { body
|
|
37
|
+
headers,
|
|
38
|
+
http: body === undefined ? undefined : { body },
|
|
39
39
|
providerOptions,
|
|
40
40
|
}).model(modelID);
|
|
41
41
|
export * as DeepSeek from "./deepseek.js";
|
|
@@ -31,8 +31,8 @@ export const provider = configure();
|
|
|
31
31
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
32
32
|
apiKey,
|
|
33
33
|
baseURL,
|
|
34
|
-
headers
|
|
35
|
-
http: body === undefined ? undefined : { body
|
|
34
|
+
headers,
|
|
35
|
+
http: body === undefined ? undefined : { body },
|
|
36
36
|
providerOptions,
|
|
37
37
|
}).model(modelID);
|
|
38
38
|
export * as Fireworks from "./fireworks.js";
|
|
@@ -2,7 +2,7 @@ import { configure } from "../google.js";
|
|
|
2
2
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
|
-
headers
|
|
6
|
-
http: body === undefined ? undefined : { body
|
|
5
|
+
headers,
|
|
6
|
+
http: body === undefined ? undefined : { body },
|
|
7
7
|
providerOptions,
|
|
8
8
|
}).interactions(modelID);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { model } from "../google-vertex-mistral.js";
|
|
@@ -46,8 +46,8 @@ export const model = (modelID, { accessToken, apiKey, baseURL, body, headers, lo
|
|
|
46
46
|
return configure({
|
|
47
47
|
accessToken,
|
|
48
48
|
baseURL,
|
|
49
|
-
headers
|
|
50
|
-
http: body === undefined ? undefined : { body
|
|
49
|
+
headers,
|
|
50
|
+
http: body === undefined ? undefined : { body },
|
|
51
51
|
location,
|
|
52
52
|
project,
|
|
53
53
|
providerOptions,
|
|
@@ -67,8 +67,8 @@ export const model = (modelID, { accessToken, apiKey, baseURL, body, headers, lo
|
|
|
67
67
|
return configure({
|
|
68
68
|
accessToken,
|
|
69
69
|
baseURL,
|
|
70
|
-
headers
|
|
71
|
-
http: body === undefined ? undefined : { body
|
|
70
|
+
headers,
|
|
71
|
+
http: body === undefined ? undefined : { body },
|
|
72
72
|
location,
|
|
73
73
|
project,
|
|
74
74
|
providerOptions,
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ProviderPackage } from "../provider-package.js";
|
|
2
|
+
import { MistralChat } from "../protocols/mistral-chat.js";
|
|
3
|
+
import { Route, type RouteDefaultsInput } from "../route/client.js";
|
|
4
|
+
import { HttpTransport } from "../route/transport/index.js";
|
|
5
|
+
import { type ModelID } from "../schema/index.js";
|
|
6
|
+
import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
7
|
+
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
8
|
+
export type Config = RouteDefaultsInput & GoogleVertexShared.OAuthOptions & {
|
|
9
|
+
readonly baseURL?: string;
|
|
10
|
+
readonly location?: string;
|
|
11
|
+
readonly project?: string;
|
|
12
|
+
readonly providerOptions?: MistralChat.ProviderOptionsInput;
|
|
13
|
+
};
|
|
14
|
+
export type Settings = ProviderPackage.Settings & MistralChat.ProviderOptionsInput & {
|
|
15
|
+
readonly accessToken?: string;
|
|
16
|
+
readonly apiKey?: never;
|
|
17
|
+
readonly baseURL?: string;
|
|
18
|
+
readonly location?: string;
|
|
19
|
+
readonly project?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const routes: Route<{
|
|
22
|
+
readonly max_tokens?: number | undefined;
|
|
23
|
+
readonly tools?: readonly {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly function: {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly description: string;
|
|
28
|
+
readonly parameters: {
|
|
29
|
+
readonly [x: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
readonly strict: false;
|
|
32
|
+
};
|
|
33
|
+
}[] | undefined;
|
|
34
|
+
readonly model: string;
|
|
35
|
+
readonly stop?: readonly string[] | undefined;
|
|
36
|
+
readonly messages: readonly ({
|
|
37
|
+
readonly role: "system";
|
|
38
|
+
readonly content: string | readonly {
|
|
39
|
+
readonly type: "text";
|
|
40
|
+
readonly text: string;
|
|
41
|
+
}[];
|
|
42
|
+
} | {
|
|
43
|
+
readonly role: "user";
|
|
44
|
+
readonly content: string | readonly ({
|
|
45
|
+
readonly type: "text";
|
|
46
|
+
readonly text: string;
|
|
47
|
+
} | {
|
|
48
|
+
readonly type: "image_url";
|
|
49
|
+
readonly image_url: string;
|
|
50
|
+
} | {
|
|
51
|
+
readonly type: "document_url";
|
|
52
|
+
readonly document_url: string;
|
|
53
|
+
})[];
|
|
54
|
+
} | {
|
|
55
|
+
readonly content: string | readonly ({
|
|
56
|
+
readonly [x: string]: unknown;
|
|
57
|
+
readonly type: "thinking";
|
|
58
|
+
readonly thinking: readonly {
|
|
59
|
+
readonly [x: string]: unknown;
|
|
60
|
+
readonly type?: string | undefined;
|
|
61
|
+
readonly text?: string | undefined;
|
|
62
|
+
}[];
|
|
63
|
+
} | {
|
|
64
|
+
readonly type: "text";
|
|
65
|
+
readonly text: string;
|
|
66
|
+
})[];
|
|
67
|
+
readonly role: "assistant";
|
|
68
|
+
readonly tool_calls?: readonly {
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly type: "function";
|
|
71
|
+
readonly function: {
|
|
72
|
+
readonly name: string;
|
|
73
|
+
readonly arguments: string;
|
|
74
|
+
};
|
|
75
|
+
}[] | undefined;
|
|
76
|
+
readonly prefix?: true | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
readonly role: "tool";
|
|
79
|
+
readonly tool_call_id: string;
|
|
80
|
+
readonly name: string;
|
|
81
|
+
readonly content: string | readonly ({
|
|
82
|
+
readonly type: "text";
|
|
83
|
+
readonly text: string;
|
|
84
|
+
} | {
|
|
85
|
+
readonly type: "image_url";
|
|
86
|
+
readonly image_url: string;
|
|
87
|
+
} | {
|
|
88
|
+
readonly type: "document_url";
|
|
89
|
+
readonly document_url: string;
|
|
90
|
+
})[];
|
|
91
|
+
})[];
|
|
92
|
+
readonly temperature?: number | undefined;
|
|
93
|
+
readonly stream: true;
|
|
94
|
+
readonly tool_choice?: "auto" | "none" | "any" | {
|
|
95
|
+
readonly type: "function";
|
|
96
|
+
readonly function: {
|
|
97
|
+
readonly name: string;
|
|
98
|
+
};
|
|
99
|
+
} | undefined;
|
|
100
|
+
readonly top_p?: number | undefined;
|
|
101
|
+
readonly frequency_penalty?: number | undefined;
|
|
102
|
+
readonly presence_penalty?: number | undefined;
|
|
103
|
+
readonly random_seed?: number | undefined;
|
|
104
|
+
readonly safe_prompt?: boolean | undefined;
|
|
105
|
+
readonly document_image_limit?: number | undefined;
|
|
106
|
+
readonly document_page_limit?: number | undefined;
|
|
107
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
108
|
+
readonly reasoning_effort?: string | undefined;
|
|
109
|
+
readonly prompt_mode?: "reasoning" | undefined;
|
|
110
|
+
}, HttpTransport.HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
111
|
+
export declare const configure: (input?: Config) => {
|
|
112
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
113
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
114
|
+
configure: (input?: Config) => /*elided*/ any;
|
|
115
|
+
};
|
|
116
|
+
export declare const provider: {
|
|
117
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
118
|
+
configure: (input?: Config) => {
|
|
119
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
120
|
+
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MistralChat.ProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
121
|
+
configure: /*elided*/ any;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export declare const model: ProviderPackage.Definition<Settings, MistralChat.ProviderOptionsInput>["model"];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Effect, Schema, Struct } from "effect";
|
|
2
|
+
import { MistralChat } from "../protocols/mistral-chat.js";
|
|
3
|
+
import { Auth } from "../route/auth.js";
|
|
4
|
+
import { Route } from "../route/client.js";
|
|
5
|
+
import { Endpoint } from "../route/endpoint.js";
|
|
6
|
+
import { Protocol } from "../route/protocol.js";
|
|
7
|
+
import { HttpTransport } from "../route/transport/index.js";
|
|
8
|
+
import { ProviderConfigurationError, ProviderID } from "../schema/index.js";
|
|
9
|
+
import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
10
|
+
export const id = ProviderID.make("google-vertex");
|
|
11
|
+
// Mistral on Vertex takes the Mistral chat body, model included, through the publisher's streamRawPredict method.
|
|
12
|
+
// Vertex validates the body strictly and rejects prompt_cache_key, which Mistral's own API accepts.
|
|
13
|
+
const route = Route.make({
|
|
14
|
+
id: "google-vertex-mistral",
|
|
15
|
+
provider: id,
|
|
16
|
+
providerMetadataKey: "vertex",
|
|
17
|
+
protocol: Protocol.make({
|
|
18
|
+
id: MistralChat.protocol.id,
|
|
19
|
+
body: {
|
|
20
|
+
schema: Schema.Struct(Struct.omit(MistralChat.MistralBody.fields, ["prompt_cache_key"])),
|
|
21
|
+
from: (request) => MistralChat.protocol.body.from(request).pipe(Effect.map((body) => Struct.omit(body, ["prompt_cache_key"]))),
|
|
22
|
+
},
|
|
23
|
+
stream: MistralChat.protocol.stream,
|
|
24
|
+
}),
|
|
25
|
+
endpoint: Endpoint.path(({ request }) => `/${request.model.id}:streamRawPredict`),
|
|
26
|
+
auth: Auth.none,
|
|
27
|
+
transport: HttpTransport.sseJson.with().with({ framing: MistralChat.framing }),
|
|
28
|
+
});
|
|
29
|
+
export const routes = [route];
|
|
30
|
+
const configuredRoute = (input) => {
|
|
31
|
+
if ("apiKey" in input && input.apiKey !== undefined)
|
|
32
|
+
throw new ProviderConfigurationError({ provider: id, message: "Google Vertex Mistral does not support API keys" });
|
|
33
|
+
const { accessToken: _accessToken, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
34
|
+
// Mistral is served from regional endpoints only; the global endpoint returns 404.
|
|
35
|
+
const location = GoogleVertexShared.location(inputLocation, "us-central1");
|
|
36
|
+
const project = GoogleVertexShared.project(inputProject);
|
|
37
|
+
return route.with({
|
|
38
|
+
...rest,
|
|
39
|
+
endpoint: {
|
|
40
|
+
baseURL: baseURL ??
|
|
41
|
+
`https://${GoogleVertexShared.host(location)}/v1/projects/${GoogleVertexShared.requireProject(project)}/locations/${location}/publishers/mistralai/models`,
|
|
42
|
+
},
|
|
43
|
+
auth: GoogleVertexShared.oauth(input, project),
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
export const configure = (input = {}) => {
|
|
47
|
+
const route = configuredRoute(input);
|
|
48
|
+
return {
|
|
49
|
+
id,
|
|
50
|
+
model: (modelID) => route.model({ id: modelID }),
|
|
51
|
+
configure,
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export const provider = {
|
|
55
|
+
id,
|
|
56
|
+
configure,
|
|
57
|
+
};
|
|
58
|
+
export const model = (modelID, { accessToken, apiKey, baseURL, body, headers, location, project, ...providerOptions }) => {
|
|
59
|
+
if (apiKey !== undefined)
|
|
60
|
+
throw new ProviderConfigurationError({ provider: id, message: "Google Vertex Mistral does not support API keys" });
|
|
61
|
+
return configure({
|
|
62
|
+
accessToken,
|
|
63
|
+
baseURL,
|
|
64
|
+
headers,
|
|
65
|
+
http: body === undefined ? undefined : { body },
|
|
66
|
+
location,
|
|
67
|
+
project,
|
|
68
|
+
providerOptions,
|
|
69
|
+
}).model(modelID);
|
|
70
|
+
};
|
|
@@ -47,8 +47,8 @@ export const model = (modelID, { accessToken, apiKey, baseURL, body, headers, lo
|
|
|
47
47
|
return configure({
|
|
48
48
|
accessToken,
|
|
49
49
|
baseURL,
|
|
50
|
-
headers
|
|
51
|
-
http: body === undefined ? undefined : { body
|
|
50
|
+
headers,
|
|
51
|
+
http: body === undefined ? undefined : { body },
|
|
52
52
|
location,
|
|
53
53
|
project,
|
|
54
54
|
providerOptions,
|
|
@@ -81,8 +81,8 @@ export const model = (modelID, { accessToken, apiKey, baseURL, body, headers, lo
|
|
|
81
81
|
return configure({
|
|
82
82
|
...(apiKey === undefined ? { accessToken: accessToken } : { apiKey: apiKey }),
|
|
83
83
|
baseURL,
|
|
84
|
-
headers
|
|
85
|
-
http: body === undefined ? undefined : { body
|
|
84
|
+
headers,
|
|
85
|
+
http: body === undefined ? undefined : { body },
|
|
86
86
|
location,
|
|
87
87
|
project,
|
|
88
88
|
providerOptions,
|
package/dist/providers/google.js
CHANGED
|
@@ -42,8 +42,8 @@ export const provider = configure();
|
|
|
42
42
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
43
43
|
apiKey,
|
|
44
44
|
baseURL,
|
|
45
|
-
headers
|
|
46
|
-
http: body === undefined ? undefined : { body
|
|
45
|
+
headers,
|
|
46
|
+
http: body === undefined ? undefined : { body },
|
|
47
47
|
providerOptions,
|
|
48
48
|
}).model(modelID);
|
|
49
49
|
export const image = provider.image;
|
package/dist/providers/groq.js
CHANGED
|
@@ -74,8 +74,8 @@ export const provider = configure();
|
|
|
74
74
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
75
75
|
apiKey,
|
|
76
76
|
baseURL,
|
|
77
|
-
headers
|
|
78
|
-
http: body === undefined ? undefined : { body
|
|
77
|
+
headers,
|
|
78
|
+
http: body === undefined ? undefined : { body },
|
|
79
79
|
providerOptions,
|
|
80
80
|
}).model(modelID);
|
|
81
81
|
export * as Groq from "./groq.js";
|
|
@@ -23,6 +23,7 @@ export * as Google from "./google.js";
|
|
|
23
23
|
export * as GoogleVertex from "./google-vertex.js";
|
|
24
24
|
export * as GoogleVertexChat from "./google-vertex-chat.js";
|
|
25
25
|
export * as GoogleVertexMessages from "./google-vertex-messages.js";
|
|
26
|
+
export * as GoogleVertexMistral from "./google-vertex-mistral.js";
|
|
26
27
|
export * as GoogleVertexResponses from "./google-vertex-responses.js";
|
|
27
28
|
export * as Groq from "./groq.js";
|
|
28
29
|
export * as Meta from "./meta.js";
|
package/dist/providers/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export * as Google from "./google.js";
|
|
|
23
23
|
export * as GoogleVertex from "./google-vertex.js";
|
|
24
24
|
export * as GoogleVertexChat from "./google-vertex-chat.js";
|
|
25
25
|
export * as GoogleVertexMessages from "./google-vertex-messages.js";
|
|
26
|
+
export * as GoogleVertexMistral from "./google-vertex-mistral.js";
|
|
26
27
|
export * as GoogleVertexResponses from "./google-vertex-responses.js";
|
|
27
28
|
export * as Groq from "./groq.js";
|
|
28
29
|
export * as Meta from "./meta.js";
|
package/dist/providers/meta.js
CHANGED
|
@@ -102,7 +102,7 @@ function fromSettings({ apiKey, baseURL, body, headers, ...providerOptions }) {
|
|
|
102
102
|
apiKey,
|
|
103
103
|
baseURL,
|
|
104
104
|
headers,
|
|
105
|
-
http: body === undefined ? undefined : { body
|
|
105
|
+
http: body === undefined ? undefined : { body },
|
|
106
106
|
providerOptions,
|
|
107
107
|
});
|
|
108
108
|
}
|
|
@@ -3,6 +3,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|
|
6
|
-
http: body === undefined ? undefined : { body
|
|
6
|
+
http: body === undefined ? undefined : { body },
|
|
7
7
|
providerOptions,
|
|
8
8
|
}).responses(modelID);
|
|
@@ -80,7 +80,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
80
80
|
apiKey,
|
|
81
81
|
baseURL,
|
|
82
82
|
headers,
|
|
83
|
-
http: body === undefined ? undefined : { body
|
|
83
|
+
http: body === undefined ? undefined : { body },
|
|
84
84
|
providerOptions,
|
|
85
85
|
}).model(modelID);
|
|
86
86
|
export const messages = provider.messages;
|
|
@@ -21,8 +21,8 @@ export const provider = configure();
|
|
|
21
21
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
22
22
|
apiKey,
|
|
23
23
|
baseURL,
|
|
24
|
-
headers
|
|
25
|
-
http: body === undefined ? undefined : { body
|
|
24
|
+
headers,
|
|
25
|
+
http: body === undefined ? undefined : { body },
|
|
26
26
|
providerOptions,
|
|
27
27
|
}).model(modelID);
|
|
28
28
|
export * as Mistral from "./mistral.js";
|
|
@@ -3,6 +3,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|
|
6
|
-
http: body === undefined ? undefined : { body
|
|
6
|
+
http: body === undefined ? undefined : { body },
|
|
7
7
|
providerOptions,
|
|
8
8
|
}).messages(modelID);
|
|
@@ -3,6 +3,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|
|
6
|
-
http: body === undefined ? undefined : { body
|
|
6
|
+
http: body === undefined ? undefined : { body },
|
|
7
7
|
providerOptions,
|
|
8
8
|
}).responses(modelID);
|
|
@@ -85,7 +85,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
85
85
|
apiKey,
|
|
86
86
|
baseURL,
|
|
87
87
|
headers,
|
|
88
|
-
http: body === undefined ? undefined : { body
|
|
88
|
+
http: body === undefined ? undefined : { body },
|
|
89
89
|
providerOptions,
|
|
90
90
|
}).model(modelID);
|
|
91
91
|
export * as Moonshot from "./moonshot.js";
|
|
@@ -25,8 +25,8 @@ export const provider = {
|
|
|
25
25
|
export const model = (modelID, { apiKey, baseURL, body, headers, provider, ...providerOptions }) => configure({
|
|
26
26
|
apiKey,
|
|
27
27
|
baseURL,
|
|
28
|
-
headers
|
|
29
|
-
http: body === undefined ? undefined : { body
|
|
28
|
+
headers,
|
|
29
|
+
http: body === undefined ? undefined : { body },
|
|
30
30
|
provider,
|
|
31
31
|
providerOptions,
|
|
32
32
|
}).model(modelID);
|
|
@@ -25,8 +25,8 @@ export const provider = {
|
|
|
25
25
|
export const model = (modelID, { apiKey, baseURL, body, headers, provider, ...providerOptions }) => configure({
|
|
26
26
|
apiKey,
|
|
27
27
|
baseURL,
|
|
28
|
-
headers
|
|
29
|
-
http: body === undefined ? undefined : { body
|
|
28
|
+
headers,
|
|
29
|
+
http: body === undefined ? undefined : { body },
|
|
30
30
|
provider,
|
|
31
31
|
providerOptions,
|
|
32
32
|
}).model(modelID);
|
package/dist/providers/openai.js
CHANGED
|
@@ -77,7 +77,7 @@ const config = ({ apiKey, baseURL, body, headers: given, organization, project,
|
|
|
77
77
|
apiKey,
|
|
78
78
|
baseURL,
|
|
79
79
|
headers: Object.keys(headers).length === 0 ? undefined : headers,
|
|
80
|
-
http: body === undefined ? undefined : { body
|
|
80
|
+
http: body === undefined ? undefined : { body },
|
|
81
81
|
providerOptions,
|
|
82
82
|
queryParams: queryParams === undefined ? undefined : { ...queryParams },
|
|
83
83
|
};
|
|
@@ -114,6 +114,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
114
114
|
apiKey,
|
|
115
115
|
baseURL,
|
|
116
116
|
headers,
|
|
117
|
-
http: body === undefined ? undefined : { body
|
|
117
|
+
http: body === undefined ? undefined : { body },
|
|
118
118
|
providerOptions,
|
|
119
119
|
}).model(modelID);
|
|
@@ -34,7 +34,7 @@ export const provider = configure();
|
|
|
34
34
|
export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOptions }) => configure({
|
|
35
35
|
apiKey,
|
|
36
36
|
baseURL,
|
|
37
|
-
headers
|
|
38
|
-
http: body === undefined ? undefined : { body
|
|
37
|
+
headers,
|
|
38
|
+
http: body === undefined ? undefined : { body },
|
|
39
39
|
providerOptions,
|
|
40
40
|
}).model(modelID);
|
package/dist/providers/venice.js
CHANGED
|
@@ -32,7 +32,7 @@ export const model = (modelID, { apiKey, baseURL, queryParams, body, headers, ..
|
|
|
32
32
|
baseURL,
|
|
33
33
|
queryParams,
|
|
34
34
|
headers,
|
|
35
|
-
http: body === undefined ? undefined : { body
|
|
35
|
+
http: body === undefined ? undefined : { body },
|
|
36
36
|
providerOptions,
|
|
37
37
|
}).model(modelID);
|
|
38
38
|
export * as Venice from "./venice.js";
|
|
@@ -218,7 +218,7 @@ function fromSettings({ apiKey, baseURL, headers, body, ...providerOptions }) {
|
|
|
218
218
|
apiKey,
|
|
219
219
|
baseURL,
|
|
220
220
|
headers,
|
|
221
|
-
http: body === undefined ? undefined : { body
|
|
221
|
+
http: body === undefined ? undefined : { body },
|
|
222
222
|
providerOptions,
|
|
223
223
|
});
|
|
224
224
|
}
|
package/dist/providers/xai.js
CHANGED
|
@@ -77,7 +77,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
77
77
|
apiKey,
|
|
78
78
|
baseURL,
|
|
79
79
|
headers,
|
|
80
|
-
http: body === undefined ? undefined : { body
|
|
80
|
+
http: body === undefined ? undefined : { body },
|
|
81
81
|
providerOptions,
|
|
82
82
|
}).model(modelID);
|
|
83
83
|
export const responses = provider.responses;
|
|
@@ -3,6 +3,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|
|
6
|
-
http: body === undefined ? undefined : { body
|
|
6
|
+
http: body === undefined ? undefined : { body },
|
|
7
7
|
providerOptions,
|
|
8
8
|
}).messages(modelID);
|
|
@@ -3,6 +3,6 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
3
3
|
apiKey,
|
|
4
4
|
baseURL,
|
|
5
5
|
headers,
|
|
6
|
-
http: body === undefined ? undefined : { body
|
|
6
|
+
http: body === undefined ? undefined : { body },
|
|
7
7
|
providerOptions,
|
|
8
8
|
}).responses(modelID);
|
|
@@ -57,7 +57,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
57
57
|
apiKey,
|
|
58
58
|
baseURL,
|
|
59
59
|
headers,
|
|
60
|
-
http: body === undefined ? undefined : { body
|
|
60
|
+
http: body === undefined ? undefined : { body },
|
|
61
61
|
providerOptions,
|
|
62
62
|
}).model(modelID);
|
|
63
63
|
export * as ZAICodingPlan from "./zai-coding-plan.js";
|
package/dist/providers/zai.js
CHANGED
|
@@ -43,7 +43,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
|
|
|
43
43
|
apiKey,
|
|
44
44
|
baseURL,
|
|
45
45
|
headers,
|
|
46
|
-
http: body === undefined ? undefined : { body
|
|
46
|
+
http: body === undefined ? undefined : { body },
|
|
47
47
|
providerOptions,
|
|
48
48
|
}).model(modelID);
|
|
49
49
|
export * as ZAI from "./zai.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20780",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
36
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-20780",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
45
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
46
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
+
"@opencode/schema": "0.0.0-dev-20780",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.0-rc.112",
|
|
50
50
|
"google-auth-library": "10.5.0"
|