@ai-sdk/google-vertex 5.0.0-beta.3 → 5.0.0-beta.31
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 +237 -8
- package/README.md +65 -1
- package/dist/anthropic/edge/index.d.mts +60 -15
- package/dist/anthropic/edge/index.d.ts +60 -15
- package/dist/anthropic/edge/index.js +29 -7
- package/dist/anthropic/edge/index.js.map +1 -1
- package/dist/anthropic/edge/index.mjs +26 -4
- package/dist/anthropic/edge/index.mjs.map +1 -1
- package/dist/anthropic/index.d.mts +60 -15
- package/dist/anthropic/index.d.ts +60 -15
- package/dist/anthropic/index.js +28 -6
- package/dist/anthropic/index.js.map +1 -1
- package/dist/anthropic/index.mjs +25 -3
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/edge/index.d.mts +19 -19
- package/dist/edge/index.d.ts +19 -19
- package/dist/edge/index.js +8 -8
- package/dist/edge/index.js.map +1 -1
- package/dist/edge/index.mjs +5 -5
- package/dist/edge/index.mjs.map +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.d.ts +19 -19
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/maas/edge/index.d.mts +76 -0
- package/dist/maas/edge/index.d.ts +76 -0
- package/dist/maas/edge/index.js +215 -0
- package/dist/maas/edge/index.js.map +1 -0
- package/dist/maas/edge/index.mjs +196 -0
- package/dist/maas/edge/index.mjs.map +1 -0
- package/dist/maas/index.d.mts +60 -0
- package/dist/maas/index.d.ts +60 -0
- package/dist/maas/index.js +125 -0
- package/dist/maas/index.js.map +1 -0
- package/dist/maas/index.mjs +101 -0
- package/dist/maas/index.mjs.map +1 -0
- package/docs/16-google-vertex.mdx +164 -6
- package/maas/edge.d.ts +1 -0
- package/maas/index.d.ts +1 -0
- package/package.json +19 -8
- package/src/anthropic/edge/google-vertex-anthropic-provider-edge.ts +1 -2
- package/src/anthropic/google-vertex-anthropic-provider-node.ts +1 -2
- package/src/anthropic/google-vertex-anthropic-provider.ts +32 -7
- package/src/edge/google-vertex-provider-edge.ts +1 -2
- package/src/google-vertex-embedding-model.ts +5 -5
- package/src/google-vertex-embedding-options.ts +2 -0
- package/src/google-vertex-image-model.ts +17 -17
- package/src/google-vertex-provider-node.ts +1 -2
- package/src/google-vertex-provider.ts +12 -12
- package/src/google-vertex-video-model.ts +7 -7
- package/src/maas/edge/google-vertex-maas-provider-edge.ts +65 -0
- package/src/maas/edge/index.ts +9 -0
- package/src/maas/google-vertex-maas-options.ts +15 -0
- package/src/maas/google-vertex-maas-provider-node.ts +64 -0
- package/src/maas/google-vertex-maas-provider.ts +111 -0
- package/src/maas/index.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,234 @@
|
|
|
1
1
|
# @ai-sdk/google-vertex
|
|
2
2
|
|
|
3
|
+
## 5.0.0-beta.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c29a26f]
|
|
8
|
+
- @ai-sdk/openai-compatible@3.0.0-beta.14
|
|
9
|
+
- @ai-sdk/provider-utils@5.0.0-beta.10
|
|
10
|
+
- @ai-sdk/anthropic@4.0.0-beta.17
|
|
11
|
+
- @ai-sdk/provider@4.0.0-beta.6
|
|
12
|
+
- @ai-sdk/google@4.0.0-beta.23
|
|
13
|
+
|
|
14
|
+
## 5.0.0-beta.30
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 38fc777: Add AI Gateway hint to provider READMEs
|
|
19
|
+
- Updated dependencies [38fc777]
|
|
20
|
+
- @ai-sdk/anthropic@4.0.0-beta.16
|
|
21
|
+
- @ai-sdk/google@4.0.0-beta.22
|
|
22
|
+
- @ai-sdk/openai-compatible@3.0.0-beta.13
|
|
23
|
+
|
|
24
|
+
## 5.0.0-beta.29
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [f57c702]
|
|
29
|
+
- @ai-sdk/anthropic@4.0.0-beta.15
|
|
30
|
+
|
|
31
|
+
## 5.0.0-beta.28
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [2e17091]
|
|
36
|
+
- @ai-sdk/provider-utils@5.0.0-beta.9
|
|
37
|
+
- @ai-sdk/anthropic@4.0.0-beta.14
|
|
38
|
+
- @ai-sdk/google@4.0.0-beta.21
|
|
39
|
+
- @ai-sdk/openai-compatible@3.0.0-beta.12
|
|
40
|
+
|
|
41
|
+
## 5.0.0-beta.27
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [986c6fd]
|
|
46
|
+
- Updated dependencies [493295c]
|
|
47
|
+
- @ai-sdk/provider-utils@5.0.0-beta.8
|
|
48
|
+
- @ai-sdk/anthropic@4.0.0-beta.13
|
|
49
|
+
- @ai-sdk/google@4.0.0-beta.20
|
|
50
|
+
- @ai-sdk/openai-compatible@3.0.0-beta.11
|
|
51
|
+
|
|
52
|
+
## 5.0.0-beta.26
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [01fa606]
|
|
57
|
+
- @ai-sdk/google@4.0.0-beta.19
|
|
58
|
+
|
|
59
|
+
## 5.0.0-beta.25
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- a34b997: feat (provider/google-vertex): add support for maas models
|
|
64
|
+
|
|
65
|
+
## 5.0.0-beta.24
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [9715ec7]
|
|
70
|
+
- @ai-sdk/google@4.0.0-beta.18
|
|
71
|
+
|
|
72
|
+
## 5.0.0-beta.23
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [1f509d4]
|
|
77
|
+
- @ai-sdk/provider-utils@5.0.0-beta.7
|
|
78
|
+
- @ai-sdk/provider@4.0.0-beta.5
|
|
79
|
+
- @ai-sdk/anthropic@4.0.0-beta.12
|
|
80
|
+
- @ai-sdk/google@4.0.0-beta.17
|
|
81
|
+
|
|
82
|
+
## 5.0.0-beta.22
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [0ee8aec]
|
|
87
|
+
- @ai-sdk/anthropic@4.0.0-beta.11
|
|
88
|
+
|
|
89
|
+
## 5.0.0-beta.21
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [6190649]
|
|
94
|
+
- @ai-sdk/google@4.0.0-beta.16
|
|
95
|
+
|
|
96
|
+
## 5.0.0-beta.20
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- Updated dependencies [18c1970]
|
|
101
|
+
- @ai-sdk/google@4.0.0-beta.15
|
|
102
|
+
|
|
103
|
+
## 5.0.0-beta.19
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- Updated dependencies [3887c70]
|
|
108
|
+
- @ai-sdk/provider-utils@5.0.0-beta.6
|
|
109
|
+
- @ai-sdk/anthropic@4.0.0-beta.10
|
|
110
|
+
- @ai-sdk/provider@4.0.0-beta.4
|
|
111
|
+
- @ai-sdk/google@4.0.0-beta.14
|
|
112
|
+
|
|
113
|
+
## 5.0.0-beta.18
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- Updated dependencies [776b617]
|
|
118
|
+
- @ai-sdk/provider-utils@5.0.0-beta.5
|
|
119
|
+
- @ai-sdk/provider@4.0.0-beta.3
|
|
120
|
+
- @ai-sdk/anthropic@4.0.0-beta.9
|
|
121
|
+
- @ai-sdk/google@4.0.0-beta.13
|
|
122
|
+
|
|
123
|
+
## 5.0.0-beta.17
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies [61753c3]
|
|
128
|
+
- @ai-sdk/provider-utils@5.0.0-beta.4
|
|
129
|
+
- @ai-sdk/anthropic@4.0.0-beta.8
|
|
130
|
+
- @ai-sdk/google@4.0.0-beta.12
|
|
131
|
+
|
|
132
|
+
## 5.0.0-beta.16
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- ebb02ea: feat(google-vertex): add the anthropic tool search tools
|
|
137
|
+
|
|
138
|
+
## 5.0.0-beta.15
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- Updated dependencies [f7d4f01]
|
|
143
|
+
- @ai-sdk/provider-utils@5.0.0-beta.3
|
|
144
|
+
- @ai-sdk/provider@4.0.0-beta.2
|
|
145
|
+
- @ai-sdk/google@4.0.0-beta.11
|
|
146
|
+
- @ai-sdk/anthropic@4.0.0-beta.7
|
|
147
|
+
|
|
148
|
+
## 5.0.0-beta.14
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- Updated dependencies [21d1ee3]
|
|
153
|
+
- @ai-sdk/anthropic@4.0.0-beta.6
|
|
154
|
+
|
|
155
|
+
## 5.0.0-beta.13
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [5c2a5a2]
|
|
160
|
+
- @ai-sdk/provider@4.0.0-beta.1
|
|
161
|
+
- @ai-sdk/anthropic@4.0.0-beta.5
|
|
162
|
+
- @ai-sdk/google@4.0.0-beta.10
|
|
163
|
+
- @ai-sdk/provider-utils@5.0.0-beta.2
|
|
164
|
+
|
|
165
|
+
## 5.0.0-beta.12
|
|
166
|
+
|
|
167
|
+
### Patch Changes
|
|
168
|
+
|
|
169
|
+
- f05a40d: fix(vertex): throw warning when strict: true for vertexAnthropic
|
|
170
|
+
- Updated dependencies [f05a40d]
|
|
171
|
+
- @ai-sdk/anthropic@4.0.0-beta.4
|
|
172
|
+
|
|
173
|
+
## 5.0.0-beta.11
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- e59176c: chore(google): update v3 specs to v4
|
|
178
|
+
- Updated dependencies [e59176c]
|
|
179
|
+
- @ai-sdk/google@4.0.0-beta.9
|
|
180
|
+
|
|
181
|
+
## 5.0.0-beta.10
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- e748b35: chore: update v3 specs to v4
|
|
186
|
+
- Updated dependencies [e748b35]
|
|
187
|
+
- @ai-sdk/anthropic@4.0.0-beta.3
|
|
188
|
+
|
|
189
|
+
## 5.0.0-beta.9
|
|
190
|
+
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [4dac142]
|
|
194
|
+
- @ai-sdk/google@4.0.0-beta.8
|
|
195
|
+
|
|
196
|
+
## 5.0.0-beta.8
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- 82288b0: feat(provider/google): add `gemini-embedding-2-preview` and fix multimodal embedding support with `embedMany`
|
|
201
|
+
- Updated dependencies [82288b0]
|
|
202
|
+
- @ai-sdk/google@4.0.0-beta.7
|
|
203
|
+
|
|
204
|
+
## 5.0.0-beta.7
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated dependencies [add4326]
|
|
209
|
+
- @ai-sdk/google@4.0.0-beta.6
|
|
210
|
+
|
|
211
|
+
## 5.0.0-beta.6
|
|
212
|
+
|
|
213
|
+
### Patch Changes
|
|
214
|
+
|
|
215
|
+
- Updated dependencies [ab43029]
|
|
216
|
+
- @ai-sdk/google@4.0.0-beta.5
|
|
217
|
+
|
|
218
|
+
## 5.0.0-beta.5
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- Updated dependencies [2edd14e]
|
|
223
|
+
- @ai-sdk/google@4.0.0-beta.4
|
|
224
|
+
|
|
225
|
+
## 5.0.0-beta.4
|
|
226
|
+
|
|
227
|
+
### Patch Changes
|
|
228
|
+
|
|
229
|
+
- Updated dependencies [1fe058b]
|
|
230
|
+
- @ai-sdk/anthropic@4.0.0-beta.2
|
|
231
|
+
|
|
3
232
|
## 5.0.0-beta.3
|
|
4
233
|
|
|
5
234
|
### Patch Changes
|
|
@@ -681,13 +910,13 @@
|
|
|
681
910
|
Before
|
|
682
911
|
|
|
683
912
|
```ts
|
|
684
|
-
model.textEmbeddingModel(
|
|
913
|
+
model.textEmbeddingModel("my-model-id");
|
|
685
914
|
```
|
|
686
915
|
|
|
687
916
|
After
|
|
688
917
|
|
|
689
918
|
```ts
|
|
690
|
-
model.embeddingModel(
|
|
919
|
+
model.embeddingModel("my-model-id");
|
|
691
920
|
```
|
|
692
921
|
|
|
693
922
|
- 32a6c13: Add Google Maps grounding tool support for location-aware Gemini responses
|
|
@@ -1171,13 +1400,13 @@
|
|
|
1171
1400
|
Before
|
|
1172
1401
|
|
|
1173
1402
|
```ts
|
|
1174
|
-
model.textEmbeddingModel(
|
|
1403
|
+
model.textEmbeddingModel("my-model-id");
|
|
1175
1404
|
```
|
|
1176
1405
|
|
|
1177
1406
|
After
|
|
1178
1407
|
|
|
1179
1408
|
```ts
|
|
1180
|
-
model.embeddingModel(
|
|
1409
|
+
model.embeddingModel("my-model-id");
|
|
1181
1410
|
```
|
|
1182
1411
|
|
|
1183
1412
|
- Updated dependencies [8d9e8ad]
|
|
@@ -2132,7 +2361,7 @@
|
|
|
2132
2361
|
|
|
2133
2362
|
```js
|
|
2134
2363
|
await generateImage({
|
|
2135
|
-
model: luma.image(
|
|
2364
|
+
model: luma.image("photon-flash-1", {
|
|
2136
2365
|
maxImagesPerCall: 5,
|
|
2137
2366
|
pollIntervalMillis: 500,
|
|
2138
2367
|
}),
|
|
@@ -2145,7 +2374,7 @@
|
|
|
2145
2374
|
|
|
2146
2375
|
```js
|
|
2147
2376
|
await generateImage({
|
|
2148
|
-
model: luma.image(
|
|
2377
|
+
model: luma.image("photon-flash-1"),
|
|
2149
2378
|
prompt,
|
|
2150
2379
|
n: 10,
|
|
2151
2380
|
maxImagesPerCall: 5,
|
|
@@ -2535,7 +2764,7 @@
|
|
|
2535
2764
|
|
|
2536
2765
|
```js
|
|
2537
2766
|
await generateImage({
|
|
2538
|
-
model: luma.image(
|
|
2767
|
+
model: luma.image("photon-flash-1", {
|
|
2539
2768
|
maxImagesPerCall: 5,
|
|
2540
2769
|
pollIntervalMillis: 500,
|
|
2541
2770
|
}),
|
|
@@ -2548,7 +2777,7 @@
|
|
|
2548
2777
|
|
|
2549
2778
|
```js
|
|
2550
2779
|
await generateImage({
|
|
2551
|
-
model: luma.image(
|
|
2780
|
+
model: luma.image("photon-flash-1"),
|
|
2552
2781
|
prompt,
|
|
2553
2782
|
n: 10,
|
|
2554
2783
|
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
|
|
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 {
|
|
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
|
|
214
|
+
interface GoogleVertexAnthropicProvider extends ProviderV4 {
|
|
171
215
|
/**
|
|
172
216
|
* Creates a model for text generation.
|
|
173
217
|
*/
|
|
174
|
-
(modelId: GoogleVertexAnthropicMessagesModelId):
|
|
218
|
+
(modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV4;
|
|
175
219
|
/**
|
|
176
220
|
* Creates a model for text generation.
|
|
177
221
|
*/
|
|
178
|
-
languageModel(modelId: GoogleVertexAnthropicMessagesModelId):
|
|
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 {
|
|
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
|
|
214
|
+
interface GoogleVertexAnthropicProvider extends ProviderV4 {
|
|
171
215
|
/**
|
|
172
216
|
* Creates a model for text generation.
|
|
173
217
|
*/
|
|
174
|
-
(modelId: GoogleVertexAnthropicMessagesModelId):
|
|
218
|
+
(modelId: GoogleVertexAnthropicMessagesModelId): LanguageModelV4;
|
|
175
219
|
/**
|
|
176
220
|
* Creates a model for text generation.
|
|
177
221
|
*/
|
|
178
|
-
languageModel(modelId: GoogleVertexAnthropicMessagesModelId):
|
|
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
|
/**
|