llmbuffet 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ # llmbuffet — API keys for free-tier providers.
2
+ #
3
+ # Copy this file to `.env` (which is gitignored) and fill in the keys for
4
+ # whichever providers you want to use. You do NOT need all of them — llmbuffet
5
+ # uses whatever you have configured and skips the rest. Every key below is for
6
+ # a FREE tier; no credit card is required for any of these.
7
+ #
8
+ # llmbuffet reads these from the environment. Either `export` them in your
9
+ # shell, or use a tool like `direnv` / `python-dotenv`, or pass them inline.
10
+ # llmbuffet itself does not parse this file — it only reads the environment.
11
+
12
+ # Groq — https://console.groq.com/keys (free, very fast)
13
+ GROQ_API_KEY=
14
+
15
+ # Cerebras — https://cloud.cerebras.ai (free, very fast)
16
+ CEREBRAS_API_KEY=
17
+
18
+ # OpenRouter — https://openrouter.ai/keys (many ':free' models)
19
+ OPENROUTER_API_KEY=
20
+
21
+ # Google Gemini — https://aistudio.google.com/apikey (generous free tier)
22
+ GEMINI_API_KEY=
23
+
24
+ # GitHub Models — https://github.com/settings/tokens (any PAT works; free)
25
+ GITHUB_TOKEN=
26
+
27
+ # Cloudflare Workers AI — https://dash.cloudflare.com/profile/api-tokens
28
+ # Needs both the token and your account id.
29
+ CLOUDFLARE_API_TOKEN=
30
+ CLOUDFLARE_ACCOUNT_ID=
31
+
32
+ # Mistral — https://console.mistral.ai/api-keys (free tier)
33
+ MISTRAL_API_KEY=
34
+
35
+ # Cohere — https://dashboard.cohere.com/api-keys (free trial keys)
36
+ COHERE_API_KEY=
37
+
38
+ # SambaNova — https://cloud.sambanova.ai/apis (free tier)
39
+ SAMBANOVA_API_KEY=
40
+
41
+ # NVIDIA NIM — https://build.nvidia.com (free credits, huge model catalog)
42
+ NVIDIA_API_KEY=
43
+
44
+ # Z.ai / Zhipu GLM — https://z.ai (free GLM flash models)
45
+ ZHIPU_API_KEY=
46
+
47
+ # Ollama Cloud — https://ollama.com/settings/keys
48
+ OLLAMA_API_KEY=
49
+
50
+ # LongCat (Meituan) — https://longcat.chat
51
+ LONGCAT_API_KEY=
52
+
53
+ # ---------------------------------------------------------------------------
54
+ # Zero-setup providers (no key needed — included automatically):
55
+ # • OVHcloud AI Endpoints (anonymous/keyless)
56
+ # • LLM7 (works without a key; set LLM7_API_KEY for more)
57
+ # So llmbuffet works out of the box even with this whole file empty.
58
+ # ---------------------------------------------------------------------------
59
+
60
+ # LLM7 — optional key for higher limits: https://token.llm7.io
61
+ LLM7_API_KEY=
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Add a free provider
3
+ about: Propose adding a new free-tier LLM provider to the catalog
4
+ title: "Add provider: <name>"
5
+ labels: ["good first issue", "provider"]
6
+ ---
7
+
8
+ **Provider:** <name + homepage>
9
+
10
+ **Free tier?** (link to the free-tier docs — must be usable without a credit card)
11
+
12
+ **OpenAI-compatible?** (does it expose `/v1/chat/completions`? If yes, this is a
13
+ one-block PR to `src/llmbuffet/providers.toml`. If no, it needs a small adapter.)
14
+
15
+ **Base URL:**
16
+
17
+ **Models to include** (name + free daily request limit if known):
18
+ -
19
+
20
+ **Env var for the API key:** `<PROVIDER>_API_KEY`
21
+
22
+ See [CONTRIBUTING.md](../../CONTRIBUTING.md) for the (small) steps. New providers
23
+ are the most valuable contribution to llmbuffet — thank you!
@@ -0,0 +1,29 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.11", "3.12", "3.13"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install -e ".[dev]"
26
+ - name: Lint
27
+ run: ruff check src tests
28
+ - name: Test
29
+ run: pytest
@@ -0,0 +1,31 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .venv/
9
+ venv/
10
+ env/
11
+
12
+ # Tooling
13
+ .pytest_cache/
14
+ .ruff_cache/
15
+ .mypy_cache/
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # Secrets & local state — never commit these
20
+ .env
21
+ .env.*
22
+ !.env.example
23
+ *.key
24
+ **/api_key
25
+ .llmbuffet/
26
+ llmbuffet-state/
27
+
28
+ # Editor / OS
29
+ .idea/
30
+ .vscode/
31
+ .DS_Store
@@ -0,0 +1,57 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/), and the project aims to follow
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [0.2.0] — 2026-06-03
8
+
9
+ ### Added
10
+ - **Six more providers** (15 total / 53 models): NVIDIA NIM, OVHcloud AI
11
+ Endpoints, LLM7, Ollama Cloud, Z.ai/Zhipu GLM, LongCat; expanded model lists
12
+ for Groq, Cerebras, OpenRouter, GitHub Models, SambaNova, Mistral, Gemini.
13
+ - **Keyless / zero-setup providers.** OVHcloud works with no API key
14
+ (anonymous); LLM7's key is optional. `pip install llmbuffet && llmbuffet ask`
15
+ now works with no signup at all. Catalog gains `auth` and `key_optional`.
16
+ - **Model selection.** New `llmbuffet models` lists every `provider/model` id;
17
+ `ask -m provider/model` pins an exact model on an exact provider.
18
+ - **Streaming proxy.** The proxy honors `stream: true` with a buffered
19
+ OpenAI-style SSE stream, so stream-only clients (chat UIs, agents) work.
20
+ - **429 cooldown.** A rate-limited provider is deprioritized for a cooldown
21
+ window instead of being retried immediately.
22
+ - **Reasoning-model handling.** Thinking models get a `max_tokens` floor and
23
+ `<think>…</think>` blocks are stripped from output.
24
+ - `llmbuffet ask --json` requests JSON and strips code fences.
25
+
26
+ ### Hardening (post-review)
27
+ - Proxy now validates all request fields and returns OpenAI-style `400`s for
28
+ malformed input; a catch-all ensures no request can kill a server thread.
29
+ - Optional proxy auth: `--api-key` / `LLMBUFFET_PROXY_KEY` requires a Bearer
30
+ token; a warning fires when binding to a non-loopback host without one.
31
+ - Quota store is now thread-safe (lock + unique temp file) and best-effort, so
32
+ a persistence hiccup can't abort a successful completion.
33
+ - A provider that returns `429` has its remaining models skipped for that
34
+ request; cooldowns update under a lock with `max()`.
35
+ - Verified live against 11 providers + the OpenAI SDK (non-streaming & SSE).
36
+ Fixed the LongCat model id (`LongCat-2.0-Preview`); LLM7 leads the keyless
37
+ pool (most reliable zero-key provider).
38
+
39
+ ## [0.1.0] — 2026-06-02
40
+
41
+ Initial release.
42
+
43
+ ### Added
44
+ - Provider catalog (`providers.toml`) covering 9 free-tier providers and 24
45
+ models: Groq, Cerebras, OpenRouter, Google Gemini, GitHub Models, Cloudflare
46
+ Workers AI, Mistral, Cohere, SambaNova.
47
+ - Quota-aware, least-used-first router with automatic failover across providers.
48
+ - Persistent per-provider/day quota tracking (`~/.config/llmbuffet/quota.json`,
49
+ resets at UTC midnight).
50
+ - OpenAI-compatible proxy server (`llmbuffet proxy`) exposing
51
+ `/v1/chat/completions` and `/v1/models` — a drop-in `OPENAI_BASE_URL`.
52
+ - CLI: `ask`, `providers`, `quota`, `proxy`.
53
+ - Python API: `from llmbuffet import Buffet`.
54
+ - Three request/response adapters (openai, gemini, cloudflare) and per-user
55
+ catalog overrides via `~/.config/llmbuffet/providers.toml`.
56
+ - Full unit-test suite with a faked transport (no network) and CI on Python
57
+ 3.11–3.13.
@@ -0,0 +1,59 @@
1
+ # Contributing to llmbuffet
2
+
3
+ Thanks for helping! The two highest-value contributions are **adding free
4
+ providers** and **keeping the existing catalog accurate** as free tiers drift.
5
+
6
+ ## Dev setup
7
+
8
+ ```bash
9
+ git clone https://github.com/0xzr/llmbuffet
10
+ cd llmbuffet
11
+ python -m venv .venv && source .venv/bin/activate
12
+ pip install -e ".[dev]"
13
+ pytest # 0 network calls — everything is faked
14
+ ruff check src tests
15
+ ```
16
+
17
+ ## Adding a provider
18
+
19
+ The whole catalog is [`src/llmbuffet/providers.toml`](src/llmbuffet/providers.toml).
20
+ Most providers are OpenAI-compatible, so adding one is just a TOML block:
21
+
22
+ ```toml
23
+ [[provider]]
24
+ id = "myprovider"
25
+ label = "My Provider"
26
+ adapter = "openai" # "openai" | "gemini" | "cloudflare"
27
+ base_url = "https://api.myprovider.ai/v1"
28
+ key_env = "MYPROVIDER_API_KEY" # env var the user sets; never a key
29
+ models = [
30
+ { name = "some-model", rpd = 0 }, # rpd = free daily request hint, 0 = unknown
31
+ ]
32
+ ```
33
+
34
+ Rules of thumb:
35
+
36
+ - **Free tier only.** llmbuffet is about free pools. If a provider needs a card
37
+ on file to use the tier, it doesn't belong in the default catalog.
38
+ - **Never commit a key.** Only the *name* of the env var goes in the catalog.
39
+ - If the provider isn't OpenAI-compatible, it needs a small adapter in
40
+ [`src/llmbuffet/client.py`](src/llmbuffet/client.py) (see the `gemini` one for
41
+ a ~30-line template) and a unit test in `tests/`.
42
+ - Add the env var to [`.env.example`](.env.example) and the signup steps to
43
+ [`docs/ACCOUNTS.md`](docs/ACCOUNTS.md).
44
+
45
+ ## Fixing a stale limit or endpoint
46
+
47
+ Free tiers change constantly. If a model name, base URL, or daily limit is
48
+ wrong, a one-line PR to `providers.toml` is perfect and very welcome.
49
+
50
+ ## Tests
51
+
52
+ Every code path is unit-tested without touching the network via an injected
53
+ fake transport (`tests/helpers.py`). Please keep it that way — new behavior
54
+ should come with a fake-backed test. Run `pytest` and `ruff check` before
55
+ opening a PR.
56
+
57
+ ## Code of conduct
58
+
59
+ Be kind. Assume good faith. We're all here to make free LLMs easier to use.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 0xzr (github.com/0xzr)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,240 @@
1
+ Metadata-Version: 2.4
2
+ Name: llmbuffet
3
+ Version: 0.2.0
4
+ Summary: An all-you-can-eat buffet of free-tier LLM APIs behind one OpenAI-compatible endpoint, with automatic failover and quota tracking.
5
+ Project-URL: Homepage, https://github.com/0xzr/llmbuffet
6
+ Project-URL: Repository, https://github.com/0xzr/llmbuffet
7
+ Project-URL: Issues, https://github.com/0xzr/llmbuffet/issues
8
+ Author: 0xzr
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: cerebras,failover,free,gateway,gemini,groq,llm,load-balancer,openai,openrouter,proxy,router
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Libraries
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: httpx>=0.27
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=8.0; extra == 'dev'
25
+ Requires-Dist: ruff>=0.6; extra == 'dev'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # 🍽️ llmbuffet — one free LLM API gateway for every free tier
29
+
30
+ **A free, OpenAI-compatible LLM gateway that pools 15 free-tier providers (Groq, Cerebras, NVIDIA NIM, Gemini, OpenRouter, GitHub Models, Cloudflare & more) behind one endpoint — with automatic failover and quota tracking. Works out of the box with zero API keys.**
31
+
32
+ [![CI](https://github.com/0xzr/llmbuffet/actions/workflows/ci.yml/badge.svg)](https://github.com/0xzr/llmbuffet/actions/workflows/ci.yml)
33
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
34
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org)
35
+
36
+ > Stop juggling a dozen free LLM SDKs and rate limits. Point your OpenAI client at `llmbuffet` and never pay for a hobby project's inference again.
37
+
38
+ Groq, Cerebras, Google Gemini, OpenRouter, GitHub Models, Cloudflare Workers AI, Mistral, Cohere, SambaNova — each hands out a generous **free tier**, but each has its own SDK, its own rate limits, and its own daily cap. `llmbuffet` puts all of them into one pool:
39
+
40
+ - 🔌 **One OpenAI-compatible endpoint.** Point any existing OpenAI SDK / tool at `llmbuffet` and it just works — no code changes.
41
+ - 🔁 **Automatic failover.** Hit a rate limit or a 5xx on one provider? `llmbuffet` transparently moves to the next.
42
+ - 📊 **Quota-aware routing.** Spreads load least-used-first and respects each provider's free daily limit, so you squeeze the most out of every tier.
43
+ - 🧩 **One catalog, your keys.** Drop in the keys you have; `llmbuffet` skips the rest. No key is ever stored in the repo.
44
+ - 🪶 **Tiny.** Pure-Python, one dependency (`httpx`). The proxy runs on the standard library.
45
+
46
+ > Why it exists: stitching together a dozen free LLM tiers by hand is fiddly and breaks constantly. `llmbuffet` makes "never pay for a hobby project's LLM calls again" a one-command setup.
47
+
48
+ ---
49
+
50
+ ## Install
51
+
52
+ ```bash
53
+ pip install llmbuffet # or: pipx install llmbuffet
54
+ ```
55
+
56
+ ## Zero-config: it works with no keys at all
57
+
58
+ Two providers in the catalog need **no signup** (OVHcloud is keyless; LLM7's key is optional), so this works the moment you install:
59
+
60
+ ```bash
61
+ pip install llmbuffet
62
+ llmbuffet ask "Explain the CAP theorem in one sentence."
63
+ ```
64
+
65
+ Add provider keys (below) to unlock more models, higher limits, and better failover.
66
+
67
+ ## 60-second quickstart (with keys)
68
+
69
+ 1. Grab one or more free API keys — **all free, no credit card**. You only need
70
+ **one** to start (Groq and Cerebras are the fastest to sign up for).
71
+ 👉 **[docs/ACCOUNTS.md](docs/ACCOUNTS.md) has 1-minute, click-by-click steps for every provider.**
72
+
73
+ | Provider | Get a key |
74
+ |---|---|
75
+ | Groq | <https://console.groq.com/keys> |
76
+ | Cerebras | <https://cloud.cerebras.ai> |
77
+ | OpenRouter | <https://openrouter.ai/keys> |
78
+ | Google Gemini | <https://aistudio.google.com/apikey> |
79
+ | GitHub Models | any GitHub PAT |
80
+
81
+ 2. Export the ones you have (see [`.env.example`](.env.example) for all of them):
82
+
83
+ ```bash
84
+ export GROQ_API_KEY=gsk_...
85
+ export CEREBRAS_API_KEY=csk-...
86
+ ```
87
+
88
+ 3. Ask something:
89
+
90
+ ```bash
91
+ llmbuffet ask "Explain the CAP theorem in one sentence."
92
+ ```
93
+
94
+ or pipe context in:
95
+
96
+ ```bash
97
+ cat error.log | llmbuffet ask "What's the root cause here?"
98
+ ```
99
+
100
+ Check what's wired up:
101
+
102
+ ```bash
103
+ llmbuffet providers
104
+ ```
105
+
106
+ ```
107
+ llmbuffet catalog: 15 providers, 53 models
108
+
109
+ ✓ ovh OVHcloud AI Endpoints (keyless) 5 models [configured]
110
+ ✓ llm7 LLM7 (key optional) 1 models [configured]
111
+ · groq Groq 6 models [set GROQ_API_KEY]
112
+ · cerebras Cerebras 4 models [set CEREBRAS_API_KEY]
113
+ · nvidia NVIDIA NIM 5 models [set NVIDIA_API_KEY]
114
+ ...
115
+ ```
116
+
117
+ ## Choosing a model or provider
118
+
119
+ By default llmbuffet auto-picks the least-used provider you have. To pin a choice:
120
+
121
+ ```bash
122
+ llmbuffet models # list every provider/model id
123
+ llmbuffet ask -m groq/llama-3.3-70b-versatile "hi" # exact provider + model
124
+ llmbuffet ask -m llama-3.3-70b-versatile "hi" # that model on any provider
125
+ llmbuffet ask -p cerebras,groq "hi" # restrict to these providers
126
+ ```
127
+
128
+ Same idea through the proxy via the OpenAI `model` field: `"auto"`, `"groq"`, or `"groq/llama-3.3-70b-versatile"`.
129
+
130
+ ### Providers in the box
131
+
132
+ | Provider | Key env | Notes |
133
+ |---|---|---|
134
+ | OVHcloud AI Endpoints | — | **keyless**, works out of the box |
135
+ | LLM7 | `LLM7_API_KEY` | key optional |
136
+ | Groq | `GROQ_API_KEY` | very fast |
137
+ | Cerebras | `CEREBRAS_API_KEY` | very fast, large daily cap |
138
+ | NVIDIA NIM | `NVIDIA_API_KEY` | big model catalog (build.nvidia.com) |
139
+ | OpenRouter | `OPENROUTER_API_KEY` | many `:free` models |
140
+ | Google Gemini | `GEMINI_API_KEY` | generous free tier |
141
+ | GitHub Models | `GITHUB_TOKEN` | any PAT works |
142
+ | Cloudflare Workers AI | `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` | |
143
+ | Mistral | `MISTRAL_API_KEY` | |
144
+ | Cohere | `COHERE_API_KEY` | |
145
+ | SambaNova | `SAMBANOVA_API_KEY` | |
146
+ | Z.ai / Zhipu GLM | `ZHIPU_API_KEY` | |
147
+ | Ollama Cloud | `OLLAMA_API_KEY` | |
148
+ | LongCat (Meituan) | `LONGCAT_API_KEY` | |
149
+
150
+ Full signup steps for each: **[docs/ACCOUNTS.md](docs/ACCOUNTS.md)**.
151
+
152
+ ## The killer feature: a drop-in OpenAI proxy
153
+
154
+ Run the gateway:
155
+
156
+ ```bash
157
+ llmbuffet proxy --port 8080
158
+ ```
159
+
160
+ Now point **any** OpenAI-compatible app or SDK at it — no other changes:
161
+
162
+ ```bash
163
+ export OPENAI_BASE_URL=http://localhost:8080/v1
164
+ export OPENAI_API_KEY=anything # llmbuffet ignores it
165
+ ```
166
+
167
+ ```python
168
+ from openai import OpenAI
169
+
170
+ client = OpenAI() # picks up OPENAI_BASE_URL
171
+ resp = client.chat.completions.create(
172
+ model="auto", # or "groq", or "groq/llama-3.3-70b-versatile"
173
+ messages=[{"role": "user", "content": "Say hi in French."}],
174
+ )
175
+ print(resp.choices[0].message.content)
176
+ ```
177
+
178
+ The `model` field controls routing:
179
+
180
+ | `model` value | Routes to |
181
+ |---|---|
182
+ | `auto` (or omitted) | any configured provider, least-used first |
183
+ | `groq` | any model on Groq |
184
+ | `groq/llama-3.3-70b-versatile` | that exact model |
185
+ | `llama-3.3-70b-versatile` | that model on any provider that has it |
186
+
187
+ ## Use it as the free LLM backend for your AI agent
188
+
189
+ Coding agents and agent frameworks (aider, Continue, Cline, the OpenAI Agents SDK, LangChain, ...) almost all speak the OpenAI API — so they can run on pooled free inference through `llmbuffet`, with **failover when one provider rate-limits you mid-run** (exactly when long agent loops tend to die):
190
+
191
+ ```bash
192
+ llmbuffet proxy --port 8080
193
+ export OPENAI_BASE_URL=http://localhost:8080/v1 OPENAI_API_KEY=anything
194
+ aider --model openai/auto # or point any OpenAI-compatible tool here
195
+ ```
196
+
197
+ The proxy supports `stream: true` (Server-Sent Events), so streaming chat UIs and agent loops work too. Full integration snippets (aider, LangChain, Continue/Cline, OpenAI Agents SDK) are in **[docs/AGENTS.md](docs/AGENTS.md)**.
198
+
199
+ ## Use it as a library
200
+
201
+ ```python
202
+ from llmbuffet import Buffet
203
+
204
+ buffet = Buffet.from_default_config()
205
+ reply = buffet.ask("Summarize the plot of Hamlet in 20 words.")
206
+ print(reply.text)
207
+ print(f"served by {reply.provider_id}/{reply.model}")
208
+ ```
209
+
210
+ ## How routing works
211
+
212
+ For each request `llmbuffet` builds the list of `(provider, model)` candidates you have keys for, orders them **least-used-today first** (providers already over their free daily hint sink to the bottom), then tries them in order until one returns a non-empty completion. Every success is recorded to a small per-day counter at `~/.config/llmbuffet/quota.json` (reset at UTC midnight). See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for the full picture.
213
+
214
+ ## Adding or overriding providers
215
+
216
+ The built-in catalog lives in [`src/llmbuffet/providers.toml`](src/llmbuffet/providers.toml). To add a provider or override a model list without forking, drop a `providers.toml` at `~/.config/llmbuffet/providers.toml` (or point `LLMBUFFET_CONFIG` at one). Same-`id` entries override the built-ins; new ids are appended. See [CONTRIBUTING.md](CONTRIBUTING.md) for the (small) anatomy of a provider.
217
+
218
+ ## Comparison
219
+
220
+ | | llmbuffet | Calling each SDK by hand | A paid gateway |
221
+ |---|---|---|---|
222
+ | Free tiers pooled | ✅ 15 providers | ⚠️ you wire each one | ❌ |
223
+ | Automatic failover | ✅ | ❌ | ✅ |
224
+ | Quota tracking | ✅ per-day | ❌ | varies |
225
+ | Drop-in OpenAI proxy | ✅ | ❌ | ✅ |
226
+ | Cost | $0 | $0 | 💸 |
227
+ | Dependencies | 1 (`httpx`) | many | a service |
228
+
229
+ ## Status
230
+
231
+ `llmbuffet` is `0.1` and moving fast. Provider endpoints and free-tier limits drift — if something breaks, please [open an issue](https://github.com/0xzr/llmbuffet/issues) or send a one-line PR to `providers.toml`. Contributions of new free providers are especially welcome.
232
+
233
+ ## Found this useful?
234
+
235
+ ⭐ **Star the repo** — it's the single biggest thing that helps others discover llmbuffet, and it keeps the free-provider catalog maintained. New free providers and one-line limit fixes are always welcome ([CONTRIBUTING.md](CONTRIBUTING.md)).
236
+
237
+ ## License
238
+
239
+ MIT — see [LICENSE](LICENSE).
240
+