@ai-sdk/google-vertex 5.0.0-beta.3 → 5.0.0-beta.30

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +226 -8
  2. package/README.md +65 -1
  3. package/dist/anthropic/edge/index.d.mts +60 -15
  4. package/dist/anthropic/edge/index.d.ts +60 -15
  5. package/dist/anthropic/edge/index.js +29 -7
  6. package/dist/anthropic/edge/index.js.map +1 -1
  7. package/dist/anthropic/edge/index.mjs +26 -4
  8. package/dist/anthropic/edge/index.mjs.map +1 -1
  9. package/dist/anthropic/index.d.mts +60 -15
  10. package/dist/anthropic/index.d.ts +60 -15
  11. package/dist/anthropic/index.js +28 -6
  12. package/dist/anthropic/index.js.map +1 -1
  13. package/dist/anthropic/index.mjs +25 -3
  14. package/dist/anthropic/index.mjs.map +1 -1
  15. package/dist/edge/index.d.mts +19 -19
  16. package/dist/edge/index.d.ts +19 -19
  17. package/dist/edge/index.js +8 -8
  18. package/dist/edge/index.js.map +1 -1
  19. package/dist/edge/index.mjs +5 -5
  20. package/dist/edge/index.mjs.map +1 -1
  21. package/dist/index.d.mts +19 -19
  22. package/dist/index.d.ts +19 -19
  23. package/dist/index.js +8 -8
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +5 -5
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/maas/edge/index.d.mts +76 -0
  28. package/dist/maas/edge/index.d.ts +76 -0
  29. package/dist/maas/edge/index.js +215 -0
  30. package/dist/maas/edge/index.js.map +1 -0
  31. package/dist/maas/edge/index.mjs +196 -0
  32. package/dist/maas/edge/index.mjs.map +1 -0
  33. package/dist/maas/index.d.mts +60 -0
  34. package/dist/maas/index.d.ts +60 -0
  35. package/dist/maas/index.js +125 -0
  36. package/dist/maas/index.js.map +1 -0
  37. package/dist/maas/index.mjs +101 -0
  38. package/dist/maas/index.mjs.map +1 -0
  39. package/docs/16-google-vertex.mdx +164 -6
  40. package/maas/edge.d.ts +1 -0
  41. package/maas/index.d.ts +1 -0
  42. package/package.json +19 -8
  43. package/src/anthropic/edge/google-vertex-anthropic-provider-edge.ts +1 -2
  44. package/src/anthropic/google-vertex-anthropic-provider-node.ts +1 -2
  45. package/src/anthropic/google-vertex-anthropic-provider.ts +32 -7
  46. package/src/edge/google-vertex-provider-edge.ts +1 -2
  47. package/src/google-vertex-embedding-model.ts +5 -5
  48. package/src/google-vertex-embedding-options.ts +2 -0
  49. package/src/google-vertex-image-model.ts +17 -17
  50. package/src/google-vertex-provider-node.ts +1 -2
  51. package/src/google-vertex-provider.ts +12 -12
  52. package/src/google-vertex-video-model.ts +7 -7
  53. package/src/maas/edge/google-vertex-maas-provider-edge.ts +65 -0
  54. package/src/maas/edge/index.ts +9 -0
  55. package/src/maas/google-vertex-maas-options.ts +15 -0
  56. package/src/maas/google-vertex-maas-provider-node.ts +64 -0
  57. package/src/maas/google-vertex-maas-provider.ts +111 -0
  58. package/src/maas/index.ts +9 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,223 @@
1
1
  # @ai-sdk/google-vertex
2
2
 
