TaskBudget - TypeScript SDK

TaskBudget type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap.

Example Usage

1import { TaskBudget } from "@openrouter/sdk/models";
2
3let value: TaskBudget = {
4 total: 400000,
5 type: "tokens",
6};

Fields

FieldTypeRequiredDescription
remainingnumberN/A
totalnumber✔️N/A
typemodels.TypeTokens✔️N/A