Repository navigation
feat(ai-anthropic): computer use on the Claude 5.5 models, with the computer toolset, computer_20251124, and SDK 0.135 - #1834
Conversation
Upgrade @anthropic-ai/sdk to 0.135.0. Add computer_20251124 with its computer-use-2025-11-24 beta, and computer_toolset_20260801 for the Claude 5.5 models. A toolset call runs as one computer call with the action in input.action, and goes back to Claude in the form that it sent. Each model now takes only the computer use versions that it supports.
Also add the changeset and format the changed files.
🦋 Changeset detectedLatest commit: 7fac2ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 7fac2ac
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-byteplus
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-cloudflare
@tanstack/ai-code-mode
@tanstack/ai-code-mode-snippets
@tanstack/ai-codex
@tanstack/ai-cohere
@tanstack/ai-compaction
@tanstack/ai-devtools-core
@tanstack/ai-durable-stream
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-daytona
@tanstack/ai-isolate-e2b
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-isolate-quickjs-bun
@tanstack/ai-llmgateway
@tanstack/ai-lovable
@tanstack/ai-mcp
@tanstack/ai-memory
@tanstack/ai-mistral
@tanstack/ai-octane
@tanstack/ai-ollama
@tanstack/ai-ollaya
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-perplexity
@tanstack/ai-persistence
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-reactor
@tanstack/ai-remix
@tanstack/ai-sandbox
@tanstack/ai-sandbox-blaxel
@tanstack/ai-sandbox-boxd
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-e2b
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-railway
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-upstash-box
@tanstack/ai-sandbox-vercel
@tanstack/ai-skills
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-typesafe
@tanstack/ai-utils
@tanstack/ai-vercel-gateway
@tanstack/ai-vertex
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/ai-worldlabs
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
@tanstack/svelte-ai-devtools
commit: |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…les beta header The SDK install moved the @google/genai of ai-vertex to a copy with zod 4.6.5, so its test mock missed the copy that ai-gemini loads. SDK 0.135.0 sends the files-api beta header once, where 0.97.1 sent it twice.
Coverage✅ Coverage held across 68 compared package(s). Each package is measured twice in this job — on this PR and on its merge-base with
|
Computer use now works on Claude Opus 5.5, Sonnet 5.5, and Haiku 5.5, through
computer_toolset_20260801.computerUseTool()also takescomputer_20251124. Oneexecuteworks for every version. TypeScript now rejects a version that the model does not take. The PR upgrades@anthropic-ai/sdkto 0.135.0, the first version with the toolset types. It is stacked on #1832 (the computer use beta header), so its diff starts after that PR.🎯 Changes
computerUseTool({ type: 'computer_toolset_20260801', configs? })sends one entry with no name and no beta header. Claude calls each action as its own tool (left_click,screenshot, and more) withtoolset_name: 'computer'. Then the adapter does three things:computercall with the action ininput.action. The joined arguments stream at the end of the block.toolset_nameto each result.computer_20251124. It goes out with thecomputer-use-2025-11-24beta. Each earlier version now maps to its own beta header.model-meta.ts:computer_use(computer_20241022,computer_20250124),computer_use_20251124, andcomputer_toolset. Each model gets the kinds from the Anthropic compatibility table. The model sync now gives a new Claude modelcomputer_toolset.FileMetadatais nowBetaFileMetadata. The@anthropic-ai/sdk-v112test alias is gone: it checked an SDK newer than the old 0.97.1, and 0.135.0 is newer than it. Two more changes come with the new types:systemmessages, so the local type and the cast are gone.name, so two reads oftool.namecheck for it first.files-api-2025-04-14header once. The old SDK sent it twice, soauth-parity.test.tsnow expects one header.computerUseToolsection has a version table and a full loop withexecute, and the support matrix has the new versions. There are unit tests and an E2E wire spec for the toolset loop.The lockfile changes because of the SDK upgrade. The
@google/genaientry ofai-vertexstays as onmain. When the install moved it to a copy withzod@4.6.5, the mock in theai-vertextest missed the copy thatai-geminiloads.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.docs/for this change, or this change is not user-facing.pnpm changeset), or this PR does not change a published package.🚀 Release Impact
Testing
Commands run:
ai-anthropic, thenvite buildandpublintofai-anthropic.test:typesandtest:oxlintofai-anthropic(no new warnings),oxfmt --checkon every changed file,pnpm test:sherif, andpnpm test:docs.--maxWorkers=2on 13ai-anthropicfiles: the newcomputer-toolsetandcomputer-use-betatests, and the tests of tools, betas, files, the client type, prompt caching, mid-conversation changes, replay, and model meta. 178 tests pass. The model-sync test (scripts/model-sync/provider-supports.test.ts) passes too.kiira checkondocs/adapters/anthropic.mdanddocs/tools/provider-tools.md: 30 snippets pass.ai-anthropic:test:libandai-vertex:test:lib: the fullai-anthropicunit suite (26 files, 307 tests) and theai-vertexunit suite (12 tests). All pass after the fix commit.testing/e2e. The two new specs type-check on their own.Not run locally: the E2E suite,
pnpm test:pr,knip, coverage, and the typecheck ofexamples/ts-react-chatand all oftesting/e2e(they need a build of every package). CI runs them.Manual test:
pnpm --dir packages/ai-anthropic exec vitest run tests/computer-toolset.test.ts tests/tools-per-model-type-safety.test.ts.tests/computer-toolset.test.ts. The second test streamsleft_clickandscreenshotas toolset calls.executegets{ action: 'left_click', coordinate: [500, 300] }and{ action: 'screenshot' }. The next request sends both calls back withtoolset_name: 'computer'.docs/adapters/anthropic.md#computerusetoolonclaude-opus-5-5with your own screen functions.How this PR makes testing easy:
tests/computer-toolset.test.tsdrives a full toolset loop throughchat()with a mocked client.testing/e2e/tests/anthropic-computer-toolset-wire.spec.tsruns the same loop against a customfetchand checks each request on the wire.tests/tools-per-model-type-safety.test.tschecks which versions each model takes.Risk / rollback
Medium:
computer_20250124onclaude-opus-4-6. Anthropic rejects that pair at runtime, so only broken code stops compiling.To undo, revert this PR.
Public API change
Before
After