#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/../../../.." source scripts/lib.sh MODEL="${MODEL:-claude-haiku-4-5-20251001}" # tool_choice auto | any | none and disable_parallel_tool_use with two tools. # STATUS: LIVE_VERIFIED 2026-09-18 (a3 parallel: 2 tool_use blocks; a4 disable_parallel: 1 block; a5 any; a6 none) on claude-haiku-4-5-20251001. T='[{"name":"get_weather","description":"Get the current weather for a city. Returns a short text description.","input_schema":{"type":"object","properties":{"location":{"type":"string","description":"City name, e.g. Paris"}},"required":["location"]}},{"name":"get_time","description":"Get the current local time in a city.","input_schema":{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]}}]' Q="Give me the weather AND the local time in Tokyo. Call both tools at once." for TC in '{"type":"auto"}' '{"type":"auto","disable_parallel_tool_use":true}' '{"type":"any"}' '{"type":"none"}'; do R=$(ant POST /v1/messages -d "$(jq -n --argjson t "$T" --argjson tc "$TC" --arg m "$MODEL" --arg q "$Q" '{model:$m,max_tokens:300,tools:$t,tool_choice:$tc,messages:[{role:"user",content:$q}]}')") log_request anthropic POST /v1/messages "$ANT_STATUS" 0.001 "custom-tools/tool_choice_variants.sh $TC" echo "tool_choice=$TC -> stop_reason=$(echo "$R"|jq -r .stop_reason) tool_use blocks=$(echo "$R"|jq '[.content[]|select(.type=="tool_use")]|length')" done