From 7f4887fa0dcd9b0b9e54212a2b2557c3824a1a79 Mon Sep 17 00:00:00 2001 From: Botbot Date: Tue, 1 Sep 2026 08:43:45 -0600 Subject: [PATCH] Add self-serve portal + monetization gap analysis to LiteLLM component --- inference-coop/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/inference-coop/README.md b/inference-coop/README.md index 1c1d8a4..d36b9d8 100644 --- a/inference-coop/README.md +++ b/inference-coop/README.md @@ -414,6 +414,30 @@ Sources: [LiteLLM](https://www.litellm.ai/), [LiteLLM + Ollama gateway guide](ht 5. **Model governance** — LiteLLM's model access control lets the cooperative decide which models each tier can access. Members vote on model selection in Loomio; admins update LiteLLM config to reflect decisions. +### Gap: self-serve portal and monetization + +LiteLLM is the best AI-native gateway (model routing, token metering, fallback, virtual keys), but it is weak on two capabilities that are load-bearing for a cooperative where members are also API customers: + +1. **Self-serve portal** — LiteLLM's admin UI is for *admins* creating keys. There is no clean way for a member to log in, see their own usage, and generate/rotate/revoke their own key. +2. **Monetization** — LiteLLM tracks spend but does not *bill*. No payment, no invoice, no subscription lifecycle. + +**Why not add a separate API gateway (Zuplo, Tyk, Kong)?** + +| Option | Self-hostable? | AI-native routing | Self-serve portal | Monetization | +|--------|---------------|-------------------|-------------------|-------------| +| LiteLLM alone | ✅ | ✅ | ❌ (admin UI only) | ❌ (tracks, doesn't bill) | +| LiteLLM + Tyk/Kong | ✅ | ✅ (LiteLLM) | ✅ | ✅ | +| LiteLLM + Zuplo | ❌ (Zuplo is SaaS) | ✅ | ✅ | ✅ | +| LiteLLM + custom portal | ✅ | ✅ | ✅ (build it) | ⚠️ (via Open Collective) | + +- **Zuplo is out** — hosted SaaS, conflicts with the self-hostable, no-external-dependencies design. A cooperative should not route member API keys through a third-party SaaS. +- **Tyk/Kong is a real option but adds a second gateway** — self-hostable with proper developer portals and monetization, but general-purpose (not AI-native) and oriented toward commercial API products, not cooperative membership. Two systems to operate. +- **Custom portal is smaller than it sounds** — LiteLLM already does the hard part (metering, virtual keys, budgets). The portal is a thin web app: login (Cloudron SSO), "generate/rotate/revoke my key" (calls LiteLLM's key API), "my usage" (reads LiteLLM spend data), "my membership" (Open Collective status). ~300-500 lines, and it's the same middleware already planned for the Open Collective webhook — one build, not two. + +**Monetization = Open Collective + LiteLLM spend data.** Open Collective handles the actual money (recurring membership, fiscal sponsorship). LiteLLM's spend tracking gives per-member usage. The middleware reconciles the two: if a member's usage exceeds their tier, or their payment lapses, the middleware adjusts their LiteLLM budget or disables their key. + +**Decision:** Keep LiteLLM as the single AI gateway. Build the self-serve portal + billing reconciliation as part of the middleware (Component 5). Revisit Tyk/Kong only if the cooperative grows to need a full developer portal (docs, tiered self-serve plans, usage dashboards) — at which point the operational cost of a second gateway becomes justified. + ### Architecture with LiteLLM ```