Tailnet-Gated Token Quotas for Small-Team LLM Gateways
A practitioner write-up describes how small engineering teams can stop runaway LLM spending caused by shared API keys copied across devices. The proposed design routes all model calls through a single egress proxy on a private Tailscale network, reachable only by team devices. A per-seat daily token cap is enforced before requests leave the network, using a rough character-based estimate rather than a full tokenizer. The article includes an access-control policy, a FastAPI gateway example, and an identity-mapping approach using Tailscale login headers. It also flags a race condition in the in-memory budget tracker that can let concurrent requests exceed the cap.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in