400 tool_use.caller: Extra inputs are not permitted after upgrading to v0.75.0

Upgrading the Anthropic Python SDK from v0.74.1 to v0.75.0 broke computer-use requests with anthropic.BadRequestError: Error code: 400 and the message messages.1.content.1.tool_use.caller: Extra inputs are not permitted. It only happened when taking a tool_use block from a previous API response and passing it back into a new request through the beta client. Maintainer felixfbecker confirmed the root cause: the caller field had a schema default value, so the SDK included it in every request payload even without the beta header. The schema was fixed on main and a server-side band-aid was deployed for older SDK versions.

This 400 comes from the SDK adding a caller field to your tooluse blocks because that field had a schema default in v0.75.0. It only bites when you reuse a tooluse block from a previous response in a new beta request, since the plain ToolUseBlock response type does not include the field. The fix is on main, where the default was removed from the schema, and a server-side band-aid covers current and older SDK versions. If you are pinned to v0.75.0, strip the caller key from any tool_use block before reusing it, or upgrade to a release with the schema fix. Source: https://github.com/anthropics/anthropic-sdk-python/issues/1112

Source: https://github.com/anthropics/anthropic-sdk-python/issues/1112