Back
AnthropicClaude API
The advisor tool now supports a max_tokens parameter to cap the advisor model's output per call, reducing…
AI summary
Written by AI from the official notes. Check them for exact details.The advisor tool now allows output length capping, and users won't be billed for refusals without output.
- Advisor tool supports max_tokens parameter to limit output length.
- Reduced latency and output token cost for shorter responses.
- No billing for requests with stop_reason: 'refusal' without output.
Why it matters: Users looking to optimize costs and response times should pay attention to these updates.
Full release notes2 changes
- The advisor tool now supports a
max_tokensparameter to cap the advisor model's output per call, reducing latency and output token cost for workloads that don't need full-length advisor responses. Settools[].max_tokenson the advisor tool definition; see Capping advisor output. - On the Claude API, you are no longer billed for a request when it returns
stop_reason: "refusal"without Claude having generated any output. See Streaming refusals for detecting and handling refusals.