diff --git a/README.md b/README.md index e336ddc..21a21ed 100644 --- a/README.md +++ b/README.md @@ -232,14 +232,14 @@ needed. is deliberately NOT in the chat picker (image models are not chat models; chat-calling it was the source of the old 500s). - **Image generation — two paths**: - 1. **MCP tool (default, no key ever, no gate)**: `inference-image` server - (tool `generate_image`) — members select it in the composer's **+** - palette and just ask. Images bill to the co-op SYSTEM key - (`SYSTEM_IMAGE_KEY`, LiteLLM alias `system-image-fallback`, $5/30d, - `regolo/qwen-image` only). No `customUserVars` gate: it made the credential - REQUIRED and blocked the whole server for any not-yet-seeded member - (first-login gap) before the fallback could run, and v0.8.8 has no - optional-flag escape hatch. + 1. **MCP tool (default, no key ever)**: `inference-image` server (tool + `generate_image`) — members select it in the composer's **+** palette + and just ask. Per-member billing via `customUserVars.IC_API_KEY` (seeded + from the portal) + `env: IC_API_KEY: "{{IC_API_KEY}}"`; a system-key + fallback (`system-image-fallback`, $5/30d) covers the rare empty-value + case. The `customUserVars` gate blocks a not-yet-seeded member until the + next sync (≤10 min) — accepted as a short delay over billing everything + to the system account. 2. **Agent tool**: LibreChat's built-in "OpenAI Image Tools" (env `IMAGE_GEN_OAI_BASEURL`/`IMAGE_GEN_OAI_MODEL` → gateway; no admin key, members paste their own). Note LibreChat v0.8.8 renders the generated @@ -268,10 +268,9 @@ member's own portal-provisioned key automatically: - `keys` collection: `{userId, name: "Inference Co-op", value: encrypt(JSON.stringify({apiKey}))}` — consumed by the chat endpoint (`apiKey: "user_provided"` in the yaml). - `pluginauths` collection: `{userId, pluginKey: "mcp_inference-image", - authField: "IC_API_KEY", value: encrypt(key)}` — currently INERT: image - generation bills to the system key instead (see Feature notes), so this - row is only written for forward-compatibility if per-member image billing - is re-enabled later. + authField: "IC_API_KEY", value: encrypt(key)}` — consumed by the MCP + `customUserVars` config so image generation bills to the member's own + team. Encryption uses LibreChat's own scheme (`CREDS_KEY`/`CREDS_IV`, AES-256-CBC via `@librechat/data-schemas` `encrypt()`), read from the app process env (`/proc/1/environ`) because `cloudron exec` sessions don't inherit it.