# I built a hard spend cap you can put in front of ChatGPT-compatible agents. Can you try to break it?

**URL:** <https://forum.langchain.com/t/i-built-a-hard-spend-cap-you-can-put-in-front-of-chatgpt-compatible-agents-can-you-try-to-break-it/4864>\
**Category:** Talking Shop\
**Created:** [October 27, 2026, 3:35pm UTC](https://forum.langchain.com/t/i-built-a-hard-spend-cap-you-can-put-in-front-of-chatgpt-compatible-agents-can-you-try-to-break-it/4864 "2026-10-27T15:35:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blakk](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@Blakk](https://forum.langchain.com/u/Blakk)\
**Post date:** [October 27, 2026, 3:35pm UTC](https://forum.langchain.com/t/i-built-a-hard-spend-cap-you-can-put-in-front-of-chatgpt-compatible-agents-can-you-try-to-break-it/4864/1 "2026-10-27T15:35:51Z")

</div>

I’m the builder of Valta. It’s an OpenAI-compatible proxy. You swap two lines (base URL and key) and each agent run gets a hard cap. Calls over the cap are denied before they reach OpenAI.

llm = ChatOpenAI(  
base\_url=“[https://valta.co/v1](https://valta.co/v1)”,  
api\_key=“vk\_live\_…”, # Valta virtual key, not your OpenAI key  
max\_tokens=500,  
)

What I’d like tested: a LangGraph loop with retries that should trip a per-run cap. Demo repo: [GitHub - Valta-hq/langgraph-spend-cap: LangGraph retry loop with a $3 per-run cap. Valta Cap denies the 4th paid call before the provider. recursion\_limit does not do this. · GitHub](https://github.com/Valta-hq/langgraph-spend-cap). Setup guide: [Set up the OpenAI proxy (8 steps to your first deny) | Valta Docs](https://valta.co/docs/guides/proxy-setup)

Limits today: OpenAI only, `/v1/chat/completions` only, no streaming. Free plan is 1 agent. If it fails to stop a loop, I want to know.
