@opencode/ai 0.0.0-dev-19971 → 0.0.0-dev-19973
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.
|
@@ -10,23 +10,11 @@ import { GoogleVertexShared } from "./google-vertex-shared.js";
|
|
|
10
10
|
export const id = ProviderID.make("google-vertex");
|
|
11
11
|
const fromRequest = Effect.fn("GoogleVertex.fromRequest")(function* (request) {
|
|
12
12
|
const { serviceTier: _, ...body } = yield* Gemini.protocol.body.from(request);
|
|
13
|
-
// Vertex's native REST schema rejects `id` on FunctionCall/FunctionResponse parts with HTTP 400,
|
|
14
|
-
// unlike AI Studio, so history minted there cannot be lowered verbatim.
|
|
15
|
-
const contents = body.contents.map((content) => ({
|
|
16
|
-
...content,
|
|
17
|
-
parts: (content.parts ?? []).map((part) => {
|
|
18
|
-
if ("functionCall" in part)
|
|
19
|
-
return { ...part, functionCall: { ...part.functionCall, id: undefined } };
|
|
20
|
-
if ("functionResponse" in part)
|
|
21
|
-
return { ...part, functionResponse: { ...part.functionResponse, id: undefined } };
|
|
22
|
-
return part;
|
|
23
|
-
}),
|
|
24
|
-
}));
|
|
25
13
|
const value = request.providerOptions?.labels;
|
|
26
14
|
const labels = ProviderShared.isRecord(value)
|
|
27
15
|
? Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"))
|
|
28
16
|
: undefined;
|
|
29
|
-
return { ...body,
|
|
17
|
+
return { ...body, labels };
|
|
30
18
|
});
|
|
31
19
|
const protocol = {
|
|
32
20
|
...Gemini.protocol,
|
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-19973",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
32
32
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
33
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
33
|
+
"@opencode/http-recorder": "0.0.0-dev-19973",
|
|
34
34
|
"@tsconfig/bun": "1.0.9",
|
|
35
35
|
"@types/bun": "1.4.0",
|
|
36
36
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
41
41
|
"@smithy/eventstream-codec": "4.2.14",
|
|
42
42
|
"@smithy/util-utf8": "4.2.2",
|
|
43
|
-
"@opencode/schema": "0.0.0-dev-
|
|
43
|
+
"@opencode/schema": "0.0.0-dev-19973",
|
|
44
44
|
"aws4fetch": "1.0.20",
|
|
45
45
|
"effect": "4.0.0-rc.112",
|
|
46
46
|
"google-auth-library": "10.5.0"
|