@opencode/ai 0.0.0-dev-20789 → 0.0.0-dev-20792
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/providers/google-vertex-chat.js +1 -1
- package/dist/providers/google-vertex-interactions.js +1 -1
- package/dist/providers/google-vertex-messages.js +1 -1
- package/dist/providers/google-vertex-mistral.js +1 -2
- package/dist/providers/google-vertex-responses.js +1 -1
- package/dist/providers/google-vertex-shared.d.ts +1 -1
- package/dist/providers/google-vertex-shared.js +2 -2
- package/dist/providers/google-vertex.js +1 -1
- package/package.json +3 -3
|
@@ -17,7 +17,7 @@ const configuredRoute = (input) => {
|
|
|
17
17
|
if ("apiKey" in input && input.apiKey !== undefined)
|
|
18
18
|
throw new ProviderConfigurationError({ provider: id, message: "Google Vertex Chat does not support API keys" });
|
|
19
19
|
const { accessToken: _accessToken, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
20
|
-
const location = GoogleVertexShared.location(inputLocation
|
|
20
|
+
const location = GoogleVertexShared.location(inputLocation);
|
|
21
21
|
const project = GoogleVertexShared.project(inputProject);
|
|
22
22
|
return route.with({
|
|
23
23
|
...rest,
|
|
@@ -23,7 +23,7 @@ export const routes = [route];
|
|
|
23
23
|
const configuredRoute = (input) => {
|
|
24
24
|
const { accessToken: _accessToken, apiKey: _apiKey, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
25
25
|
const apiKey = GoogleVertexShared.apiKey(input);
|
|
26
|
-
const location = GoogleVertexShared.location(inputLocation
|
|
26
|
+
const location = GoogleVertexShared.location(inputLocation);
|
|
27
27
|
const project = GoogleVertexShared.project(inputProject);
|
|
28
28
|
return route.with({
|
|
29
29
|
...rest,
|
|
@@ -38,7 +38,7 @@ const configuredRoute = (input) => {
|
|
|
38
38
|
if ("apiKey" in input && input.apiKey !== undefined)
|
|
39
39
|
throw new ProviderConfigurationError({ provider: id, message: "Google Vertex Messages does not support API keys" });
|
|
40
40
|
const { accessToken: _accessToken, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
41
|
-
const location = GoogleVertexShared.location(inputLocation
|
|
41
|
+
const location = GoogleVertexShared.location(inputLocation);
|
|
42
42
|
const project = GoogleVertexShared.project(inputProject);
|
|
43
43
|
return route.with({
|
|
44
44
|
...rest,
|
|
@@ -31,8 +31,7 @@ const configuredRoute = (input) => {
|
|
|
31
31
|
if ("apiKey" in input && input.apiKey !== undefined)
|
|
32
32
|
throw new ProviderConfigurationError({ provider: id, message: "Google Vertex Mistral does not support API keys" });
|
|
33
33
|
const { accessToken: _accessToken, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
34
|
-
|
|
35
|
-
const location = GoogleVertexShared.location(inputLocation, "us-central1");
|
|
34
|
+
const location = GoogleVertexShared.location(inputLocation);
|
|
36
35
|
const project = GoogleVertexShared.project(inputProject);
|
|
37
36
|
return route.with({
|
|
38
37
|
...rest,
|
|
@@ -18,7 +18,7 @@ const configuredRoute = (input) => {
|
|
|
18
18
|
if ("apiKey" in input && input.apiKey !== undefined)
|
|
19
19
|
throw new ProviderConfigurationError({ provider: id, message: "Google Vertex Responses does not support API keys" });
|
|
20
20
|
const { accessToken: _accessToken, auth: _auth, baseURL, location: inputLocation, project: inputProject, ...rest } = input;
|
|
21
|
-
const location = GoogleVertexShared.location(inputLocation
|
|
21
|
+
const location = GoogleVertexShared.location(inputLocation);
|
|
22
22
|
const project = GoogleVertexShared.project(inputProject);
|
|
23
23
|
return route.with({
|
|
24
24
|
...rest,
|
|
@@ -14,7 +14,7 @@ export type ApiKeyOptions = (OAuthOptions & {
|
|
|
14
14
|
readonly auth?: never;
|
|
15
15
|
};
|
|
16
16
|
export declare const project: (value?: string) => string | undefined;
|
|
17
|
-
export declare const location: (value: string | undefined
|
|
17
|
+
export declare const location: (value: string | undefined) => string;
|
|
18
18
|
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 & {
|
|
@@ -8,11 +8,11 @@ export const project = (value) => value ??
|
|
|
8
8
|
process.env.GOOGLE_CLOUD_PROJECT ??
|
|
9
9
|
process.env.GCP_PROJECT ??
|
|
10
10
|
process.env.GCLOUD_PROJECT;
|
|
11
|
-
export const location = (value
|
|
11
|
+
export const location = (value) => value ??
|
|
12
12
|
process.env.GOOGLE_VERTEX_LOCATION ??
|
|
13
13
|
process.env.GOOGLE_CLOUD_LOCATION ??
|
|
14
14
|
process.env.VERTEX_LOCATION ??
|
|
15
|
-
|
|
15
|
+
"global";
|
|
16
16
|
export const host = (location) => {
|
|
17
17
|
if (location === "global")
|
|
18
18
|
return "aiplatform.googleapis.com";
|
|
@@ -49,7 +49,7 @@ const configuredRoute = (input, modelID) => {
|
|
|
49
49
|
provider: id,
|
|
50
50
|
message: "Google Vertex tuned models do not support Express Mode API keys",
|
|
51
51
|
});
|
|
52
|
-
const location = GoogleVertexShared.location(inputLocation
|
|
52
|
+
const location = GoogleVertexShared.location(inputLocation);
|
|
53
53
|
const project = GoogleVertexShared.project(inputProject);
|
|
54
54
|
const endpoint = baseURL ??
|
|
55
55
|
(apiKey
|
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-20792",
|
|
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.118",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-20792",
|
|
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-20792",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.0-rc.118",
|
|
50
50
|
"google-auth-library": "10.5.0"
|