Summary#
Computer use is not possible on claude-opus-5-5 or claude-sonnet-5-5 through the Anthropic adapter. Both models take computer use only through the computer_toolset_20260801 toolset, and the adapter does not offer it.
Context#
computerUseTool() sends computer_20241022 or computer_20250124 (packages/ai-anthropic/src/tools/computer-use-tool.ts). The Claude API returns a 400 for those on the two 5.5 models.
claude-opus-5-5 already has no computer_use in its tool list in model-meta.ts. #1594 does the same for claude-sonnet-5-5. So the types now reject the old tool on both models, and there is nothing to use in its place.
docs/adapters/anthropic.md says "The adapter does not offer that toolset yet" (added in #1594).
What is needed#
- Bump
@anthropic-ai/sdk. The repo is on ^0.97.1, which has no toolset type. 0.131.0 exports BetaComputerToolset20260801 and BetaComputerToolsetConfigs from resources/beta. Import those types by name; do not copy them.
- A factory for the toolset in
packages/ai-anthropic/src/tools/, exported from @tanstack/ai-anthropic/tools.
- A per-model capability for it. The 5.5 models accept the toolset and reject
computerUseTool(). Older models are the reverse, unless the API also takes the toolset there (to check). So this is a new capability next to computer_use, not a new member of the ComputerUseToolConfig union.
- Type tests, an E2E case, docs (
docs/adapters/anthropic.md, docs/tools/provider-tools.md), the adapter-configuration skill reference, and a changeset.
Open questions#
- Does the toolset need a beta header?
- Does it change the shape of the tool-use or tool-result blocks that the adapter streams back?
- Which models other than the two 5.5 ids accept it?
Related gap#
ComputerUseToolConfig does not include computer_20251124, which SDK 0.97.1 already types as BetaToolComputerUse20251124. This can go in the same PR or a separate small one.
Sources#