Skip to main content

Module budget

Module budget 

Source
Expand description

Turn-level context budget controller (#1306).

Caps fresh tokens per tool response to prevent context window bloat. Research basis: “Context Length Alone Hurts LLM Performance” (EMNLP 2025) found 13.9–85% degradation with length even with perfect retrieval.

Enums§

BudgetAction
Budget enforcement result.

Functions§

apply_turn_budget
Apply turn-level token budget to a tool response body.