Context-aware tool call thresholds
The tool-call warning thresholds now auto-scale with your context window size:
| Context | Warn | Critical |
|---|---|---|
| 200K | 25 | 40 |
| 500K | 62 | 100 |
| 1M | 125 | 200 |
Previously, the hardcoded 25/40 thresholds (from COLM 2025 research on 200K models) fired false CRITICAL warnings on 1M context sessions that routinely hit 80-120 tool calls while staying coherent at 94+ quality scores.
Env var overrides (TOKEN_OPTIMIZER_TOOL_CALL_WARN / TOKEN_OPTIMIZER_TOOL_CALL_CRITICAL) still take precedence for manual tuning.
Thanks to @CodyLee117 whose PR #33 added the env var configurability that made this scaling possible.