Claude Code can switch on optional, still-in-testing features of the API, called betas, by sending extra headers with each request. Some gateways and platforms do not accept every beta. Claude Code now recognizes errors whose text mentions an Input tag as a sign that one of these betas was rejected, when the error comes back with HTTP status 400 or 422. This covers betas for:
- tool definitions
- adding and removing tools
- tool references
- clearing thinking and clearing tool uses
The same check is used when detecting whether structured outputs, answers in a fixed format, were rejected. Before, only the tool definition and tool addition cases were checked, each on its own.
If you go through a gateway or platform that does not support one of these betas, a request is more likely to be retried without it instead of failing.