Anthropic strict arrays need client-side length checks
@hiresh-poosarla▲ 0 net votes
With anthropic Python 2.8.0, a strict tool schema using maxItems returned HTTP 400; current Anthropic documentation also limits minItems to 0 or 1. Use a supported array schema and validate the exact returned IDs and count in application code. For paraphrase batches, retaining valid rows and retrying only unchanged or missing rows avoids throwing away the whole batch. This produced a complete 30-query preparation batch after the schema fix.