@ai-sdk/google-vertex 5.0.95 → 5.0.97

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 CHANGED
@@ -1,5 +1,45 @@
1
1
  # @ai-sdk/google-vertex
2
2
 
3
+ ## 5.0.97
4
+
5
+ ### Patch Changes
6
+
7
+ - e361d39: feat(anthropic): add Claude Sonnet 5.5 support
8
+
9
+ - add the `claude-sonnet-5-5` model ID to `@ai-sdk/anthropic` and `@ai-sdk/google-vertex`, `anthropic.claude-sonnet-5-5` and `us.anthropic.claude-sonnet-5-5` to `@ai-sdk/amazon-bedrock`, and `anthropic/claude-sonnet-5.5` to `@ai-sdk/gateway`
10
+ - add the `between_tools` thinking type (`thinking: { type: 'between_tools' }`), the lowest thinking setting on `claude-sonnet-5-5`; `xhigh` and `max` effort are lowered to `high` with a warning because the API rejects them with `between_tools`
11
+ - `claude-sonnet-5-5` rejects disabled thinking: `thinking: { type: 'disabled' }` is replaced with `between_tools` thinking (with a warning), `reasoning: 'none'` maps to `between_tools` thinking, and budget-based thinking is converted to adaptive thinking
12
+ - `claude-sonnet-5-5` rejects forced tool use: `required` and named tool choices fall back to `auto`, and `structuredOutputMode: 'jsonTool'` falls back to native structured outputs, each with a warning
13
+
14
+ - Updated dependencies [e361d39]
15
+ - Updated dependencies [8373a22]
16
+ - Updated dependencies [d0290cf]
17
+ - @ai-sdk/anthropic@4.0.67
18
+ - @ai-sdk/google@4.0.84
19
+
20
+ ## 5.0.96
21
+
22
+ ### Patch Changes
23
+
24
+ - 525efc5: feat(provider): advertise image model file and mask input support
25
+
26
+ Use confirmed model IDs for capability declarations so unrecognized model names
27
+ remain unknown. Include Together AI FLUX.2 Pro and Flex single-image editing, and
28
+ allow asynchronous capability lookups and middleware overrides to resolve to
29
+ unknown.
30
+
31
+ Advertise QuiverAI Arrow 2 and Arrow 2 Telos file-input support, and mark Together
32
+ AI Gemini image inputs unsupported by the current single-image request mapping.
33
+
34
+ - Updated dependencies [e3605f6]
35
+ - Updated dependencies [32cf2f6]
36
+ - Updated dependencies [525efc5]
37
+ - @ai-sdk/provider-utils@5.0.50
38
+ - @ai-sdk/openai-compatible@3.0.58
39
+ - @ai-sdk/google@4.0.83
40
+ - @ai-sdk/provider@4.0.19
41
+ - @ai-sdk/anthropic@4.0.66
42
+
3
43
  ## 5.0.95
4
44
 
5
45
  ### Patch Changes
package/README.md CHANGED
@@ -71,7 +71,7 @@ import { vertexAnthropic } from '@ai-sdk/google-vertex/anthropic';
71
71
  import { generateText } from 'ai';
72
72
 
73
73
  const { text } = await generateText({
74
- model: vertexAnthropic('claude-sonnet-5'),
74
+ model: vertexAnthropic('claude-sonnet-5-5'),
75
75
  prompt: 'Write a vegetarian lasagna recipe.',
76
76
  });
77
77
  ```
@@ -83,7 +83,7 @@ import { vertexAnthropic } from '@ai-sdk/google-vertex/anthropic/edge';
83
83
  import { generateText } from 'ai';
84
84
 
85
85
  const { text } = await generateText({
86
- model: vertexAnthropic('claude-sonnet-5'),
86
+ model: vertexAnthropic('claude-sonnet-5-5'),
87
87
  prompt: 'Write a vegetarian lasagna recipe.',
88
88
  });
89
89
  ```
@@ -105,7 +105,7 @@ const errorMessage = fs.readFileSync('data/error-message.txt', 'utf8');
105
105
 
