Developers frequently run into the exact same dead end: they open HuggingChat, click through settings, and search for a custom input box where they can paste a private Hugging Face Inference Endpoint URL or a third-party API key. At 365Finds, we understand that frustration. You have a specialized coding model—like Qwen 2.5 Coder or DeepSeek-Coder—deployed on private infrastructure, and you want HuggingChat's clean conversational UI without queuing behind public rate limits.
Here is the reality: the public platform at huggingface.co/chat is a managed showcase service. Its web interface does not allow individual end users to plug arbitrary third-party endpoints or private Inference Endpoints directly into personal UI settings.
To run HuggingChat with your own endpoints, you deploy its open-source foundation: Chat UI (huggingface/chat-ui). It runs seamlessly in a private Hugging Face Space or Docker container, communicates with any OpenAI-compatible backend, and gives you total architectural authority over inference parameters and API routing.
1. Switching to Public Coding Models on Hosted HuggingChat
If your workflow only requires testing leading open-source coding models without hosting private hardware, the hosted HuggingChat web interface provides immediate access:
- Navigate to
https://huggingface.co/chat/and sign in with your Hugging Face credentials. - Click the model selector at the top of the interface or open Settings (
⚙️) > Models. - Select an active coding-specialized model from the curated list, such as Qwen 2.5 Coder 32B Instruct.
- To standardize prompting conventions, go to
/chat/assistants/newand build a dedicated coding assistant. You can assign precise system instructions—such as enforcing type safety, unit test coverage, or specific framework styles—while binding the assistant to that underlying base model.
While this hosted route requires zero setup, 365Finds notes its clear limitations: shared inference pools impose strict rate throttling during peak hours, context window lengths are frequently constrained, and you cannot connect proprietary fine-tuned weights.
2. Connecting Custom Endpoints via a Private Chat UI Instance
When an engineering workflow demands dedicated throughput, proprietary code privacy, or specialized models on custom infrastructure, self-hosting the HuggingChat interface is the established engineering path.
Step 1: Provision Your Dedicated or Third-Party Endpoint
Your model backend must expose an OpenAI-compatible /v1/chat/completions API:
- Hugging Face Inference Endpoints: Deploy your coding model using Text Generation Inference (TGI) or vLLM. Copy the assigned endpoint URL (for example,
https://<endpoint-id>.<region>.endpoints.huggingface.cloud/v1) and create a read-authorized token at Hugging Face Access Tokens Settings (hf_...). - Third-Party / Self-Hosted Endpoints: If utilizing external providers (such as Together AI, OpenRouter, or DeepSeek API) or local runtimes (like Ollama or vLLM), retrieve your provider base URL and API authentication key.
Step 2: Deploy Chat UI to Hugging Face Spaces
- Visit
huggingface.co/new-space, select Docker, and choose the officialchat-uitemplate. - In your Space dashboard, open Settings > Variables and secrets.
- Provide your
HF_TOKENsecret so the container can authenticate against protected endpoints and gated models.
Step 3: Configure Model Endpoints
For a single backend, define universal routing variables:
OPENAI_BASE_URL=https://<endpoint-id>.<region>.endpoints.huggingface.cloud/v1
OPENAI_API_KEY=hf_your_access_token
To configure multiple coding models or blend dedicated Inference Endpoints with third-party providers, define the MODELS environment variable using JSON format:
MODELS=`[
{
"id": "Qwen/Qwen2.5-Coder-32B-Instruct",
"name": "Qwen 2.5 Coder (Dedicated Endpoint)",
"parameters": {
"temperature": 0.2,
"max_new_tokens": 4096
},
"endpoints": [
{
"type": "openai",
"baseURL": "https://<endpoint-id>.<region>.endpoints.huggingface.cloud/v1",
"apiKey": "hf_your_access_token"
}
]
},
{
"id": "deepseek-coder",
"name": "DeepSeek Coder (Third-Party API)",
"parameters": {
"temperature": 0.1,
"max_new_tokens": 8192
},
"endpoints": [
{
"type": "openai",
"baseURL": "https://api.together.xyz/v1",
"apiKey": "your_third_party_key"
}
]
}
]`
3. 365Finds Assessment & Practical Trade-Offs
365Finds recommends choosing your deployment path based on engineering economics rather than convenience alone:
- Public HuggingChat: Zero financial cost. Ideal for individual developers sanity-checking quick snippets or evaluating model quality against consumer benchmarks.
- Inference Endpoints + Chat UI: Superior data security and zero queue latency. Proprietary enterprise code stays within your VPC or dedicated cloud tenant. However, keeping dedicated GPU compute (such as an A10G or A100 instance) running 24/7 generates a steady hourly cloud bill regardless of whether your team is actively querying the model.
- Third-Party OpenAI-Compatible Endpoints + Chat UI: 365Finds considers this the optimal configuration for growing developer teams. You retain the polished HuggingChat user experience while paying purely per token consumed, avoiding idle server waste.
Chat UI loads model definitions into memory during application initialization, requiring a complete Space restart whenever environment variables or endpoint credentials are updated.