Add inference-image MCP server (accessible image generation) + proper favicon sizes
- mcp/image_server.py: generate_image tool via the co-op gateway; per-member key injected through customUserVars (IC_API_KEY) -> env; verified standalone (handshake, tools/list, real 1024x1024 + 1536x1024 images, error paths) - librechat.yaml: register inference-image with startup:false (per-user credentials), 120s timeout - assets/: real favicon sizes (16/32/192), opaque apple-touch 180, padded maskable 512
This commit is contained in:
1 parent
5169915641
commit
5e214e4d7e
8 files changed
+249
-14
No files matched your search
@@ -17,7 +17,7 @@ from this directory.
|
||||
| App config | `/app/data/librechat.yaml` (volume) | yes | `librechat.yaml` |
|
||||
| Env vars (env-file wins!) | `/app/data/env` (volume, sourced LAST by start.sh) | yes | changed lines documented below |
|
||||
| Env vars (Cloudron-managed) | `cloudron env` (process env) | yes | documented below |
|
||||
| MCP docs server | `/app/data/mcp/server.py` (volume) | yes | `mcp/server.py` |
|
||||
| MCP servers | `/app/data/mcp/server.py` + `/app/data/mcp/image_server.py` (volume) | yes | `mcp/` |
|
||||
| Brand assets (logo, favicons) | baked into image overlay | no — rebuilt per image | `assets/` |
|
||||
| CloudronManifest.json | repo only (used by `cloudron update`) | n/a | byte-identical copy of the OFFICIAL appstore manifest |
|
||||
|
||||
@@ -106,13 +106,21 @@ Set via `cloudron env set` (process env):
|
||||
keys, 8 chat modelSpecs (emoji convention shared with models.md).
|
||||
`regolo/qwen-image` 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**: LibreChat exposes image gen through an **Agent with
|
||||
the "OpenAI Image Tools" tool**, not a chat-picker button. Members create
|
||||
an agent, add the tool, and paste their co-op key on first use.
|
||||
- **MCP**: `inference-docs` (stdio, `/app/data/mcp/server.py`, tool
|
||||
`search_docs`) is admin-configured; members may add their own via the MCP
|
||||
Settings panel (the "bring your own tools" pattern). Permissions seeded via
|
||||
`interface.mcpServers` (use/create true, share false).
|
||||
- **Image generation — two paths**:
|
||||
1. **MCP tool (easiest)**: `inference-image` server (tool `generate_image`)
|
||||
— members select it in the composer's **+** palette and just ask. No
|
||||
agent setup. First use: save your co-op key in the MCP panel
|
||||
(customUserVars `IC_API_KEY`, injected per-user into the server process
|
||||
env; `startup: false` because the key only exists per-user after they
|
||||
configure it). Bills to the member's own key (~1–2¢/image at 1024²).
|
||||
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
|
||||
image only inside the agent conversation.
|
||||
- **MCP**: `inference-docs` (tool `search_docs`, starts at boot) and
|
||||
`inference-image` (tool `generate_image`, per-user startup). Members may
|
||||
add their own via the MCP Settings panel ("bring your own tools").
|
||||
Permissions seeded via `interface.mcpServers` (use/create true, share false).
|
||||
- **Speech**: TTS `tinfoil/voxtral-tts` (voice `casual_female`), STT
|
||||
`tinfoil/whisper-large-v3-turbo`, both via the gateway with the capped key.
|
||||
- **Web search**: SearXNG (self-hosted) + keyless Keenable scraper, no reranker.
|
||||
@@ -124,10 +132,10 @@ Set via `cloudron env set` (process env):
|
||||
|
||||
## Known state / limitations
|
||||
|
||||
- `patches/`, `logo.png`, `logo-coop.png`, `logo.svg` (repo root) are legacy
|
||||
leftovers from the abandoned 2026-10-18 hand-built-image attempt — unused,
|
||||
pending cleanup.
|
||||
- The `[schedules]` Redis guard error is resolved by
|
||||
`SCHEDULES_SINGLE_PROCESS=true` (above).
|
||||
- The `RAG API not reachable` warning is expected (no rag_api addon); it only
|
||||
affects LibreChat's own file-RAG, which we do not use.
|
||||
- The `inference-image` MCP server logs `Tools: undefined` at boot — expected:
|
||||
with `startup: false` it registers but only spawns per-user after a member
|
||||
saves their key and reinitializes in the MCP panel.
|
||||
Reference in new issue
Block a user