Hacker
Tanishk Bhanage
@tanishk
Helo
Elsewhere
Stack
- TypeScript
- JavaScript
- Python
- Java
Projects
TokenThrottle
Flagsmith Experimentation HackathonNov 2026
TokenThrottle is an AI FinOps circuit-breaker for teams running LLM features in production. Prompt loops, viral traffic and runaway agents can burn through a token budget in minutes. The usual fixes are hard rate limits that return 429 errors and break the product, or manual model swaps at 3 AM. TokenThrottle uses Flagsmith as a graceful-degradation control plane instead. A demo chat app reads three Flagsmith remote configs per request (llm_model_tier, max_agent_steps, rag_context_chunks) using the user's identity and a plan trait, and logs token and cost telemetry. When the extrapolated $/hr burn crosses a threshold, an agent finds the culprit segment and proposes two degradation tiers: a cheaper model for that segment, or the cheaper model plus lower step and context caps. Savings are computed from measured token counts and a price table, and the proposal waits on an approval card showing the exact old and new values. Only after a human approves does an executor apply a Flagsmith segment override through the CLI. Every proposal, approval, write and rollback is audit-logged, and rollback removes the override. It is for platform and AI engineering teams that ship LLM features and want spend control without breaking the product. In the demo the traffic spike is simulated and labelled as such; the flag-driven degradation is real.