Smith::Context::Budget
Inherits Struct < Value < Object
What a request costs and where the thresholds sit in it.
The whole point of this being a value rather than a bare max_tokens is
that "should I act?" and "when do I stop?" are different questions.
Answering both with one number is what made compaction fire every turn
and reclaim nothing.
Constructors
Instance methods
The inverse: the largest raw history estimate whose charged cost still
fits limit. The stages compare against this, so none of them has to
redo the overhead-and-calibration arithmetic.
What the request actually costs, given a raw estimate of the history. Every number compaction reports is this one, so "compacted to N tokens" describes the request rather than a fragment of it.
Everything in the request that is not the message history: system prompt, project context, skills, tool definitions.
Reported prompt tokens over estimated ones. The byte heuristic undercounts; this is how much.