[Release feedback] LLM06: denominate spending caps in currency per run — measured model price spread and a model-boundary enforcement pattern
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 44/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- content, documentation
Research direction
Start from the LLM06:2026 entry document in this repository and read Mitigation #2 together with the reference list it ends with; the payload does not name a path, so the first step is locating that entry and the citation format it uses. Check whether the three suggested additions (currency-denominated caps, in-path enforcement, cost per successful task) each need wording plus one or more reference entries. Done means the entry text and references are updated consistently and the linked sources resolve, but confirm with the entry leads first since the author offers a PR rather than a fixed spec.
Written by the indexing model from the issue text.
Description
Feedback type
Reference or supporting research
Feedback
LLM06:2026 Mitigation #2 (Hard Spending Caps) sets ceilings per API key,
user, team, and cloud account, and rightly requires that caps halt
inference rather than only alert. Two measured points from published
work suggest strengthening the wording:
-
Token-denominated caps misprice the risk across models. The same
token budget costs very different amounts on different models. In a
measured comparison of current models on identical agent workloads,
the per-task dollar cost spread between the cheapest and most
expensive model was about 28x, while framework overhead changed cost
by at most about 3.9x. A token ceiling that is safe on a small model
therefore permits roughly an order of magnitude more spend on a
frontier model. Independent session-scale data points the same way:
across 722 real agent sessions, context processing was 83.5% of
modelled cost and 3.3% of sessions produced 80% of the cost
(Arsentev, 2026), so controls set per request systematically miss
where spend accumulates. Suggested addition to Mitigation #2: "Denominate caps
in currency per run or per task, not only in tokens; token limits
remain a useful secondary control because they are model-agnostic." -
The enforcement point matters, and there is a reference pattern.
Mitigation #2 says caps "must be enforcement mechanisms that halt
inference when exceeded." In agent loops, after-the-fact accounting
(callbacks, billing monitors) cannot halt a run, because the loop
continues while the accounting catches up. A working pattern is to
enforce the budget inside the model-call path: a model wrapper that
prices each call's actual usage and raises before the call that would
exceed the budget. In a verified test, this halted a runaway
tool-loop after 2 calls / $0.09 against a $0.05 budget. The same
in-path halt is what stops the adversarial cases this entry already
cites: infinite-thinking loops (Li et al., 2025, ThinkTrap) and
tool-chain token exhaustion (Dong et al., 2026, Clawdrain) both burn
budget inside the run, where only an in-path control can stop them.
The pattern is published as a runnable sample (BudgetedModel,
strands-agents samples) and could be cited as an implementation
reference for the mitigation. -
Retries make consumption per successful task the safer unit.
A failing cheap model that retries can out-consume a reliable
frontier model. Measuring cost per successful task (rather than per
call) when setting caps accounts for this; a public benchmark
dataset for that measure is available (see evidence).
Caveats: the author's measurements are benchmark workloads with a
reference cost library, not production telemetry. The Arsentev reports
cited alongside are technical reports, not peer-reviewed. Together they
speak mainly to the benign-runaway half of LLM06 (loops, retries, model
selection); the adversarial half is covered by the entry's existing
attack references (ThinkTrap, Clawdrain).
I am happy to open a pull request with the wording and reference
entries if the entry leads want them.
Supporting evidence
Author's work:
- Pandey, K. (2026). Token-Economics for Agentic AI: A Cost Model and
Tiered Routing Reference. Zenodo. https://doi.org/10.5281/zenodo.23195511
(per-task cost model; tokenecon library: https://pypi.org/project/tokenecon/) - Pandey, K. (2026). Agent cost comparison across models and frameworks
(28x model spread; framework overhead at most 3.9x), measured with
tokenecon 0.2.0. AWS Builder Center article, Oct 2026. - BudgetedModel sample — per-run dollar budget enforced at the model
boundary; runaway-loop halt verified. PR: https://github.com/strands-agents/samples/pull/328 - Cost Per Correct benchmark + dataset (cost per successful task):
https://doi.org/10.5281/zenodo.23439614 ;
https://www.kaggle.com/benchmarks/karmendra8386/cost-per-correct
Other researchers' work:
- Arsentev, E. (2026). The context economy of agentic LLM sessions:
Where the money actually goes [Technical report]. Zenodo.
https://doi.org/10.5281/zenodo.22688706 (722 sessions, 150,902 model
calls; context processing 83.5% of modelled cost; 3.3% of sessions =
80% of cost) - Arsentev, E. (2026). Clear every third task: A measured U-curve in
the context economy of coding agents [Technical report]. Zenodo.
https://doi.org/10.5281/zenodo.22699668 ; contextburn tool:
https://doi.org/10.5281/zenodo.22712985 - Dong, B., Feng, H., & Wang, Q. (2026). Clawdrain: Exploiting
tool-calling chains for stealthy token exhaustion in OpenClaw agents
(arXiv:2603.00902). https://arxiv.org/abs/2603.00902 - Li, Y., Wang, J., Zhu, H., Lin, J., Chang, S., & Guo, M. (2025).
ThinkTrap: Denial-of-service attacks against black-box LLM services
via infinite thinking (arXiv:2512.07086).
https://arxiv.org/abs/2512.07086
Acknowledgments
- I searched existing issues and discussions for this topic.
- I agree to follow the OWASP Code of Conduct.
- Dominant language
- JavaScript
- Stars
- 177
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenAI-Security-Project/GenAI-LLM-Top10
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
GenAI-Security-Project/GenAI-LLM-Top10#176 · 1 comment · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
GenAI-Security-Project/GenAI-LLM-Top10#131 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
[Release feedback] Make Zenodo source bundles reproducible across checkoutsPossibly taken @drk-ram claimed this 20 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 32/100
All issues in GenAI-Security-Project/GenAI-LLM-Top10
Similar issues
-
Document lexicon.default.userconfig and lexicon.default.userconfig.enforced in config.sample.phpOpenenhancement feature: settings good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
grafana/viz-contract#151 ·
Maintainers usually reply within 1 day
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mastra-ai/mastra#32336 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nextcloud-libraries/nextcloud-vue#9280 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jellyfin/jellyfin-web#8910 ·
Maintainers usually reply within 1 day