# Thinking cost surprise: measure it, then budget it

## Symptom
Costs jump after enabling thinking, well beyond what the visible answer length would suggest.

## Confirm the cause
Read `usage.output_tokens_details.thinking_tokens` on the response. That field reports how many of the billed output tokens were internal reasoning. The budget is a target, not a cap: actual usage varies, and `max_tokens` is the hard ceiling on total output. A 16k budget on a task the model could solve in 2k of thinking is pure overspend.

## Fix
1. Start near the 1024-token minimum for simple tasks and raise incrementally; start around 16k only for genuinely complex ones.
2. On adaptive-thinking models, lower effort settings let the model skip thinking entirely on easy inputs.
3. For budgets above 32k, use batch processing: long thinking runs hit network timeouts on live requests.

## Verify
Compare `thinking_tokens` before and after the change on the same task. Quality holding steady while thinking tokens drop is the win; if quality drops, you found the floor.