Skip to content

Commit cbc3077

Browse files
Merge pull request #778 from anthropics/release-please--branches--main--changes--next
chore: release main
2 parents 0fafce3 + bc51a74 commit cbc3077

File tree

15 files changed

+235
-36
lines changed

15 files changed

+235
-36
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
".": "0.53.0",
2+
".": "0.54.0",
33
"packages/vertex-sdk": "0.11.4",
44
"packages/bedrock-sdk": "0.22.1"
55
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-a7b84017aa1126ad99443296dcd81ab2b53f1c346014b92096226cf993f30502.yml
33
openapi_spec_hash: 58d4e72c7906bd8a680ab17b99de6215
4-
config_hash: b08362db009c073fa7b1c154969cb200
4+
config_hash: 0d82158a1e3c18a76a63f7424d293ec6

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 0.54.0 (2025-06-11)
4+
5+
Full Changelog: [sdk-v0.53.0...sdk-v0.54.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.53.0...sdk-v0.54.0)
6+
7+
### Features
8+
9+
* **api:** api update ([e923aa1](https://github.com/anthropics/anthropic-sdk-typescript/commit/e923aa1b48b1739def4d5d97756678979b4c01a3))
10+
* **api:** api update ([4877181](https://github.com/anthropics/anthropic-sdk-typescript/commit/4877181c118ebcf1b5d98ca4bfd26acf5dbdedab))
11+
* **api:** manual updates ([99b0111](https://github.com/anthropics/anthropic-sdk-typescript/commit/99b0111ec289eb4454c1290f80600d653a5a9c30))
12+
* **client:** add support for fine-grained-tool-streaming-2025-05-14 ([6b35dd9](https://github.com/anthropics/anthropic-sdk-typescript/commit/6b35dd968b47e6ed486ed6d0a7b8d29cf1928aaf))
13+
14+
15+
### Bug Fixes
16+
17+
* **client:** deprecate BetaBase64PDFBlock in favor of BetaRequestDocumentBlock ([7fa10db](https://github.com/anthropics/anthropic-sdk-typescript/commit/7fa10db38d56f8839be3a3197b77a4c8f24fa42a))
18+
* **client:** improve error message in parsing JSON ([7c0cb84](https://github.com/anthropics/anthropic-sdk-typescript/commit/7c0cb8414473ffff3939f105d1bdb92b7d02ab5e))
19+
* **internal:** revert unintentional changes ([28dccec](https://github.com/anthropics/anthropic-sdk-typescript/commit/28dccec451d0426e7a0afe6de1122e5fddb057f5))
20+
21+
22+
### Chores
23+
24+
* avoid type error in certain environments ([48c1a41](https://github.com/anthropics/anthropic-sdk-typescript/commit/48c1a4143bf2a6cae73007532e8292922a0b4fb8))
25+
* **tests:** add testing for invalid json raising ([52260c1](https://github.com/anthropics/anthropic-sdk-typescript/commit/52260c196ab91be10354770362b0e2191607337b))
26+
327
## 0.53.0 (2025-06-04)
428

529
Full Changelog: [sdk-v0.52.0...sdk-v0.53.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.52.0...sdk-v0.53.0)

api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ Methods:
182182
Types:
183183

184184
- <code><a href="./src/resources/beta/messages/messages.ts">BetaBase64ImageSource</a></code>
185-
- <code><a href="./src/resources/beta/messages/messages.ts">BetaBase64PDFBlock</a></code>
186185
- <code><a href="./src/resources/beta/messages/messages.ts">BetaBase64PDFSource</a></code>
187186
- <code><a href="./src/resources/beta/messages/messages.ts">BetaCacheControlEphemeral</a></code>
188187
- <code><a href="./src/resources/beta/messages/messages.ts">BetaCacheCreation</a></code>
@@ -238,6 +237,7 @@ Types:
238237
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRawMessageStreamEvent</a></code>
239238
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRedactedThinkingBlock</a></code>
240239
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRedactedThinkingBlockParam</a></code>
240+
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRequestDocumentBlock</a></code>
241241
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRequestMCPServerToolConfiguration</a></code>
242242
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRequestMCPServerURLDefinition</a></code>
243243
- <code><a href="./src/resources/beta/messages/messages.ts">BetaRequestMCPToolResultBlockParam</a></code>
@@ -287,6 +287,7 @@ Types:
287287
- <code><a href="./src/resources/beta/messages/messages.ts">BetaWebSearchToolResultBlockParamContent</a></code>
288288
- <code><a href="./src/resources/beta/messages/messages.ts">BetaWebSearchToolResultError</a></code>
289289
- <code><a href="./src/resources/beta/messages/messages.ts">BetaWebSearchToolResultErrorCode</a></code>
290+
- <code><a href="./src/resources/beta/messages/messages.ts">BetaBase64PDFBlock</a></code>
290291

291292
Methods:
292293

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@anthropic-ai/sdk",
3-
"version": "0.53.0",
3+
"version": "0.54.0",
44
"description": "The official TypeScript library for the Anthropic API",
55
"author": "Anthropic <[email protected]>",
66
"types": "dist/index.d.ts",

packages/bedrock-sdk/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
"@anthropic-ai/sdk@file:../../dist":
1919
# x-release-please-start-version
20-
version "0.53.0"
20+
version "0.54.0"
2121
# x-release-please-end-version
2222

2323
"@aws-crypto/[email protected]":

packages/vertex-sdk/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
"@anthropic-ai/sdk@file:../../dist":
1919
# x-release-please-start-version
20-
version "0.53.0"
20+
version "0.54.0"
2121
# x-release-please-end-version
2222

2323
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5":

src/internal/uploads.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export const createForm = async <T = Record<string, unknown>>(
138138

139139
// We check for Blob not File because Bun.File doesn't inherit from File,
140140
// but they both inherit from Blob and have a `name` property at runtime.
141-
const isNamedBlob = (value: object): value is Blob => value instanceof Blob && 'name' in value;
141+
const isNamedBlob = (value: unknown): value is Blob => value instanceof Blob && 'name' in value;
142142

143143
const isUploadable = (value: unknown) =>
144144
typeof value === 'object' &&

src/lib/BetaMessageStream.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,14 @@ export class BetaMessageStream implements AsyncIterable<BetaMessageStreamEvent>
593593
});
594594

595595
if (jsonBuf) {
596-
snapshotContent.input = partialParse(jsonBuf);
596+
try {
597+
snapshotContent.input = partialParse(jsonBuf);
598+
} catch (err) {
599+
const error = new AnthropicError(
600+
`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${err}. JSON: ${jsonBuf}`,
601+
);
602+
this.#handleError(error);
603+
}
597604
}
598605
}
599606
break;

src/resources/beta/beta.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ import {
7474
BetaRawMessageStreamEvent,
7575
BetaRedactedThinkingBlock,
7676
BetaRedactedThinkingBlockParam,
77+
BetaRequestDocumentBlock,
7778
BetaRequestMCPServerToolConfiguration,
7879
BetaRequestMCPServerURLDefinition,
7980
BetaRequestMCPToolResultBlockParam,
@@ -255,7 +256,6 @@ export declare namespace Beta {
255256
export {
256257
Messages as Messages,
257258
type BetaBase64ImageSource as BetaBase64ImageSource,
258-
type BetaBase64PDFBlock as BetaBase64PDFBlock,
259259
type BetaBase64PDFSource as BetaBase64PDFSource,
260260
type BetaCacheControlEphemeral as BetaCacheControlEphemeral,
261261
type BetaCacheCreation as BetaCacheCreation,
@@ -311,6 +311,7 @@ export declare namespace Beta {
311311
type BetaRawMessageStreamEvent as BetaRawMessageStreamEvent,
312312
type BetaRedactedThinkingBlock as BetaRedactedThinkingBlock,
313313
type BetaRedactedThinkingBlockParam as BetaRedactedThinkingBlockParam,
314+
type BetaRequestDocumentBlock as BetaRequestDocumentBlock,
314315
type BetaRequestMCPServerToolConfiguration as BetaRequestMCPServerToolConfiguration,
315316
type BetaRequestMCPServerURLDefinition as BetaRequestMCPServerURLDefinition,
316317
type BetaRequestMCPToolResultBlockParam as BetaRequestMCPToolResultBlockParam,
@@ -360,6 +361,7 @@ export declare namespace Beta {
360361
type BetaWebSearchToolResultBlockParamContent as BetaWebSearchToolResultBlockParamContent,
361362
type BetaWebSearchToolResultError as BetaWebSearchToolResultError,
362363
type BetaWebSearchToolResultErrorCode as BetaWebSearchToolResultErrorCode,
364+
type BetaBase64PDFBlock as BetaBase64PDFBlock,
363365
type MessageCreateParams as MessageCreateParams,
364366
type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
365367
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,

0 commit comments

Comments
 (0)