@anthropic-ai/sdk 1.0.0 removes the legacy Completions surface and the two prompt constants that went with it. Code that imports Completions, Completion, any CompletionCreateParams type, HUMAN_PROMPT or AI_PROMPT stops compiling on upgrade. The package changelog lists the release as breaking and ties it to API version 2026-10-21.
What changed
- Completions types.
Completions,Completion,CompletionCreateParams,CompletionCreateParamsNonStreamingandCompletionCreateParamsStreamingare no longer exported from@anthropic-ai/sdk/resources. In 0.137.0 the client declared acompletionsresource; the 1.0.0 client declaration does not. - Prompt constants.
HUMAN_PROMPTandAI_PROMPTare no longer exported from@anthropic-ai/sdkor from@anthropic-ai/sdk/client. In 0.137.0 they held the\n\nHuman:and\n\nAssistant:turn markers.
Before and after
The scan matches imports like these:
import { HUMAN_PROMPT } from '@anthropic-ai/sdk';import { CompletionCreateParams } from '@anthropic-ai/sdk/resources';None of the nine changes has a deterministic rewrite, and none of these names has a same-named successor. The nearest replacement the release provides is the Messages API: where CompletionCreateParamsNonStreaming is missing, the TypeScript diagnostic suggests MessageCreateParamsNonStreaming. That is a place to start, not a drop-in swap, because Messages takes a list of role-tagged messages where Completions took one prompt string.
Migration guidance and its limits
All nine findings carry assisted fixes, so emendant fix needs a named model provider, chosen on the command line or in your Emendant configuration. Without one, each finding is reported with its guidance and nothing is sent anywhere. Each patch is checked with a typecheck and your tests, so read the patch header to see which checks passed.
Moving a call from Completions to Messages changes the request and the response shape, so review each patch before you accept it. Code that assembles \n\nHuman: and \n\nAssistant: prompts by hand needs its turns restructured as messages. Where the release gives no clear replacement for a flagged name, a patch may not be available and the surrounding code needs your review.
No finding for this release is report only. A clean scan covers these names imported from @anthropic-ai/sdk, @anthropic-ai/sdk/client and @anthropic-ai/sdk/resources. It does not cover property access such as client.completions or Anthropic.HUMAN_PROMPT, which needs no import, or a name reached through a re-export in your own module.
What Emendant detects, fixes and verifies
17 changes in @anthropic-ai/sdk 1.0.0. 0 automatic fixes, 17 fixes requiring a model provider you choose, 0 report only. Each patch states which checks passed. Understand patch evidence.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
Removed AI_PROMPTanthropic-ai-sdk-npm-1.0.0-ai-prompt-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed HUMAN_PROMPTanthropic-ai-sdk-npm-1.0.0-human-prompt-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed AI_PROMPTanthropic-ai-sdk-npm-1.0.0-client-ai-prompt-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed HUMAN_PROMPTanthropic-ai-sdk-npm-1.0.0-client-human-prompt-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed Completionanthropic-ai-sdk-npm-1.0.0-resources-completion-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed CompletionCreateParamsanthropic-ai-sdk-npm-1.0.0-resources-completion-create-params-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed CompletionCreateParamsNonStreaminganthropic-ai-sdk-npm-1.0.0-resources-completion-create-params-non-streaming-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed CompletionCreateParamsStreaminganthropic-ai-sdk-npm-1.0.0-resources-completion-create-params-streaming-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Removed Completionsanthropic-ai-sdk-npm-1.0.0-resources-completions-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of Anthropicanthropic-ai-sdk-npm-1.0.0-anthropic-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of ParseableMessageCreateParamsanthropic-ai-sdk-npm-1.0.0-parseable-message-create-params-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of Anthropicanthropic-ai-sdk-npm-1.0.0-client-anthropic-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of MessageStreamParamsanthropic-ai-sdk-npm-1.0.0-resources-message-stream-params-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of MessageCreateParamsNonStreaminganthropic-ai-sdk-npm-1.0.0-resources-message-create-params-non-streaming-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of MessageCreateParamsStreaminganthropic-ai-sdk-npm-1.0.0-resources-message-create-params-streaming-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of ModelRetrieveParamsanthropic-ai-sdk-npm-1.0.0-resources-model-retrieve-params-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of ModelListParamsanthropic-ai-sdk-npm-1.0.0-resources-model-list-params-members-changed | 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.
The error TS lines are what TypeScript 5.9.3 printed when code that compiled against @anthropic-ai/sdk 0.137.0 was compiled against 1.0.0. A row without one is a change the compiler does not report, such as a deprecation or a change in behaviour.
Coverage
Requires emendant@0.3.0 or later. Run emendant feed update to get the latest coverage.
Coverage details
- Snapshot
2026-10-22.1, sequence 55, signed 22 October 2026- Feed entry
feed/npm/@anthropic-ai/sdk/1.0.0.json
emendant feed status shows the snapshot your machine holds.
Primary sources
- @anthropic-ai/sdk@1.0.0npm registry, the published package
- @anthropic-ai/sdk@0.137.0npm registry, the published package
Scan your repository
Find affected code without editing your files.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.
Related release pages
- Earlier @anthropic-ai/sdk release: @anthropic-ai/sdk 0.135.0: ThinkingTypes newly requires between_tools
Every @anthropic-ai/sdk release page is listed on one page.