Enforce token_budget before each iteration #22
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/budget-enforcement"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes Issue #17
Change
token_budgetis a soft cap on the tool-use loop only. The synthesis call is always allowed to complete so callers get a structured ResearchResult rather than a fallback stub.Why uncap synthesis
Capping synthesis would force returning a parse-failure stub the moment evidence-gathering ran long — exactly the failure mode Issue #16 fixed. A proper budget that includes synthesis requires splitting the cap up-front (e.g. reserve 50% for synthesis), which is a separate design call.
Verified
With
token_budget=5000, max_iterations=10:budget_exhausted88/88 tests still passing.