Hugging Face changed how its Inference Providers service picks a server for your request — and for most developers, nothing in their code needs to change. On 16 November 2026, Hugging Face switched language-model routing from its own custom router to OpenRouter, the service that already routes requests across more than 80 inference providers. Your Hugging Face token still works, your API calls stay the same, and a failed request now gets retried on another provider inside the same call. There is one catch worth checking before you run anything in production: your own provider API keys no longer work for language models.
What actually changed on 16 November
Before the switch, Inference Providers picked one provider for each request and returned that provider’s error if it failed. Now every language-model request goes through OpenRouter, which picks the best provider for each call based on live measurements of price, speed and reliability — and retries on the next best provider if the first one fails. Hugging Face describes the change as a backend swap, not a new product: the Hub stays the model catalogue, your token stays the credential, and the billing still runs through your Hugging Face account.
The scale behind the router is the point. OpenRouter serves more than 800 trillion tokens a month to over 10 million users, across 600+ models from 80+ providers, according to Hugging Face’s announcement. Open-weight models are now the bulk of that traffic: their share of tokens served on OpenRouter rose from 26.8% in October 2025 to 71.7% at the end of September 2026, after peaking at 77.5% in July, and weekly open-weight volume grew more than 60-fold over the same period, against almost tenfold for closed models. The most-used model on OpenRouter this week is an open-weight one, DeepSeek V4.1 Flash 1017, at 59.2 trillion tokens.
What stays exactly the same
Three things do not change, and Hugging Face is explicit about each of them. First, your code stays the same: the same Hugging Face token, the same API, the same model IDs. Second, pricing does not change: you pay the provider’s price on your Hugging Face bill, and Hugging Face adds no markup on top of it. PRO users get $2 of credits every month, and Team and Enterprise organisations get $2 per seat. Third, image, video and audio generation are untouched — they continue directly through Inference Providers without going through OpenRouter, and custom provider keys for those tasks keep working.
The router also speaks the APIs developers already use. It supports OpenAI’s Chat Completions and Responses APIs and Anthropic’s Messages API for every chat model, whatever provider sits behind it. Hugging Face published setup guides for Claude Code, Codex, OpenCode, Pi and Hermes Agent, so a coding agent can be pointed at open-weight models with a single Hugging Face token.
The one breaking change: check your custom provider keys first
This is the setting to check before anything else. Requests to language models are now billed to your Hugging Face account or organisation, so you can no longer use your own API key for a provider with these models. Hugging Face labels this a breaking change in its announcement, even though application code can stay the same.
What that means in practice depends on how you were set up. If you were already paying through Hugging Face, nothing changes for you. If you were passing a provider’s own key through Inference Providers — for example, to keep spend on a provider account with negotiated rates or committed-use discounts — that route is gone for language models, and your requests will now bill to Hugging Face at the provider’s list price. You can still pick a provider, just not with your own key: append the provider name to the model ID, as in zai-org/GLM-5.3:novita, or turn providers off in your Inference Providers settings, which also applies organisation-wide. If your setup relied on a custom key, check the billing account on your first request after the switch, not the tenth.
How the router picks a provider
By default, the router balances price, speed and reliability across every provider serving the model. You can override that with a suffix on the model ID:
| Suffix | What it does | Use it when |
|---|---|---|
| (none — default) | Best mix of price, speed and reliability | You want the router to decide |
| :fastest | Highest throughput provider | Latency matters more than price |
| :cheapest | Lowest-price provider | Cost matters more than speed |
| :novita (or any provider name) | Only that provider | You need a specific provider for compliance or consistency |
Two details matter for real workloads. First, routing is cache-aware: a conversation stays on the provider that holds its prompt cache, so a long session does not hop between providers and lose its cached context. To make that explicit, send a stable UUID per conversation in the X-HF-Session-Id header — Hugging Face’s prompt-caching guide covers the setup. Second, the router’s own performance claims come from OpenRouter’s measurements of its rebuilt routing engine: capacity errors down 46%, time to first token up 16.9%, throughput up 16.3%. Those are OpenRouter’s own figures, not independently verified, and they describe the routing rebuild, not a fresh test of the Hugging Face integration.
Try it in five steps
You need a Hugging Face account and a fine-grained token with “Make calls to Inference Providers” permission, created in your token settings. Then:
1. Pick a model. Use the Inference Playground on the model page to test it interactively, or list warm models from the terminal with hf models ls --warm. DeepSeek V4.1 Flash is the example in Hugging Face’s own docs, and it is also the most-used model on OpenRouter this week.
2. Send one chat request. The OpenAI-compatible endpoint is https://router.huggingface.co/v1:
curl https://router.huggingface.co/v1/chat/completions \
-H "Authorization: Bearer $HF_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"messages": [{"role": "user", "content": "Summarise this report in three bullets."}],
"model": "deepseek-ai/DeepSeek-V4.1-Flash",
"stream": false
}'
3. Try a routing suffix. Re-run the same call with deepseek-ai/DeepSeek-V4.1-Flash:fastest and then :cheapest, and compare the time to first token against the price on the model page. The difference is the router’s trade-off, made visible.
4. Check where your requests went. Every model page now has two new tabs: Providers lists every provider OpenRouter can route the model to, with its input and output price, speed and uptime over the last 24 hours; Metrics shows the best price, throughput, time to first token, context length and uptime among them. Your usage overview breaks your spend down by the provider each request went to.
5. Turn off providers you do not want. In your Inference Providers settings, each provider has a toggle; the router never sends requests to a provider you switched off. Organisations get the same settings, applied to every request billed to the organisation. Do this before you point a production workload at the new router, not after your first surprise bill.
What it costs: open-weight vs closed models
Hugging Face’s announcement puts the average price gap plainly: open-weight models cost about four times less on average — $0.28 per million input tokens and $1.62 per million output tokens, against $1.27 and $6.36 for closed models. The quality gap is real too: on the Artificial Analysis Intelligence Index, Kimi K3.1 Pro, the best open-weight model, scores 46 against 65 for Claude Fable 5.2 — but at about a seventh of the cost per task, $3.68 against $26.54.
A worked example, using Hugging Face’s published averages (our arithmetic, not a vendor quote): a job that sends 1 million input tokens and receives 200,000 output tokens costs about $0.60 on open-weight averages ($0.28 + 0.2 × $1.62) and about $2.54 on closed-model averages ($1.27 + 0.2 × $6.36) — roughly 4.2 times cheaper. That is an average, not a promise: your model’s own provider prices decide your bill, and the cheapest route is not always the best answer. Routing changes the provider, not the model.
Our take: five questions before you switch
The switch itself is low-risk — the code path is the same, and failover is a genuine improvement over getting a provider’s raw error. The risk sits in the billing change and in assuming the cheapest route is the best one. Ask these five questions before moving a workload:
1. Were you using a custom provider key? If yes, confirm the new billing account and price on a test request first — that key no longer works for language models.
2. Does your workload need one provider, or any provider? If consistency, compliance or a cached prompt matters, pin the provider with a suffix or switch the rest off in settings.
3. Is this a long conversation? If yes, send a stable X-HF-Session-Id so the cache stays on one provider.
4. Are you choosing on price alone? Check the Metrics tab: the cheapest provider can also be the slowest, and the best open-weight model still trails the best closed model on the hardest benchmarks.
5. Do you need image, video or audio too? Those tasks bypass OpenRouter entirely and keep working as before — do not re-route them through a chat endpoint.
If the answer to question 1 is no and the rest are handled, the switch is a free upgrade: same token, same code, fewer failed requests. If you were leaning on a custom key, treat this as a migration, not a non-event — and budget an hour to re-check billing before you trust it in production. The deeper integration is still coming: Hugging Face says the next steps are connecting your OpenRouter account to Hugging Face and routing more tasks through OpenRouter. For now, the one setting to check is the one the announcement calls a breaking change.
Frequently asked questions
Did Hugging Face stop running its own inference routing?
Yes. On 16 November 2026, Hugging Face switched Inference Providers from its own custom router to OpenRouter for language models. Image, video and audio generation still run directly through Inference Providers.
Do I need to change my code?
No, for the standard path. Your Hugging Face token, API calls and model IDs stay the same, and the OpenAI-compatible endpoint is https://router.huggingface.co/v1. The only code-adjacent change is if you were passing a custom provider key — that no longer works for language models.
Can I still choose which provider runs my request?
Yes. Append :fastest for the highest-throughput provider, :cheapest for the lowest price, or a provider name such as :novita to the model ID. You can also switch providers off entirely in your Inference Providers settings.
How much does it cost?
You pay the provider’s price on your Hugging Face bill, with no Hugging Face markup. PRO users get $2 of credits a month; Team and Enterprise organisations get $2 per seat. Open-weight models average about four times cheaper than closed models, per Hugging Face’s published figures.
What is coming next?
Hugging Face says the next steps are letting you connect your OpenRouter account to Hugging Face and routing more tasks through OpenRouter. No dates have been published for either step.
Sources and methodology
Sources: Hugging Face, “Hugging Face and OpenRouter join forces to make open-weight models easy to run” (blog, 16 November 2026) — https://huggingface.co/blog/openrouter ; Hugging Face, Inference Providers documentation — https://huggingface.co/docs/inference-providers/en/index ; OpenRouter, “How we rebuilt provider routing” (engineering blog) — https://openrouter.ai/blog/announcements/how-we-rebuilt-provider-routing/ ; Superpower Daily, “Hugging Face switches AI routing to OpenRouter, ending custom keys for chat” (16 November 2026) — https://superpowerdaily.com/posts/hugging-face-switches-ai-routing-to-openrouter-ending-custom-keys-for-chat . Internal links: our guide to running Edge0-145B locally (https://openaimaster.ai/how-to-run-edge0-145b-locally/), our Qwen4-Max Preview explainer (https://openaimaster.ai/qwen4-max-preview-live-14-days/), and our NVIDIA Nemotron 3.5 Transcribe review (https://openaimaster.ai/nvidia-nemotron-3-5-transcribe-review/).
Method: every factual claim was verified fresh on 18 November 2026 against Hugging Face’s own announcement and documentation, read in full. Figures attributed to Hugging Face or OpenRouter are the companies’ own; the cost example is our own arithmetic on Hugging Face’s published averages and is labelled as such. The 160-models-from-38-labs figure comes from announcement coverage, not Hugging Face’s own post, and is attributed that way. This article was desk-researched, not hands-on tested — no live inference calls were run for it.
Govind Dheda covers AI tools, guides and prompts for OpenAIMaster — what is new, what is worth using, and how to put AI to work.


