@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.
@@ -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.141";
5
+ const VERSION = "5.0.142";
6
6
  //#endregion
7
7
  //#region src/edge/google-vertex-auth-edge.ts
8
8
  const loadCredentials = async () => {
@@ -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.141";
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.141",
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.105",
75
- "@ai-sdk/google": "4.0.121",
76
- "@ai-sdk/openai-compatible": "3.0.92",
77
- "@ai-sdk/provider": "4.0.38",
78
- "@ai-sdk/provider-utils": "5.0.81",
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": {
@@ -8,4 +8,5 @@ export const googleVertexTools = {
8
8
  fileSearch: googleTools.fileSearch,
9
9
  codeExecution: googleTools.codeExecution,
10
10
  vertexRagStore: googleTools.vertexRagStore,
11
+ mcpServer: googleTools.mcpServer,
11
12
  };