3
+ ## 5.0.0-beta.30
4
+
5
+ ### Patch Changes
6
+
7
+ - 38fc777: Add AI Gateway hint to provider READMEs
8
+ - Updated dependencies [38fc777]
9
+ - @ai-sdk/anthropic@4.0.0-beta.16
10
+ - @ai-sdk/google@4.0.0-beta.22
11
+ - @ai-sdk/openai-compatible@3.0.0-beta.13
12
+
13
+ ## 5.0.0-beta.29
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [f57c702]
18
+ - @ai-sdk/anthropic@4.0.0-beta.15
19
+
20
+ ## 5.0.0-beta.28
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [2e17091]
25
+ - @ai-sdk/provider-utils@5.0.0-beta.9
26
+ - @ai-sdk/anthropic@4.0.0-beta.14
27
+ - @ai-sdk/google@4.0.0-beta.21
28
+ - @ai-sdk/openai-compatible@3.0.0-beta.12
29
+
30
+ ## 5.0.0-beta.27
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [986c6fd]
35
+ - Updated dependencies [493295c]
36
+ - @ai-sdk/provider-utils@5.0.0-beta.8
37
+ - @ai-sdk/anthropic@4.0.0-beta.13
38
+ - @ai-sdk/google@4.0.0-beta.20
39
+ - @ai-sdk/openai-compatible@3.0.0-beta.11
40
+
41
+ ## 5.0.0-beta.26
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [01fa606]
46
+ - @ai-sdk/google@4.0.0-beta.19
47
+
48
+ ## 5.0.0-beta.25
49
+
50
+ ### Patch Changes
51
+
52
+ - a34b997: feat (provider/google-vertex): add support for maas models
53
+
54
+ ## 5.0.0-beta.24
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [9715ec7]
59
+ - @ai-sdk/google@4.0.0-beta.18
60
+
61
+ ## 5.0.0-beta.23
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [1f509d4]
66
+ - @ai-sdk/provider-utils@5.0.0-beta.7
67
+ - @ai-sdk/provider@4.0.0-beta.5
68
+ - @ai-sdk/anthropic@4.0.0-beta.12
69
+ - @ai-sdk/google@4.0.0-beta.17
70
+
71
+ ## 5.0.0-beta.22
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies [0ee8aec]
76
+ - @ai-sdk/anthropic@4.0.0-beta.11
77
+
78
+ ## 5.0.0-beta.21
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [6190649]
83
+ - @ai-sdk/google@4.0.0-beta.16
84
+
85
+ ## 5.0.0-beta.20
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies [18c1970]
90
+ - @ai-sdk/google@4.0.0-beta.15
91
+
92
+ ## 5.0.0-beta.19
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies [3887c70]
97
+ - @ai-sdk/provider-utils@5.0.0-beta.6
98
+ - @ai-sdk/anthropic@4.0.0-beta.10
99
+ - @ai-sdk/provider@4.0.0-beta.4
100
+ - @ai-sdk/google@4.0.0-beta.14
101
+
102
+ ## 5.0.0-beta.18
103
+
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies [776b617]
107
+ - @ai-sdk/provider-utils@5.0.0-beta.5
108
+ - @ai-sdk/provider@4.0.0-beta.3
109
+ - @ai-sdk/anthropic@4.0.0-beta.9
110
+ - @ai-sdk/google@4.0.0-beta.13
111
+
112
+ ## 5.0.0-beta.17
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [61753c3]
117
+ - @ai-sdk/provider-utils@5.0.0-beta.4
118
+ - @ai-sdk/anthropic@4.0.0-beta.8
119
+ - @ai-sdk/google@4.0.0-beta.12
120
+
121
+ ## 5.0.0-beta.16
122
+
123
+ ### Patch Changes
124
+
125
+ - ebb02ea: feat(google-vertex): add the anthropic tool search tools
126
+
127
+ ## 5.0.0-beta.15
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [f7d4f01]
132
+ - @ai-sdk/provider-utils@5.0.0-beta.3
133
+ - @ai-sdk/provider@4.0.0-beta.2
134
+ - @ai-sdk/google@4.0.0-beta.11
135
+ - @ai-sdk/anthropic@4.0.0-beta.7
136
+
137
+ ## 5.0.0-beta.14
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [21d1ee3]
142
+ - @ai-sdk/anthropic@4.0.0-beta.6
143
+
144
+ ## 5.0.0-beta.13
145
+
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [5c2a5a2]
149
+ - @ai-sdk/provider@4.0.0-beta.1
150
+ - @ai-sdk/anthropic@4.0.0-beta.5
151
+ - @ai-sdk/google@4.0.0-beta.10
152
+ - @ai-sdk/provider-utils@5.0.0-beta.2
153
+
154
+ ## 5.0.0-beta.12
155
+
156
+ ### Patch Changes
157
+
158
+ - f05a40d: fix(vertex): throw warning when strict: true for vertexAnthropic
159
+ - Updated dependencies [f05a40d]
160
+ - @ai-sdk/anthropic@4.0.0-beta.4
161
+
162
+ ## 5.0.0-beta.11
163
+
164
+ ### Patch Changes
165
+
166
+ - e59176c: chore(google): update v3 specs to v4
167
+ - Updated dependencies [e59176c]
168
+ - @ai-sdk/google@4.0.0-beta.9
169
+
170
+ ## 5.0.0-beta.10
171
+
172
+ ### Patch Changes
173
+
174
+ - e748b35: chore: update v3 specs to v4
175
+ - Updated dependencies [e748b35]
176
+ - @ai-sdk/anthropic@4.0.0-beta.3
177
+
178
+ ## 5.0.0-beta.9
179
+
180
+ ### Patch Changes
181
+
182
+ - Updated dependencies [4dac142]
183
+ - @ai-sdk/google@4.0.0-beta.8
184
+
185
+ ## 5.0.0-beta.8
186
+
187
+ ### Patch Changes
188
+
189
+ - 82288b0: feat(provider/google): add `gemini-embedding-2-preview` and fix multimodal embedding support with `embedMany`
190
+ - Updated dependencies [82288b0]
191
+ - @ai-sdk/google@4.0.0-beta.7
192
+
193
+ ## 5.0.0-beta.7
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies [add4326]
198
+ - @ai-sdk/google@4.0.0-beta.6
199
+
200
+ ## 5.0.0-beta.6
201
+
202
+ ### Patch Changes
203
+
204
+ - Updated dependencies [ab43029]
205
+ - @ai-sdk/google@4.0.0-beta.5
206
+
207
+ ## 5.0.0-beta.5
208
+
209
+ ### Patch Changes
210
+
211
+ - Updated dependencies [2edd14e]
212
+ - @ai-sdk/google@4.0.0-beta.4
213
+
214
+ ## 5.0.0-beta.4
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [1fe058b]
219
+ - @ai-sdk/anthropic@4.0.0-beta.2
220
+
3
221
  ## 5.0.0-beta.3
