Status: [LIVE] Endpoints found: https://docs.litellm.ai/docs/proxy https://docs.litellm.ai/docs/proxy/config_settings Source: https://github.com/pmariotto/token-pacer # token-pacer — Albert API TPM throttling gateway for Cline ## 1. Description **[Albert AI](https://guides.ia.numerique.gouv.fr/albert-api)** is the French government's sovereign AI platform, hosted by the French Interministerial Digital Directorate (DINUM). It offers access to open-source large language models — including several Mistral models and Meta's Llama family — through an API that is compatible with OpenAI's standard format. Because it is a shared, publicly funded infrastructure, its usage is governed by strict quotas, most notably **TPM (tokens per minute)**. Cline is an excellent tool for working with LLMs, and it works particularly well with the Albert API. However, the Albert API enforces a hard limit on TPM (tokens per minute). If you exceed it, Albert returns a 429 error — typically `246000 input tokens per minute exceeded (remaining: 0)` — and your Cline session breaks. This project consists in setting up a proxy that sits in front of Albert and enforces a **slightly lower TPM ceiling** (240,000) so you never hit Albert's limit. It is built on the **LiteLLM** library. When you do exceed the local ceiling, the proxy **waits and retries** until capacity frees up, rather than failing — so your Cline session keeps running uninterrupted. Requests may still take a while if you're consistently over the limit, but your session will never break. ``` Cline ──▶ LiteLLM proxy (localhost:4000) ──▶ Albert API (albert.api.etalab.gouv.fr) ^ • enforces 240 000 TPM (under Albert's 246 000) • waits + retries on rate limit (cooldown_time) • your real Albert key never leaves this machine ``` ## 2. Setup The proxy runs **directly from the `litellm` conda env** — no Docker required. Below, **"done once"** steps happen a single time as part of installing and configuring the proxy. **"before each use"** steps must be re-run every time you want to use Cline (and again each time your m