huggingface

chat-ui: Build a Web Interface for OpenAI-Compatible LLMs

Chat UI is a SvelteKit application for chatting with models through OpenAI-compatible APIs. It powers HuggingChat and can be self-hosted with a compatible model service, optional MongoDB, and configurable tools.

TypeScriptApache-2.0LLMWeb AppChatbot
View on GitHub Compare
Stars
11k
Forks
1.7k
Stars, last 30 days
+51

Our take

Health score

70/100

How it is scored
Activity
67
Community
85
Issues
46
Pull requests
80

+51 stars in the last 30 days

  • Merges more pull requests than 88% of the projects we track
  • More contributors than 78% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

11,039

Forks

1,717

Change since Nov 16, 2026: +2 stars·-1 forks

Overview

Chat UI is a TypeScript and SvelteKit web application for interacting with large language models. It powers HuggingChat and gives teams a customizable interface they can run against their own OpenAI-compatible API service.

It is suited to people who want more than a basic chat page, including persistent conversations, model selection, optional MCP tools, and configurable routing. It does not provide its own model inference: you connect it to a compatible endpoint.

Key Features

  • Connects to services that expose an OpenAI-compatible API and /models endpoint.
  • Discovers models from the configured API and supports optional model metadata overrides.
  • Stores chat history, users, settings, files, and stats in MongoDB, with an embedded MongoDB fallback for local development.
  • Supports MCP servers and OpenAI function calling for tool-enabled models.
  • Offers optional local heuristic routing through the Omni model alias, including routes for multimodal and tool-enabled requests.
  • Allows basic branding and appearance configuration through environment variables.
  • Includes ML Intern mode for machine-learning tasks on the Hugging Face Hub; this mode is experimental.

Use Cases

  • A developer can run a local chat interface against an OpenAI-compatible service such as llama.cpp or Ollama.
  • A team can provide a shared chat app connected to a managed MongoDB deployment and its chosen model API.
  • An organization can create a branded chat experience with configured models and trusted MCP servers.
  • Hugging Face users can explore ML Intern workflows for reproducing papers, fine-tuning, evaluation, datasets, or demo deployment.

Getting Started

Configure an OpenAI-compatible endpoint in .env.local, then install and start the app:

npm install
npm run dev -- --open

See the repository README for configuration, database, Docker, and deployment details.

Alternatives

  • LibreChat: LibreChat supports multiple AI providers and adds agents, file workflows, and multi-user controls, while chat-ui centers on OpenAI-compatible APIs.
  • anse: Anse supports multiple AI services and image generation, with chat sessions stored locally, rather than focusing on OpenAI-compatible APIs.
  • Hollama: Hollama runs in the browser and connects to Ollama or OpenAI servers, while chat-ui is a SvelteKit app that can be self-hosted.
ProjectLanguageLicenseStarsStatus
chat-uiTypeScriptApache-2.011kNot checked yet
LibreChatTypeScriptMIT46.1kActive
anseTypeScriptMIT2kInactive
hollamaTypeScriptMIT1.2kActive

Considerations

  • The app requires an OpenAI-compatible API endpoint. Provider-specific integrations and legacy model-discovery paths are not supported by the current version.
  • Production use requires configuring a suitable model service and, for persistent application data, MongoDB. The embedded database fallback is described as a local-development option.
  • Tool calling and multimodal support depend on the connected model and its configuration.
  • ML Intern is explicitly experimental and involves Hugging Face Hub jobs and compute budgets.

Found this useful?

Share it with someone who would like chat-ui.

Comparisons