LobeChat
Self-hosted chat UI pointed at Melious through its OpenAI provider — three env vars on the container and the model picker fills itself
LobeChat is an open-source chat UI you run yourself: one Docker container, conversation branching, agents, plugins, vision and file upload, and a provider system that speaks OpenAI, Anthropic, and a long tail of others. Its OpenAI provider accepts a base-URL override, which is the door Melious walks through — three environment variables on the container and every chat routes through us.
Setup
Run LobeChat against Melious
docker run -d --name lobe-chat -p 3210:3210 \
-v lobe-chat-data:/app/.lobehub \
-e OPENAI_API_KEY=sk-mel-<YOUR_API_KEY> \
-e OPENAI_PROXY_URL=https://api.melious.ai/v1 \
-e OPENAI_MODEL_LIST=-all,+glm-5.3,+qwen3.5-122b-a10b,+deepseek-v4.1-flash,+gpt-oss-120b \
lobehub/lobe-chatCreate a key at Account → API keys first. Keys are shown once. If you lose it, rotate it — there's no recovery button.
OPENAI_MODEL_LIST is doing real work here, not decoration. -all clears LobeChat's built-in OpenAI catalog, and each + adds a Melious model. Skip it and the picker offers you gpt-4o against an endpoint that has never heard of it. The same syntax renames: +glm-5.3=GLM 5.3.
The volume matters too: LobeChat keeps accounts, chats, and settings under /app/.lobehub, so without it everything is lost when the container is recreated.
You can set the same two values per-user in Settings → Language Model → OpenAI instead, under API Key and API Proxy Address. Environment variables apply to everyone on the instance, which is what you want for a shared deployment.
Point the system assistant at Melious
Open Settings → System Assistant. Its models default to LobeChat's own bundled providers — OpenRouter and OpenAI models we don't serve — so topic naming, history summarization and translation fail while your actual chats work. Point each one at a Melious model from the list above.
Pick a model and chat
Open http://localhost:3210, click the model tag in the chat header, and pick one of the models you listed. That's it.
Reasoning models render their thinking as a collapsible block above the answer, because we return it in reasoning_content and LobeChat knows that field.
A native Melious provider is on the way
We're contributing Melious as a built-in LobeChat provider — its own entry in the provider list, the catalog filtered to chat models, and capability flags and context windows already filled in. It targets LobeChat's development branch, so it won't reach the lobehub/lobe-chat image for a while. Until then, the OpenAI provider override above is the way in, and this page will tell you when that changes.
Picking models
We'd keep the enabled list short. LobeChat shows every model you list in one flat picker, and a shared instance is more pleasant with six good options than sixty.
glm-5.3 is a solid general default. Add a cheap one for high-volume chat (gpt-oss-120b, qwen3.5-9b), a long-context one if you paste large documents, and a vision-capable one if people share screenshots. Capabilities and prices are at melious.ai/hub/models, or filter GET /v1/models?include_meta=true by _meta.capabilities.
One thing to know before you reach for Get Model List in the OpenAI settings: it pulls our whole catalog, not just chat models — embeddings, image, audio, and guardrail models included (bge-*, whisper-*, qwen-image, qwen3guard-*), and LobeChat labels most of them chat because nothing in the OpenAI model shape says otherwise. That's why this guide sets the list explicitly instead.
What's different
- The Connectivity Check fails, and that's expected. It probes OpenAI's own default check model, which we don't serve, so it reports
The request returned empty. Please check if the API proxy address does not end with `/v1`.Your address is fine — ignore the suggestion. Send a real message with a Melious model instead; that's the honest test. - Leave Client-Side Fetching off. Setting the key in the UI makes a Use Client-Side Fetching Mode toggle appear on the OpenAI card. Turning it on breaks the setup twice over: the browser never sees
OPENAI_PROXY_URL(that's server-side), so it callsapi.openai.comwith your Melious key; and if you also paste our base URL into the UI, the browser reaches us and we refuse the preflight, because we allow CORS only from our own origins. Either way you getERR_FAILEDand no reply. LobeChat proxies server-side by default, which is what you want. - Vision works. Attach an image in the composer and a vision-capable model reads it — we checked
qwen3.5-122b-a10bagainst a test image. Models without vision will ignore it, so check the flag on the hub first. - Tool calling uses the standard
tool_callsschema, so LobeChat plugins and agents behave the same against us as against OpenAI. Nearly every chat model we run is flagged for it — the two the catalog doesn't flag today areapertus-70bandqwen2.5-vl-72b-instruct. Check_meta.capabilities.function_callingif you're unsure. - No explicit cache control. There's no field to mark a prefix as cacheable. Prefix caching happens transparently and comes back as
usage.cached_tokens, billed at the cheaper cache-read rate. See Models. - You won't see
environment_impactorbilling_costhere. We attach them to non-streaming completions, and LobeChat always streams — so those fields never reach it. Energy and cost still get recorded; read them in your usage dashboard.usage.cached_tokensdoes come through on the stream.
When it breaks
Invalid role 'developer'— a system-assistant model is still set to an OpenAI one. LobeChat rewrites the system message to thedeveloperrole for that model class, and we reject it. Repoint Settings → System Assistant at a Melious model.- Topics stay named "Default Topic" — same cause. Topic naming is the most visible of those background calls.
Model not found: <id>— shown under "Error requesting OpenAI service" as aProviderBizError. The ID isn't on Melious, usually because it was typed by hand or left over from an older list.GET /v1/modelsfor the canonical set.- The picker shows
gpt-4oand friends —OPENAI_MODEL_LISTis missing its-allprefix, so LobeChat kept its built-in catalog. - 429 under load — rate limits are per plan, not per key, and everyone on a shared instance draws from the same bucket. See Rate limits.
Errors and retry patterns: Errors.