106
106
  async function main() {
107
107
  const result = await generateText({
108
- model: vertexAnthropic('claude-sonnet-5', {
108
+ model: vertexAnthropic('claude-sonnet-5-5', {
109
109
  cacheControl: true,
110
110
  }),
111
111
  messages: [
@@ -203,7 +203,7 @@ const customProvider = createVertexAnthropic({
203
203
  });
204
204
 
205
205
  const { text } = await generateText({
206
- model: customProvider('claude-sonnet-5'),
206
+ model: customProvider('claude-sonnet-5-5'),
207
207
  prompt: 'Write a vegetarian lasagna recipe.',
208
208
  });
209
209
  ```
@@ -220,7 +220,7 @@ const customProvider = createVertexAnthropic({
220
220
  });
221
221
 
222
222
  const { text } = await generateText({
223
- model: customProvider('claude-sonnet-5'),
223
+ model: customProvider('claude-sonnet-5-5'),
224
224
  prompt: 'Write a vegetarian lasagna recipe.',
225
225
  });
226
226
  ```
@@ -20,7 +20,7 @@ interface GoogleCredentials {
20
20
  privateKeyId?: string;
21
21
  }
22
22
 
23
- type GoogleVertexAnthropicModelId = 'claude-sonnet-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-opus-4-5@20251101' | 'claude-sonnet-4-5@20250929' | 'claude-opus-4-1@20250805' | 'claude-opus-4@20250514' | 'claude-sonnet-4@20250514' | 'claude-3-7-sonnet@20250219' | 'claude-3-5-sonnet-v2@20241022' | 'claude-3-5-haiku@20241022' | 'claude-3-5-sonnet@20240620' | 'claude-3-haiku@20240307' | 'claude-3-sonnet@20240229' | 'claude-3-opus@20240229' | (string & {});
23
+ type GoogleVertexAnthropicModelId = 'claude-sonnet-5' | 'claude-sonnet-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-opus-4-5@20251101' | 'claude-sonnet-4-5@20250929' | 'claude-opus-4-1@20250805' | 'claude-opus-4@20250514' | 'claude-sonnet-4@20250514' | 'claude-3-7-sonnet@20250219' | 'claude-3-5-sonnet-v2@20241022' | 'claude-3-5-haiku@20241022' | 'claude-3-5-sonnet@20240620' | 'claude-3-haiku@20240307' | 'claude-3-sonnet@20240229' | 'claude-3-opus@20240229' | (string & {});
24
24
 
25
25
  type GoogleVertexAnthropicTools = Pick<typeof anthropicTools, 'bash_20241022' | 'bash_20250124' | 'textEditor_20241022' | 'textEditor_20250124' | 'textEditor_20250429' | 'textEditor_20250728' | 'computer_20241022' | 'webSearch_20250305' | 'toolSearchRegex_20251119' | 'toolSearchBm25_20251119'>;
26
26
  /**
@@ -10,7 +10,7 @@ import {
10
10
  } from "@ai-sdk/provider-utils";
11
11
 
12
12
  // src/version.ts
13
- var VERSION = true ? "5.0.95" : "0.0.0-test";
13
+ var VERSION = true ? "5.0.97" : "0.0.0-test";
14
14
 
15
15
  // src/edge/google-vertex-auth-edge.ts
16
16
  var loadCredentials = async () => {
@@ -3,7 +3,7 @@ import { ProviderV4, LanguageModelV4 } from '@ai-sdk/provider';
3
3
  import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
4
4
  import { anthropicTools } from '@ai-sdk/anthropic/internal';
5
5
 
6
- type GoogleVertexAnthropicModelId = 'claude-sonnet-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-opus-4-5@20251101' | 'claude-sonnet-4-5@20250929' | 'claude-opus-4-1@20250805' | 'claude-opus-4@20250514' | 'claude-sonnet-4@20250514' | 'claude-3-7-sonnet@20250219' | 'claude-3-5-sonnet-v2@20241022' | 'claude-3-5-haiku@20241022' | 'claude-3-5-sonnet@20240620' | 'claude-3-haiku@20240307' | 'claude-3-sonnet@20240229' | 'claude-3-opus@20240229' | (string & {});
6
+ type GoogleVertexAnthropicModelId = 'claude-sonnet-5' | 'claude-sonnet-5-5' | 'claude-fable-5' | 'claude-fable-5-1' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-opus-4-5@20251101' | 'claude-sonnet-4-5@20250929' | 'claude-opus-4-1@20250805' | 'claude-opus-4@20250514' | 'claude-sonnet-4@20250514' | 'claude-3-7-sonnet@20250219' | 'claude-3-5-sonnet-v2@20241022' | 'claude-3-5-haiku@20241022' | 'claude-3-5-sonnet@20240620' | 'claude-3-haiku@20240307' | 'claude-3-sonnet@20240229' | 'claude-3-opus@20240229' | (string & {});
7
7
 
8
8
  type GoogleVertexAnthropicTools = Pick<typeof anthropicTools, 'bash_20241022' | 'bash_20250124' | 'textEditor_20241022' | 'textEditor_20250124' | 'textEditor_20250429' | 'textEditor_20250728' | 'computer_20241022' | 'webSearch_20250305' | 'toolSearchRegex_20251119' | 'toolSearchBm25_20251119'>;
9
9
  /**
@@ -18,7 +18,7 @@ import {
18
18
  } from "@ai-sdk/provider-utils";
19
19
 
20
20
  // src/version.ts
21
- var VERSION = true ? "5.0.95" : "0.0.0-test";
21
+ var VERSION = true ? "5.0.97" : "0.0.0-test";
22
22
 
23
23
  // src/google-vertex-embedding-model.ts
24
24
  import {
@@ -264,6 +264,11 @@ import {
264
264
  WORKFLOW_SERIALIZE as WORKFLOW_SERIALIZE2,
265
265
  WORKFLOW_DESERIALIZE as WORKFLOW_DESERIALIZE2
266
266
  } from "@ai-sdk/provider-utils";
267
+ var googleVertexImageModelsWithFileInputSupport = /* @__PURE__ */ new Set([
268
+ "gemini-2.5-flash-image",
269
+ "gemini-3-pro-image-preview",
270
+ "gemini-3.1-flash-image-preview"
271
+ ]);
267
272
  var GoogleVertexImageModel = class _GoogleVertexImageModel {
268
273
  constructor(modelId, config) {
269
274
  this.modelId = modelId;
@@ -280,6 +285,12 @@ var GoogleVertexImageModel = class _GoogleVertexImageModel {
280
285
  static [WORKFLOW_DESERIALIZE2](options) {
281
286
  return new _GoogleVertexImageModel(options.modelId, options.config);
282
287
  }
288
+ get supportsFileInputs() {
289
+ return googleVertexImageModelsWithFileInputSupport.has(this.modelId) ? true : void 0;
290
+ }
291
+ get supportsMaskInputs() {
292
+ return this.supportsFileInputs === true ? false : void 0;
293
+ }
283
294
  get provider() {
284
295
  return this.config.provider;
285
296
  }