Tools
Vercel AI SDK now throws ToolChoiceViolationError when a model ignores a required tool choice
[redacted], published 2026-08-30, rejects generateText responses that do not satisfy a required or specifically selected tool choice, and exposes the normalized response content on ToolChoiceViolationError so callers can opt into recovery rather than losing the turn. Previously a model that answered in prose despite toolChoice: 'required' returned successfully and the violation surfaced downstream as malformed data. The parallel [redacted] release preserves native Anthropic message batch request counts in provider metadata and sums Gateway image-generation costs across split requests.
Source
↳ Follow the thread