@ai-sdk/amazon-bedrock 4.0.61 → 4.0.62

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,12 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.62
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b094c07]
8
+ - @ai-sdk/anthropic@3.0.46
9
+
3
10
  ## 4.0.61
4
11
 
5
12
  ### Patch Changes
@@ -35,7 +35,7 @@ var import_provider_utils = require("@ai-sdk/provider-utils");
35
35
  var import_aws4fetch = require("aws4fetch");
36
36
 
37
37
  // src/version.ts
38
- var VERSION = true ? "4.0.61" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.62" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "4.0.61" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.62" : "0.0.0-test";
28
28
 
29
29
  // src/bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
package/dist/index.js CHANGED
@@ -1932,7 +1932,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1932
1932
  var import_aws4fetch = require("aws4fetch");
1933
1933
 
1934
1934
  // src/version.ts
1935
- var VERSION = true ? "4.0.61" : "0.0.0-test";
1935
+ var VERSION = true ? "4.0.62" : "0.0.0-test";
1936
1936
 
1937
1937
  // src/bedrock-sigv4-fetch.ts
1938
1938
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
package/dist/index.mjs CHANGED
@@ -1949,7 +1949,7 @@ import {
1949
1949
  import { AwsV4Signer } from "aws4fetch";
1950
1950
 
1951
1951
  // src/version.ts
1952
- var VERSION = true ? "4.0.61" : "0.0.0-test";
1952
+ var VERSION = true ? "4.0.62" : "0.0.0-test";
1953
1953
 
1954
1954
  // src/bedrock-sigv4-fetch.ts
1955
1955
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
@@ -304,15 +304,17 @@ Amazon Bedrock supports citations for document-based inputs across compatible mo
304
304
 
305
305
  ```ts
306
306
  import { bedrock } from '@ai-sdk/amazon-bedrock';
307
- import { generateObject } from 'ai';
307
+ import { generateText, Output } from 'ai';
308
308
  import { z } from 'zod';
309
309
  import fs from 'fs';
310
310
 
311
- const result = await generateObject({
311
+ const result = await generateText({
312
312
  model: bedrock('apac.anthropic.claude-sonnet-4-20250514-v1:0'),
313
- schema: z.object({
314
- summary: z.string().describe('Summary of the PDF document'),
315
- keyPoints: z.array(z.string()).describe('Key points from the PDF'),
313
+ output: Output.object({
314
+ schema: z.object({
315
+ summary: z.string().describe('Summary of the PDF document'),
316
+ keyPoints: z.array(z.string()).describe('Key points from the PDF'),
317
+ }),
316
318
  }),
317
319
  messages: [
318
320
  {
@@ -337,7 +339,7 @@ const result = await generateObject({
337
339
  ],
338
340
  });
339
341
 
340
- console.log('Response:', result.object);
342
+ console.log('Response:', result.output);
341
343
  ```
342
344
 
343
345
  ### Cache Points
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "4.0.61",
3
+ "version": "4.0.62",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "@smithy/eventstream-codec": "^4.0.1",
39
39
  "@smithy/util-utf8": "^4.0.0",
40
40
  "aws4fetch": "^1.0.20",
41
- "@ai-sdk/anthropic": "3.0.45",
41
+ "@ai-sdk/anthropic": "3.0.46",
42
42
  "@ai-sdk/provider": "3.0.8",
43
43
  "@ai-sdk/provider-utils": "4.0.15"
44
44
  },