AI / Claude Sonnet5 Interview questions
How can you optimize Claude Sonnet 5 costs given the new tokenizer?
Start by re-baselining, not assuming: run the token counting API against your actual representative prompts on Sonnet 5 specifically, since the roughly 30% token-count increase varies somewhat by content type, and an assumed flat multiplier can under- or overestimate the real impact for your specific workload.
Use thinking: {"type": "disabled"} deliberately on request types that don't benefit from reasoning - simple classification, routing, straightforward lookups - since this removes an entire category of token consumption that's on by default but not always adding value, rather than letting every request pay the reasoning-token cost by default.
Tune effort deliberately per request type rather than leaving every request at the high default: many workloads are meaningfully more capable at medium effort on Sonnet 5 than the equivalent task was on Sonnet 4.6 at any setting, so testing at medium before assuming high or xhigh is needed can directly reduce reasoning-token spend without a corresponding quality loss.
For agentic workloads spawning many subagent calls, consider setting a lower effort specifically on subagent-level calls rather than the top-level orchestrating call, since thinking-token overhead compounds quickly across a fleet of parallel or sequential subagent invocations if left at a high default throughout.
More Related questions...