Guest cap $5 -> $2: GUEST_BUDGET default, emails, docs, tests

This commit is contained in:
inference-bot committed 2026-11-08 20:12:47 +00:00
1 parent 0f12c63f5e
commit 6be8e2d632
6 files changed
+45 -45

No files matched your search

+3 -3
View File
@@ -50,7 +50,7 @@ LibreChat ──→ Member Portal ──→ LiteLLM ──→ backend
| `ALLOWANCE_POLICY` | `report` (default) \| `on`. `report` computes every allowance decision and changes nothing; `on` performs renewals and sends the one reminder. Deactivation is gated separately by `ALLOWANCE_DEACTIVATE`. |
| `ALLOWANCE_DEACTIVATE` | `off` (default) \| `on`. When `on`, a member who was reminded and is still unpaid after the grace window is moved to the inactive group. **Defaults off so renewals/reminders can run before anyone loses access.** |
| `PAYMENT_GRACE_DAYS` | Days after the single reminder before an unpaid member is deactivated (default `7`). |
| `GUEST_BUDGET` | Guest-account credit in USD (default `5.0`). |
| `GUEST_BUDGET` | Guest-account credit in USD (default `2.0`). |
| `GUEST_DAYS` | Guest-account time box in days from provisioning (default `60`). The sweep deactivates an expired guest even with credits left. |
| `GUEST_PER_INVITER_DAYS` | Rolling window for the one-guest-per-inviter limit (default `30`). |
| `GUESTS_GROUP_ID` | Cloudron group ID for guest accounts. The chat and dashboard apps' access restrictions list BOTH the members and guests groups, so a guest reaches exactly those two apps. |
@@ -58,12 +58,12 @@ LibreChat ──→ Member Portal ──→ LiteLLM ──→ backend
## Guest accounts
A member can give a friend access to the co-op with $5 of credits — no Open
A member can give a friend access to the co-op with $2 of credits — no Open
Collective membership required. `POST /admin/provision-guest` (X-Admin-Token)
with `{"email", "name", "inviter": "<the guest access member's email>"}` runs the
guest pipeline: Cloudron user in the **guests** group, a LiteLLM team capped at
`GUEST_BUDGET` with **no monthly reset** (the cap is the guest's whole life), the
portal row marked `account_type='guest'` with the $5 held as non-expiring
portal row marked `account_type='guest'` with the $2 held as non-expiring
credit, `guest_expires_at` set to now + `GUEST_DAYS`, the guest welcome email
(setup link, what they can use, Become-a-member, newsletter note), and a
**guests ledger** row (`guests` table: inviter → recipient, expiry, status) for