← Back to Leaderboard
Chuggingface

huggingface/chat-ui

Self-hosted SvelteKit chat for OpenAI-compatible model backends

Engineering Health (Methodology)
A+ · 93/100
Maintenance Activity
● Updated today
Latest Release
v0.10.0
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption24/25
Release Cadence14/20
License Clarity20/20
DockerSelf-HostedAPI1 README badge views (30d)
Total Stars
★ 11,070
24h Growth
+3
7d Growth
+16
Forks
1,729

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

huggingface/chat-ui Star History (2023-05-10 - 2026-12-01) ALL-TIME STAR HISTORY (2023-05 – 2026-12) +11.1k in 1301d · avg +9/day 11.7k 5.8k 0 2023-05-10: ★ 12023-07-29: ★ 3,0392023-10-21: ★ 3,6352024-01-13: ★ 4,5032024-04-06: ★ 5,5132024-06-29: ★ 6,4802024-09-21: ★ 6,9832024-12-14: ★ 7,4952025-03-08: ★ 8,1082025-05-31: ★ 8,5472025-08-23: ★ 8,8852025-11-15: ★ 10,0882026-02-07: ★ 10,3522026-05-02: ★ 10,5772026-07-25: ★ 10,7742026-10-17: ★ 10,9632026-12-01: ★ 11,070 ★ 11.1k 2023-05 2025-02 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Hugging Face Chat UI is the TypeScript/SvelteKit application behind HuggingChat. It handles the browser-facing conversation experience and server-side orchestration, while a separate OpenAI-compatible backend performs inference. The openai dependency matches that API boundary: the application discovers models at ${OPENAI_BASE_URL}/models and streams responses from the selected model. MongoDB is the application’s persistence layer for chat history, users, settings, files, and statistics.

MCP provides a separate extension path for tools, backed by @modelcontextprotocol packages. Chat UI exposes tools to the model through OpenAI-style function calling, calls the relevant MCP server, and feeds the result back to the model. The optional Omni router is local server-side logic rather than another inference service: it selects a route based on request signals and sends the resulting model request through the configured API base URL.

Key Capabilities & Differentiators

The backend can be a hosted endpoint such as the Hugging Face Inference Providers router, OpenRouter, or Poe, or a separately operated service such as llama.cpp server or Ollama’s OpenAI-compatible endpoint. MODELS can override discovered metadata in JSON5 but no longer defines legacy provider integrations or discovers GGUF files. Users can override tool-calling and image-input capability flags per model; those flags do not add missing backend features. v0.10.0 adds per-model reasoning controls, effort settings on capable models, and a bounded viewport for streamed reasoning.

Omni can direct image requests to a multimodal model and requests with MCP enabled to a tool-capable model. Its policy file defines primary and optional fallback models by route; failures can trigger those fallbacks and then a configured global fallback. The UI can display the route and model used. Separately, experimental ML Intern runs machine-learning tasks through Hugging Face Jobs and sandboxes with a per-conversation compute budget.

Trade-offs & Limitations

Compared with ChatGPT, Chat UI gives operators control over the chat interface, branding, application database, and choice of compatible inference endpoint. In exchange, they must operate the app and database and separately manage local inference capacity or hosted API usage. A shared OpenAI-compatible interface reduces integration work, but compatibility is not all-or-nothing: test model discovery, streaming, image input, and tools against the actual endpoint. Omni can select among models exposed behind one API base URL; it does not independently connect to multiple provider endpoints.

Self-hosting the app is not the same as keeping inference and tools on premises. Prompts or files can reach the configured model provider, tool arguments can reach MCP servers, and optional Hugging Face token forwarding introduces an additional credential boundary. Decide which MCP servers users may add and whether to enable token forwarding before a shared rollout. Apache-2.0 covers the application code, not third-party model licenses or service terms.

Hardware & Deployment Guide

