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

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.

ChangeSeverityDetectsFixVerified by
Public core modules moved under @anthropic-ai/sdk/core
anthropic-ai-sdk-npm-0.50.1-core-module-paths
Deprecation
  • any import of @anthropic-ai/sdk/error
  • any import of @anthropic-ai/sdk/pagination
  • any import of @anthropic-ai/sdk/resource
  • any import of @anthropic-ai/sdk/streaming
  • any import of @anthropic-ai/sdk/uploads
Patch, written by the replace-module-path transformYour typecheck and tests
APIClient base class replaced by BaseAnthropic
anthropic-ai-sdk-npm-0.50.1-apiclient-removed
Breaking
  • APIClient imported from @anthropic-ai/sdk/core
Patch, only when you name a model providerYour typecheck and tests
fileFromPath helper removed
anthropic-ai-sdk-npm-0.50.1-filefrompath-removed
Breaking
  • fileFromPath imported from @anthropic-ai/sdk/uploads
  • fileFromPath imported from @anthropic-ai/sdk
  • calls to fileFromPath imported from @anthropic-ai/sdk/uploads
  • calls to fileFromPath imported from @anthropic-ai/sdk
  • .fileFromPath() on the @anthropic-ai/sdk namespace
Patch, only when you name a model providerYour typecheck and tests
Internal upload helpers dropped from the uploads entrypoint
anthropic-ai-sdk-npm-0.50.1-uploads-internal-exports-removed
Breaking
  • BlobPart imported from @anthropic-ai/sdk/uploads
  • BlobLike imported from @anthropic-ai/sdk/uploads
  • FileLike imported from @anthropic-ai/sdk/uploads
  • ResponseLike imported from @anthropic-ai/sdk/uploads
  • isResponseLike imported from @anthropic-ai/sdk/uploads
  • isFileLike imported from @anthropic-ai/sdk/uploads
  • isBlobLike imported from @anthropic-ai/sdk/uploads
  • isUploadable imported from @anthropic-ai/sdk/uploads
  • isMultipartBody imported from @anthropic-ai/sdk/uploads
  • maybeMultipartFormRequestOptions imported from @anthropic-ai/sdk/uploads
  • multipartFormRequestOptions imported from @anthropic-ai/sdk/uploads
  • createForm imported from @anthropic-ai/sdk/uploads
Report onlyNot applicable
The shims entrypoints were removed
anthropic-ai-sdk-npm-0.50.1-shims-removed
Breaking
  • any import of @anthropic-ai/sdk/shims/web
  • any import of @anthropic-ai/sdk/shims/node
Patch, only when you name a model providerYour typecheck and tests
The @anthropic-ai/sdk/src entrypoints were removed
anthropic-ai-sdk-npm-0.50.1-src-directory-removed
Breaking
  • any import of @anthropic-ai/sdk/src
  • any import of @anthropic-ai/sdk/src/index
Patch, written by the replace-module-path transformYour typecheck and tests
APIError.headers is now a Web Headers instance
anthropic-ai-sdk-npm-0.50.1-apierror-headers-web
Breaking
medium confidence
  • .headers indexed on a value from @anthropic-ai/sdk
Patch, only when you name a model providerYour 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.

Scan your repository

Runs locally, reads your lockfile and source, sends nothing anywhere.

npx emendant scan

Then npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.