Minor Changes
-
#8829
38f96d8Thanks @effect-bot! - Regenerate the unstableGeneratedmodule from the pinned anthropic-sdk-typescript 0.135.0 spec, so newer request settings such as adaptive thinkingdisplaycan be configured. Every releasedGeneratedexport name still exists. The released Skills schemas, such asSkillandCreateSkillResponse, keep their released definitions. Other released types follow the current API: they gain fields and union members, and fields added since the release stay optional, so older responses still decode. The Files and Skills changes below are the exception: they follow Anthropic's migration of those APIs to their GA shapes and do not decode the previous beta shapes.Breaking changes
-
The Skills client methods decode the current API shapes, exported under new
*Resourcenames. No method decodes with the released Skills schemas.createSkillV1SkillsPost,getSkillV1SkillsSkillIdGetand theirbeta*variants returnSkillResource/BetaSkillResource. Readdisplay_nameinstead ofdisplay_title, andlatest_version_idinstead oflatest_version.createSkillVersionV1SkillsSkillIdVersionsPost,getSkillVersionV1SkillsSkillIdVersionsVersionGetand theirbeta*variants returnSkillVersionResource/BetaSkillVersionResource, which no longer includedirectoryorversion.- The Skills list methods return
List*ResourcesResponse. Page withnext_pageinstead ofhas_more. - The delete methods and Skill version results type
typeas the literal the API always sends, such as"skill_deleted"and"skill_version", instead ofstring.
-
The Files list methods
listFilesV1FilesGetandbetaListFilesV1FilesGetpage withpageandnext_page. Their params no longer includebefore_idorafter_id, andFileListResponse/BetaFileListResponseno longer includehas_more,first_idorlast_id. Pass the previous response'snext_pageaspageto fetch the next page. -
When migrating to the current Files and Skills shapes, remove the dated
files-api-2025-04-14andskills-2025-10-02tokens from anyanthropic-betaheader you send, and keep any other beta tokens. The API still returns the previous beta shapes to requests that send these tokens, and the Files and Skills methods cannot decode them. See the upstream migration guides for Files and Skills. -
Uploads take files instead of strings.
UploadFileV1FilesPostRequestFormData.fileand each Skillsfilesentry are aFileorBlob. Skillsfilesis now required and non-null. As before, every file must be in one top-level directory that has aSKILL.md. The Skills create input renamesdisplay_titletodisplay_name:const created = client.betaCreateSkillV1SkillsPost({ payload: { display_name: "My skill", files: [new File([skillMd], "my-skill/SKILL.md", { type: "text/markdown" })] }, config: undefined })
-
BetaMessageIterationUsage.modelcan benullas well as missing. Read it with a fallback, such asusage.model ?? "unknown". -
Text blocks in
BetaResponseMCPToolResultBlockcontent have optionalcitations. Read them with a fallback, such aspart.citations ?? []. -
Response unions gain members. Exhaustive
switches without a default need new cases:- web fetch
error_codeadds"content_too_large"; - stop reasons add
"model_context_window_exceeded"; - beta content blocks, server tool names and iteration usage add advisor variants.
- web fetch
-
-
#8829
3c42058Thanks @effect-bot! - RemoveAiError.HttpRequestDetailsandResponse.HttpRequestDetails, so AI errors and response metadata no longer carry request headers or query parameters.AiError.NetworkErrorrecords the request asmethodandurlfields instead ofrequest, and therequestfield is gone fromAiError.HttpContextandResponse.ResponseMetadataPart.
Patch Changes
- #8829
7ea1ea2Thanks @wmaurer! - Add an optionalcauseto the AINetworkError. It holds theHttpClientErrorthe request failed with, stored unchanged and not redacted, so the reason a request failed is no longer lost. The newNetworkError.fromHttpClientErrorsets it, and all AI providers now use it.NetworkError.fromRequestErroris unchanged. - Updated dependencies [
631d4f4,7ea1ea2,a2ccc14,ed20129,20795b9,a8e5e6c,c4d298d,fb5dbee,8309b94,ac10e55,af23904,df8dce5,0c24a8f,468c6ee,2d1fcd4,8f23668,3f8f359,fe6b748,2a03584,40e145e,7217410,cf249fe,4f0fad1,e75708c,7890077,c4a00fc,f74db37,069cf72,9a07ebc,f40dc4e,fa516c6,ffd9237,93895b9,8938b19,e5a1479,89e1e1e,eda0960,65db606,7c42335,cb21d14,89e1e1e,c32eb78,be9895b,26b4bfe,e19c611,f97711f,4f16778,d2b6bc7,8e668fe,ce9e999,3d88452,3c42058,2ae4045,e853fa1,6dc3f7c,1513bbd,c065ed7,1194a4c,2cb498e,89e5443,2a9a425,e710bbb,b0d6e75,32b3570,9f93f4f,27370c7]:- effect@4.1.0