4
222
 
5
223
  ### Patch Changes
@@ -681,13 +899,13 @@
681
899
  Before
682
900
 
683
901
  ```ts
684
- model.textEmbeddingModel('my-model-id');
902
+ model.textEmbeddingModel("my-model-id");
685
903
  ```
686
904
 
687
905
  After
688
906
 
689
907
  ```ts
690
- model.embeddingModel('my-model-id');
908
+ model.embeddingModel("my-model-id");
691
909
  ```
692
910
 
693
911
  - 32a6c13: Add Google Maps grounding tool support for location-aware Gemini responses
@@ -1171,13 +1389,13 @@
1171
1389
  Before
1172
1390
 
1173
1391
  ```ts
1174
- model.textEmbeddingModel('my-model-id');
1392
+ model.textEmbeddingModel("my-model-id");
1175
1393
  ```
1176
1394
 
1177
1395
  After
1178
1396
 
1179
1397
  ```ts
1180
- model.embeddingModel('my-model-id');
1398
+ model.embeddingModel("my-model-id");
1181
1399
  ```
1182
1400
 
1183
1401
  - Updated dependencies [8d9e8ad]
@@ -2132,7 +2350,7 @@
2132
2350
 
2133
2351
  ```js
2134
2352
  await generateImage({
2135
- model: luma.image('photon-flash-1', {
2353
+ model: luma.image("photon-flash-1", {
2136
2354
  maxImagesPerCall: 5,
2137
2355
  pollIntervalMillis: 500,
2138
2356
  }),
@@ -2145,7 +2363,7 @@
2145
2363
 
2146
2364
  ```js
