@ai-sdk/google-vertex 5.0.141 → 5.0.142
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/CHANGELOG.md +22 -0
- package/dist/anthropic/edge/index.js +1 -1
- package/dist/edge/index.d.ts +6 -0
- package/dist/edge/index.d.ts.map +1 -1
- package/dist/edge/index.js +3 -2
- package/dist/edge/index.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/maas/edge/index.js +1 -1
- package/dist/xai/edge/index.js +1 -1
- package/docs/16-google-vertex.mdx +24 -0
- package/package.json +6 -6
- package/src/google-vertex-tools.ts +1 -0
package/dist/maas/edge/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { fetchWithValidatedEndpoint, getRuntimeEnvironmentUserAgent, isBrowserRu
|
|
|
2
2
|
import { InvalidArgumentError } from "@ai-sdk/provider";
|
|
3
3
|
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
|
|
4
4
|
//#region src/version.ts
|
|
5
|
-
const VERSION = "5.0.
|
|
5
|
+
const VERSION = "5.0.142";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/edge/google-vertex-auth-edge.ts
|
|
8
8
|
const loadCredentials = async () => {
|
package/dist/xai/edge/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getRuntimeEnvironmentUserAgent, loadOptionalSetting, loadSetting, resol
|
|
|
2
2
|
import { NoSuchModelError } from "@ai-sdk/provider";
|
|
3
3
|
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
|
|
4
4
|
//#region src/version.ts
|
|
5
|
-
const VERSION = "5.0.
|
|
5
|
+
const VERSION = "5.0.142";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/edge/google-vertex-auth-edge.ts
|
|
8
8
|
const loadCredentials = async () => {
|
|
@@ -618,6 +618,30 @@ const result = await generateText({
|
|
|
618
618
|
|
|
619
619
|
The optional `retrievalConfig.latLng` provider option provides location context for queries about nearby places. This configuration applies to any grounding tools that support location context.
|
|
620
620
|
|
|
621
|
+
#### Remote MCP Server
|
|
622
|
+
|
|
623
|
+
For Vertex Interactions models (`googleVertex.interactions(...)`), `googleVertex.tools.mcpServer` connects a remote MCP server so the model can call its tools. Header values are sent to the API and redacted from telemetry.
|
|
624
|
+
|
|
625
|
+
```ts
|
|
626
|
+
import { googleVertex } from '@ai-sdk/google-vertex';
|
|
627
|
+
import { generateText } from 'ai';
|
|
628
|
+
|
|
629
|
+
const { text } = await generateText({
|
|
630
|
+
model: googleVertex.interactions('gemini-4-hydrogen'),
|
|
631
|
+
tools: {
|
|
632
|
+
mcp_server: googleVertex.tools.mcpServer({
|
|
633
|
+
name: 'local-mcp',
|
|
634
|
+
url: 'https://example.com/mcp',
|
|
635
|
+
headers: { Authorization: `Bearer ${process.env.MCP_TOKEN}` },
|
|
636
|
+
allowedTools: ['getWeather'],
|
|
637
|
+
}),
|
|
638
|
+
},
|
|
639
|
+
prompt: 'What is the weather in San Francisco right now?',
|
|
640
|
+
});
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
See [Remote MCP servers](/providers/ai-sdk-providers/google#remote-mcp-servers) for the Google provider equivalent.
|
|
644
|
+
|
|
621
645
|
#### Streaming Function Call Arguments
|
|
622
646
|
|
|
623
647
|
For Gemini 3 Pro and later models on Vertex AI, you can stream function call
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/google-vertex",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.142",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@ai-sdk/anthropic": "4.0.
|
|
75
|
-
"@ai-sdk/google": "4.0.
|
|
76
|
-
"@ai-sdk/openai-compatible": "3.0.
|
|
77
|
-
"@ai-sdk/provider": "4.0.
|
|
78
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
74
|
+
"@ai-sdk/anthropic": "4.0.106",
|
|
75
|
+
"@ai-sdk/google": "4.0.122",
|
|
76
|
+
"@ai-sdk/openai-compatible": "3.0.93",
|
|
77
|
+
"@ai-sdk/provider": "4.0.39",
|
|
78
|
+
"@ai-sdk/provider-utils": "5.0.82",
|
|
79
79
|
"google-auth-library": "^11.3.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|