Release 0.50 is the client rewrite, and it changes the package layout more than the API. messages.create does not move. What breaks is the plumbing around it: fileFromPath is gone in all three forms, the fetch shims and src entrypoints no longer resolve, APIClient became BaseAnthropic at a new path, and APIError.headers is a Web Headers instance.
What changed
- Removed.
fileFromPathas a named export of@anthropic-ai/sdk/uploads, of the package root, and as a static method onAnthropic.@anthropic-ai/sdk/shims/weband/shims/node, since the SDK now uses the runtime’s ownfetch.@anthropic-ai/sdk/srcand/src/index, which editors auto-completed into real code. - Replaced.
APIClientis gone and so is the bare@anthropic-ai/sdk/coreentrypoint. The base class isBaseAnthropicat@anthropic-ai/sdk/client, with the request plumbing and none of the resource properties. - Changed type.
APIError.headerswas a plain record. Subscripting it now returnsundefinedat runtime. - Moved, old path kept.
@anthropic-ai/sdk/error,/pagination,/resource,/streamingand/uploadsare under@anthropic-ai/sdk/core/*, with deprecated re-exports at the old paths. Twelve internal names/uploadsexported went with the split;UploadableandtoFilestayed.
Before and after
The core module move is what Emendant rewrites:
import { APIError } from '@anthropic-ai/sdk/error';import { Page } from '@anthropic-ai/sdk/pagination';import { APIResource } from '@anthropic-ai/sdk/resource';import { Stream } from '@anthropic-ai/sdk/streaming';import { toFile } from '@anthropic-ai/sdk/uploads';After npx emendant fix, each specifier gains core and the import clauses are untouched, because the move kept every name:
import { APIError } from '@anthropic-ai/sdk/core/error';import { Page } from '@anthropic-ai/sdk/core/pagination';import { APIResource } from '@anthropic-ai/sdk/core/resource';import { Stream } from '@anthropic-ai/sdk/core/streaming';import { toFile } from '@anthropic-ai/sdk/core/uploads';@anthropic-ai/sdk/src becomes @anthropic-ai/sdk the same way. fileFromPath is guidance rather than a patch, because the replacement is not a promise:
const upload = await fileFromPath('data/transcript.txt');becomes
const upload = fs.createReadStream('data/transcript.txt');Migration guidance and its limits
Apply the two deterministic patches, the core module rewrite and the src rewrite. The src rewrite covers only the two specifiers that mean the package root; a deeper @anthropic-ai/sdk/src/... path is reported by nothing.
The four assisted changes need a model provider named on the command line or in emendant.json. fileFromPath and the shims are small edits. APIClient is two edits, the name and the module, and a subclass that reached for this.messages needs Anthropic from the root rather than BaseAnthropic, so read that diff.
APIError.headers is reported at medium confidence, because the receiver type cannot be resolved from imports alone. Confirm it, then replace err.headers['request-id'] with err.headers.get('request-id').
The internal upload helpers are report only. The core module move is not urgent, since the old paths resolve. If removing a shim import produces type errors about Request or Headers, the fix is in tsconfig.json and your runtime’s @types package, per the migration guide.
What Emendant detects, fixes and verifies
7 changes in @anthropic-ai/sdk 0.50.1. 2 patched by a transform, 4 patched only with a model provider you name, 1 report only. Every patch is proved in a copy of your repository before it is offered, and its header names the checks that passed. This table is generated from the feed entry, so it cannot claim more than the entry does.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
Public core modules moved under @anthropic-ai/sdk/coreanthropic-ai-sdk-npm-0.50.1-core-module-paths | Deprecation |
| Patch, written by the replace-module-path transform | Your typecheck and tests |
APIClient base class replaced by BaseAnthropicanthropic-ai-sdk-npm-0.50.1-apiclient-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
fileFromPath helper removedanthropic-ai-sdk-npm-0.50.1-filefrompath-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Internal upload helpers dropped from the uploads entrypointanthropic-ai-sdk-npm-0.50.1-uploads-internal-exports-removed | Breaking |
| Report only | Not applicable |
The shims entrypoints were removedanthropic-ai-sdk-npm-0.50.1-shims-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
The @anthropic-ai/sdk/src entrypoints were removedanthropic-ai-sdk-npm-0.50.1-src-directory-removed | Breaking |
| Patch, written by the replace-module-path transform | Your typecheck and tests |
APIError.headers is now a Web Headers instanceanthropic-ai-sdk-npm-0.50.1-apierror-headers-web | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
emendant explain <change-id> prints any row's entry, guidance and sources at the terminal.
Coverage
- Snapshot
2026-08-28.1, sequence 11, signed 28 August 2026- Minimum CLI
emendant@0.1.0- Feed entry
feed/npm/@anthropic-ai/sdk/0.50.1.json
emendant feed status shows the snapshot your machine holds, and emendant feed update fetches the latest.
Primary sources
Every claim above was checked against these, each pinned to the release rather than to a default branch.
- Migration guideanthropics/anthropic-sdk-typescript at sdk-v0.50.1, 7 sections cited
- Changeloganthropics/anthropic-sdk-typescript at sdk-v0.50.1
- Release sdk-v0.50.1anthropics/anthropic-sdk-typescript, the release notes
Scan your repository
Runs locally, reads your lockfile and source, sends nothing anywhere.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.