2147
2365
  await generateImage({
2148
- model: luma.image('photon-flash-1'),
2366
+ model: luma.image("photon-flash-1"),
2149
2367
  prompt,
2150
2368
  n: 10,
2151
2369
  maxImagesPerCall: 5,
@@ -2535,7 +2753,7 @@
2535
2753
 
2536
2754
  ```js
2537
2755
  await generateImage({
2538
- model: luma.image('photon-flash-1', {
2756
+ model: luma.image("photon-flash-1", {
2539
2757
  maxImagesPerCall: 5,
2540
2758
  pollIntervalMillis: 500,
2541
2759
  }),
@@ -2548,7 +2766,7 @@
2548
2766
 
2549
2767
  ```js
2550
2768
  await generateImage({
2551
- model: luma.image('photon-flash-1'),
2769
+ model: luma.image("photon-flash-1"),
2552
2770
  prompt,
2553
2771
  n: 10,
2554
2772
  maxImagesPerCall: 5,
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  The **[Google Vertex provider](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex)** for the [AI SDK](https://ai-sdk.dev/docs) contains language model support for the [Google Vertex AI](https://cloud.google.com/vertex-ai) APIs.
4
4
 
5
- This library includes a Google Vertex Anthropic provider. This provider closely follows the core Google Vertex library's usage patterns. See more in the [Google Vertex Anthropic Provider](#google-vertex-anthropic-provider) section below.
5
+ This library includes a Google Vertex Anthropic provider and a Google Vertex MaaS provider. These providers closely follow the core Google Vertex library's usage patterns. See more in the [Google Vertex Anthropic Provider](#google-vertex-anthropic-provider) and [Google Vertex MaaS Provider](#google-vertex-maas-provider) sections below.
6
+
7
+ > **Deploying to Vercel?** With Vercel's AI Gateway you can access Google Vertex AI (and hundreds of models from other providers) — no additional packages, API keys, or extra cost. [Get started with AI Gateway](https://vercel.com/ai-gateway).
6
8
 
7
9
  ## Setup
8
10
 
@@ -224,6 +226,68 @@ const { text } = await generateText({
224
226
  });
225
227
  ```
226
228
 
229
+ ## Google Vertex MaaS Provider
230
+
231
+ The Google Vertex MaaS (Model as a Service) provider offers access to partner and open models hosted on Vertex AI through an OpenAI-compatible Chat Completions API. It is available for both Node.js and Edge runtimes.
232
+
233
+ ### Node.js Runtime
234
+
235
+ ```ts
236
+ import { vertexMaas } from '@ai-sdk/google-vertex/maas';
237
+ import { generateText } from 'ai';
238
+
239
+ const { text } = await generateText({
240
+ model: vertexMaas('deepseek-ai/deepseek-v3.2-maas'),
241
+ prompt: 'Write a vegetarian lasagna recipe.',
242
+ });
243
+ ```
244
+
245
+ ### Edge Runtime
246
+
247
+ ```ts
248
+ import { vertexMaas } from '@ai-sdk/google-vertex/maas/edge';
249
+ import { generateText } from 'ai';
250
+
251
+ const { text } = await generateText({
252
+ model: vertexMaas('deepseek-ai/deepseek-v3.2-maas'),
253
+ prompt: 'Write a vegetarian lasagna recipe.',
254
+ });
255
+ ```
256
+
257
+ ### Google Vertex MaaS Provider Custom Configuration
258
+
259
+ ```ts
260
+ import { createVertexMaas } from '@ai-sdk/google-vertex/maas';
261
+ import { generateText } from 'ai';
262
+
263
+ const customProvider = createVertexMaas({
264
+ project: 'your-project-id',
265
+ location: 'us-east5',
266
+ });
267
+
268
+ const { text } = await generateText({
269
+ model: customProvider('deepseek-ai/deepseek-v3.2-maas'),
270
+ prompt: 'Write a vegetarian lasagna recipe.',
271
+ });
272
+ ```
273
+
274
+ And for the Edge runtime:
275
+
276
+ ```ts
277
+ import { createVertexMaas } from '@ai-sdk/google-vertex/maas/edge';
278
+ import { generateText } from 'ai';
279
+
280
+ const customProvider = createVertexMaas({
281
+ project: 'your-project-id',
282
+ location: 'us-east5',
283
+ });
284
+
285
+ const { text } = await generateText({
286
+ model: customProvider('deepseek-ai/deepseek-v3.2-maas'),
287
+ prompt: 'Write a vegetarian lasagna recipe.',
288
+ });
289
+ ```
290
+
227
291
  ## Documentation
228
292
 
229
293
  Please check out the **[Google Vertex provider](https://ai-sdk.dev/providers/ai-sdk-providers/google-vertex)** for more information.
@@ -1,6 +1,6 @@
1
1
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
2
2
  import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
3
- import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
3
+ import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
4
4
 
5
5
  interface GoogleCredentials {
6
6
  /**
@@ -36,7 +36,7 @@ declare const vertexAnthropicTools: {
36
36
  bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
37
37
  command: string;
38
38
  restart?: boolean;
39
- }, {}>;
39
+ }, {}, {}>;
40
40
  /**
41
41
  * The bash tool enables Claude to execute shell commands in a persistent bash session,
42
42
  * allowing system operations, script execution, and command-line automation.
@@ -46,7 +46,7 @@ declare const vertexAnthropicTools: {
46
46
  bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
47
47
  command: string;
48
48
  restart?: boolean;
49
- }, {}>;
49
+ }, {}, {}>;
50
50
  /**
51
51
  * Claude can use an Anthropic-defined text editor tool to view and modify text files,
52
52
  * helping you debug, fix, and improve your code or other text documents.
@@ -62,7 +62,7 @@ declare const vertexAnthropicTools: {
62
62
  insert_text?: string;
63
63
  old_str?: string;
64
64
  view_range?: number[];
65
- }, {}>;
65
+ }, {}, {}>;
66
66
  /**
67
67
  * Claude can use an Anthropic-defined text editor tool to view and modify text files,
68
68
  * helping you debug, fix, and improve your code or other text documents.
@@ -78,7 +78,7 @@ declare const vertexAnthropicTools: {
78
78
  insert_text?: string;
79
79
  old_str?: string;
80
80
  view_range?: number[];
81
- }, {}>;
81
+ }, {}, {}>;
82
82
  /**
83
83
  * Claude can use an Anthropic-defined text editor tool to view and modify text files.
84
84
  * Note: This version does not support the "undo_edit" command.
@@ -93,7 +93,7 @@ declare const vertexAnthropicTools: {
93
93
  insert_text?: string;
94
94
  old_str?: string;
95
95
  view_range?: number[];
96
- }, {}>;
96
+ }, {}, {}>;
97
97
  /**
98
98
  * Claude can use an Anthropic-defined text editor tool to view and modify text files.
99
99
  * Note: This version does not support the "undo_edit" command and adds optional max_characters parameter.
@@ -110,7 +110,7 @@ declare const vertexAnthropicTools: {
110
110
  view_range?: number[];
111
111
  }, {
112
112
  maxCharacters?: number;
113
- }>>[0]) => _ai_sdk_provider_utils.Tool<{
113
+ }, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
114
114
  command: "view" | "create" | "str_replace" | "insert";
115
115
  path: string;
116
116
  file_text?: string;
@@ -119,7 +119,7 @@ declare const vertexAnthropicTools: {
119
119
  insert_text?: string;
120
120
  old_str?: string;
121
121
  view_range?: number[];
122
- }, unknown>;
122
+ }, unknown, {}>;
123
123
  /**
124
124
  * Claude can interact with computer environments through the computer use tool, which
125
125
  * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
@@ -134,7 +134,7 @@ declare const vertexAnthropicTools: {
134
134
  displayWidthPx: number;
135
135
  displayHeightPx: number;
136
136
  displayNumber?: number;
137
- }>;
137
+ }, {}>;
138
138
  /**
139
139
  * Creates a web search tool that gives Claude direct access to real-time web content.
140
140
  */
@@ -157,7 +157,7 @@ declare const vertexAnthropicTools: {
157
157
  country?: string;
158
158
  timezone?: string;
159
159
  };
160
- }>>[0]) => _ai_sdk_provider_utils.Tool<{
160
+ }, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
161
161
  query: string;
162
162
  }, {
163
163
  type: "web_search_result";
@@ -165,23 +165,68 @@ declare const vertexAnthropicTools: {
165
165
  title: string | null;
166
166
  pageAge: string | null;
167
167
  encryptedContent: string;
168
- }[]>;
168
+ }[], {}>;
169
+ /**
170
+ * Creates a tool search tool that uses regex patterns to find tools.
171
+ *
172
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
173
+ * by dynamically discovering and loading them on-demand.
174
+ *
175
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
176
+ * to mark them for deferred loading.
177
+ */
178
+ toolSearchRegex_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
179
+ pattern: string;
180
+ limit?: number;
181
+ }, {
182
+ type: "tool_reference";
183
+ toolName: string;
184
+ }[], {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
185
+ pattern: string;
186
+ limit?: number;
187
+ }, {
188
+ type: "tool_reference";
189
+ toolName: string;
190
+ }[], {}>;
191
+ /**
192
+ * Creates a tool search tool that uses BM25 (natural language) to find tools.
193
+ *
194
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
195
+ * by dynamically discovering and loading them on-demand.
196
+ *
197
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
198
+ * to mark them for deferred loading.
199
+ */
200
+ toolSearchBm25_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
201
+ query: string;
202
+ limit?: number;
203
+ }, {
204
+ type: "tool_reference";
205
+ toolName: string;
206
+ }[], {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
207
+ query: string;
208
+ limit?: number;
209
+ }, {
210
+ type: "tool_reference";
211
+ toolName: string;
212
+ }[], {}>;
169
213
  };
170
- interface GoogleVertexAnthropicProvider extends ProviderV3 {
214
+ interface GoogleVertexAnthropicProvider extends ProviderV4 {
171
215
  /**
172
216
  * Creates a model for text generation.
173
217
  */
174
- (modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV3;
218
+ (modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV4;
175
219
  /**
176
220
  * Creates a model for text generation.
177
221
  */
178
- languageModel(modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV3;
222
+ languageModel(modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV4;
179
223
  /**
180
224
  * Anthropic tools supported by Google Vertex.
181
225
  * Note: Only a subset of Anthropic tools are available on Vertex.
182
226
  * Supported tools: bash_20241022, bash_20250124, textEditor_20241022,
183
227
  * textEditor_20250124, textEditor_20250429, textEditor_20250728,
184
- * computer_20241022, webSearch_20250305
228
+ * computer_20241022, webSearch_20250305, toolSearchRegex_20251119,
229
+ * toolSearchBm25_20251119
185
230
  */
186
231
  tools: typeof vertexAnthropicTools;
187
232
  /**
@@ -1,6 +1,6 @@
1
1
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
2
2
  import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
3
- import { ProviderV3, LanguageModelV3 } from '@ai-sdk/provider';
3
+ import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
4
4
 
5
5
  interface GoogleCredentials {
6
6
  /**
@@ -36,7 +36,7 @@ declare const vertexAnthropicTools: {
36
36
  bash_20241022: _ai_sdk_provider_utils.ProviderToolFactory<{
37
37
  command: string;
38
38
  restart?: boolean;
39
- }, {}>;
39
+ }, {}, {}>;
40
40
  /**
41
41
  * The bash tool enables Claude to execute shell commands in a persistent bash session,
42
42
  * allowing system operations, script execution, and command-line automation.
@@ -46,7 +46,7 @@ declare const vertexAnthropicTools: {
46
46
  bash_20250124: _ai_sdk_provider_utils.ProviderToolFactory<{
47
47
  command: string;
48
48
  restart?: boolean;
49
- }, {}>;
49
+ }, {}, {}>;
50
50
  /**
51
51
  * Claude can use an Anthropic-defined text editor tool to view and modify text files,
52
52
  * helping you debug, fix, and improve your code or other text documents.
@@ -62,7 +62,7 @@ declare const vertexAnthropicTools: {
62
62
  insert_text?: string;
63
63
  old_str?: string;
64
64
  view_range?: number[];
65
- }, {}>;
65
+ }, {}, {}>;
66
66
  /**
67
67
  * Claude can use an Anthropic-defined text editor tool to view and modify text files,
68
68
  * helping you debug, fix, and improve your code or other text documents.
@@ -78,7 +78,7 @@ declare const vertexAnthropicTools: {
78
78
  insert_text?: string;
79
79
  old_str?: string;
80
80
  view_range?: number[];
81
- }, {}>;
81
+ }, {}, {}>;
82
82
  /**
83
83
  * Claude can use an Anthropic-defined text editor tool to view and modify text files.
84
84
  * Note: This version does not support the "undo_edit" command.
@@ -93,7 +93,7 @@ declare const vertexAnthropicTools: {
93
93
  insert_text?: string;
94
94
  old_str?: string;
95
95
  view_range?: number[];
96
- }, {}>;
96
+ }, {}, {}>;
97
97
  /**
98
98
  * Claude can use an Anthropic-defined text editor tool to view and modify text files.
99
99
  * Note: This version does not support the "undo_edit" command and adds optional max_characters parameter.
@@ -110,7 +110,7 @@ declare const vertexAnthropicTools: {
110
110
  view_range?: number[];
111
111
  }, {
112
112
  maxCharacters?: number;
113
- }>>[0]) => _ai_sdk_provider_utils.Tool<{
113
+ }, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
114
114
  command: "view" | "create" | "str_replace" | "insert";
115
115
  path: string;
116
116
  file_text?: string;
@@ -119,7 +119,7 @@ declare const vertexAnthropicTools: {
119
119
  insert_text?: string;
120
120
  old_str?: string;
121
121
  view_range?: number[];
122
- }, unknown>;
122
+ }, unknown, {}>;
123
123
  /**
124
124
  * Claude can interact with computer environments through the computer use tool, which
125
125
  * provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
@@ -134,7 +134,7 @@ declare const vertexAnthropicTools: {
134
134
  displayWidthPx: number;
135
135
  displayHeightPx: number;
136
136
  displayNumber?: number;
137
- }>;
137
+ }, {}>;
138
138
  /**
139
139
  * Creates a web search tool that gives Claude direct access to real-time web content.
140
140
  */
@@ -157,7 +157,7 @@ declare const vertexAnthropicTools: {
157
157
  country?: string;
158
158
  timezone?: string;
159
159
  };
160
- }>>[0]) => _ai_sdk_provider_utils.Tool<{
160
+ }, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
161
161
  query: string;
162
162
  }, {
163
163
  type: "web_search_result";
@@ -165,23 +165,68 @@ declare const vertexAnthropicTools: {
165
165
  title: string | null;
166
166
  pageAge: string | null;
167
167
  encryptedContent: string;
168
- }[]>;
168
+ }[], {}>;
169
+ /**
170
+ * Creates a tool search tool that uses regex patterns to find tools.
171
+ *
172
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
173
+ * by dynamically discovering and loading them on-demand.
174
+ *
175
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
176
+ * to mark them for deferred loading.
177
+ */
178
+ toolSearchRegex_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
179
+ pattern: string;
180
+ limit?: number;
181
+ }, {
182
+ type: "tool_reference";
183
+ toolName: string;
184
+ }[], {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
185
+ pattern: string;
186
+ limit?: number;
187
+ }, {
188
+ type: "tool_reference";
189
+ toolName: string;
190
+ }[], {}>;
191
+ /**
192
+ * Creates a tool search tool that uses BM25 (natural language) to find tools.
193
+ *
194
+ * The tool search tool enables Claude to work with hundreds or thousands of tools
195
+ * by dynamically discovering and loading them on-demand.
196
+ *
197
+ * Use `providerOptions: { anthropic: { deferLoading: true } }` on other tools
198
+ * to mark them for deferred loading.
199
+ */
200
+ toolSearchBm25_20251119: (args?: Parameters<_ai_sdk_provider_utils.ProviderToolFactoryWithOutputSchema<{
201
+ query: string;
202
+ limit?: number;
203
+ }, {
204
+ type: "tool_reference";
205
+ toolName: string;
206
+ }[], {}, {}>>[0]) => _ai_sdk_provider_utils.Tool<{
207
+ query: string;
208
+ limit?: number;
209
+ }, {
210
+ type: "tool_reference";
211
+ toolName: string;
212
+ }[], {}>;
169
213
  };
170
- interface GoogleVertexAnthropicProvider extends ProviderV3 {
214
+ interface GoogleVertexAnthropicProvider extends ProviderV4 {
171
215
  /**
172
216
  * Creates a model for text generation.
173
217
  */
174
- (modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV3;
218
+ (modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV4;
175
219
  /**
176
220
  * Creates a model for text generation.
177
221
  */
178
- languageModel(modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV3;
222
+ languageModel(modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV4;
179
223
  /**
180
224
  * Anthropic tools supported by Google Vertex.
181
225
  * Note: Only a subset of Anthropic tools are available on Vertex.
182
226
  * Supported tools: bash_20241022, bash_20250124, textEditor_20241022,
183
227
  * textEditor_20250124, textEditor_20250429, textEditor_20250728,
184
- * computer_20241022, webSearch_20250305
228
+ * computer_20241022, webSearch_20250305, toolSearchRegex_20251119,
229
+ * toolSearchBm25_20251119
185
230
  */
186
231
  tools: typeof vertexAnthropicTools;
187
232
  /**