For local development, install the Node.js dependencies with npm install, configure OPENAI_BASE_URL and OPENAI_API_KEY in .env.local, and run npm run dev (port 5173 by default). With no MONGODB_URL, embedded MongoDB persists to ./db. The ghcr.io/huggingface/chat-ui-db image bundles MongoDB, listens on port 3000, and uses a volume mounted at /data. The root docker-compose.yml is a development-only MongoDB 8 replica-set service, not a full-stack deployment; the external database guidance names MongoDB 6/7, so validate the database version against the application release you pin.

For a source build, use npm run build and select a SvelteKit adapter if the target runtime requires one; npm run preview is for checking the build. Node.js and MongoDB need capacity for concurrent streams and stored data, while any GPU requirement belongs to the chosen inference backend. v0.9.6 brought API and data-loading refactors, and v0.10.0 expanded the reasoning UI. Before upgrading, verify that older provider-specific configurations have been migrated to the OpenAI-compatible model discovery path.

Model discovery: Populates the picker from ${OPENAI_BASE_URL}/models and supports JSON5 metadata overrides through MODELS.
Persistence: MongoDB stores conversations, users, settings, files, and statistics; the local embedded fallback persists to ./db.
Routing: The optional Omni alias selects default, multimodal, or agentic routes from request signals and tries configured fallbacks through the same API base URL.
Tool integration: MCP servers expose tools that the model invokes via OpenAI-style function calling; results return to the conversation.
Reasoning controls: v0.10.0 adds per-model reasoning toggles, adjustable effort on capable models, and a fixed-height reasoning stream viewport.
Experimental ML workflow: ML Intern can launch Hugging Face Jobs and sandbox runs with a compute budget set per conversation.
Best For

Teams that already have, or plan to operate, an OpenAI-compatible endpoint and want a branded chat workspace with control over application data, optional model routing, and MCP tools.

Skip If

You want a fully managed assistant, a single package that also runs the models, or direct integrations with providers that do not expose the compatible API.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodologyReport inaccuracy

Quick Start & Installation

DockerSelf-HostedAPI
git clone https://github.com/huggingface/chat-ui
cd chat-ui
npm install
npm run dev -- --open

Comparison vs. Top Chat UI & AI Apps Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
chat-ui ★11.1k+16TypeScriptApache-2.0Self-hosted SvelteKit chat for OpenAI-compatible model backends
LibreChat47.7k+222TypeScriptMITA self-hosted AI chat workspace for multiple model providers and MCP tools
jan46.3k+226Rust—Tauri desktop chat with local LLM inference and an OpenAI-compatible API
NextChat89k+40TypeScriptMITSelf-host a Next.js chat client for cloud and private model APIs

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/huggingface/chat-ui.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

huggingface/chat-ui Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about chat-ui

How do I connect an existing inference server?

Set OPENAI_BASE_URL to the backend’s OpenAI-compatible API root and supply OPENAI_API_KEY as required by that backend. Check that /models lists the intended models, then test streaming chat and any capabilities you plan to expose, such as image input or function calling. MODELS accepts JSON5 metadata overrides for discovered models; it does not restore legacy provider-specific configuration.

Does Chat UI need a GPU or dedicated VRAM?

No GPU is required on the Chat UI host when inference runs on a separate backend. Size the Node.js and MongoDB deployment for concurrent streams, file usage, and retained conversations. If inference shares the host, size it separately: GPU and VRAM requirements depend on the inference engine, model, quantization, context length, and concurrency.

Can we deploy a branded version commercially, and what does self-hosting cover?

Apache-2.0 permits commercial use and modification. If you redistribute the software or a modified build, comply with its license and notice requirements. Review model licenses and API provider terms separately. Self-hosting Chat UI and MongoDB does not keep prompts or attachments on your infrastructure if the configured inference API or an enabled tool receives them.

When is Chat UI a better fit than ChatGPT?

Choose ChatGPT if you want a managed service and do not need to run the application or choose its inference backend. Choose Chat UI if you want to operate the chat interface and its database, apply your own branding, and connect a compatible backend. Treat it as an alternative for the chat workflow, not a drop-in replacement for every ChatGPT feature.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining huggingface/chat-ui? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature huggingface/chat-ui on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare