loading
loading
A token allowance you give the model for a whole agentic loop so it paces itself and finishes gracefully instead of getting cut off.
Set output_config: {task_budget: {type: "tokens", total: N}} (beta, minimum 20,000 tokens) and the server injects a running countdown the model can see, so it prioritizes work and wraps up as the budget runs low. It's a suggestion the model is aware of — distinct from max_tokens, which is an enforced per-response ceiling the model never sees. The budget counts what the model generates plus the tool results it reads this turn, not the full history you resend. Use it to cap cumulative spend across a long loop; use effort to tune per-turn reasoning depth.
Plainly
Think of Task Budget as the brain part that guesses or decides. A token allowance you give the model for a whole agentic loop so it paces itself and finishes gracefully instead of getting cut off.
In practice
Use it when model choice, prompts, latency, cost, or quality affect the product result. In practice, define the owner, input, output, and failure mode before you rely on it.