Hugging Face switches AI routing to OpenRouter, ending custom keys for chat
Existing code and Hugging Face tokens keep working, but language-model billing moves entirely through Hugging Face accounts.
Loading page…
Existing code and Hugging Face tokens keep working, but language-model billing moves entirely through Hugging Face accounts.
Listen to this story
Hugging Face’s November 16, 2026 routing change moves language-model requests to OpenRouter, which can retry failed calls and steer traffic away from slow or unreliable providers. The tradeoff is a breaking billing change: users can no longer supply their own provider keys, and requests are charged to their Hugging Face account or organization. OpenRouter’s reported performance gains—measured in its October routing experiment, not on the Hugging Face integration—came with higher average request costs.
The initial integration covers 160 models from 38 labs that OpenRouter serves and that have Hugging Face Hub pages.
OpenRouter’s October experiment recorded 46% fewer capacity errors, 16.9% faster time to first token and 16.3% higher generation throughput, alongside 6.0% higher cost per request.
Developers can prioritize speed or price, pin requests to a provider, or disable providers; default routing balances price, speed and reliability.
Hugging Face’s switch to OpenRouter promises a largely invisible upgrade: existing code keeps working while failed language-model requests get another provider to try. But the November 16, 2026 change has a concrete cost in flexibility. Users of Inference Providers can no longer bring their own provider API keys for language models.
The partnership replaces Hugging Face’s custom router with OpenRouter’s system for choosing which company serves each language-model request. Selection now uses live measurements of price, speed and reliability rather than leaving an application with an error when its chosen provider fails.
OpenRouter says the integration initially covers 160 models from 38 labs: every model it serves that also has a page on the Hugging Face Hub. Existing Hugging Face tokens remain valid. The router supports OpenAI’s Chat Completions and Responses interfaces and Anthropic’s Messages interface across chat models, regardless of the provider serving them.
Previously, Inference Providers selected one provider and returned that provider’s error if the call failed. Now, a failed attempt is retried with another provider inside the same call. Traffic also moves away from providers that slow down or start failing, until they recover.
The performance figures behind the handoff come from OpenRouter’s live experiment following its October routing rebuild, not a new test of the Hugging Face integration. OpenRouter measured fewer capacity errors, faster response starts and higher generation throughput. Those gains came with a higher average cost per request.
OpenRouter measured 46% fewer requests hitting a capacity error in its live routing experiment.
The company measured a 16.9% improvement in time to first token, the wait before a response starts arriving.
OpenRouter’s experiment measured a 6.0% increase in cost per request alongside the performance gains.
Generation throughput—the rate at which output arrives—rose 16.3% in that experiment. The default policy balances price, speed and reliability; it does not simply select the provider with the lowest listed price. Users can override that balance rather than accept one routing policy for every request.
Developers still have several ways to direct traffic. A suffix added to the model identifier sets the priority or pins a request to a named provider:
Model pages now expose the available backends in a Providers tab, including input and output prices, speed and uptime over the previous 24 hours. A separate Metrics tab shows measures including context length and time to first token. The usage overview breaks spending down by the provider that handled each request.
Users can also disable individual providers in settings, preventing the router from sending them requests. Organization-level exclusions apply to every request billed to that organization. Routing preserves prompt caching, too: a conversation stays with the provider holding its cached prompt.
Choosing a provider no longer means choosing a separate provider account for payment. Language-model requests are billed to the caller’s Hugging Face account or organization. Hugging Face explicitly labels the removal of custom provider keys a breaking change, even though application code can stay the same.
Hugging Face says its pricing terms are unchanged: customers pay the provider’s price without an added Hugging Face markup. PRO users receive $2 in monthly credits, while Team and Enterprise organizations receive $2 per seat. That unchanged pricing policy is separate from which provider the router chooses for a request.
The boundary is task-specific. Image, video and audio generation continue directly through Hugging Face Inference Providers, without OpenRouter. Custom provider keys remain available for image and video requests. Connecting existing OpenRouter accounts and extending routing to more tasks are listed as next steps, not capabilities delivered in this switch.
Loading discussion...
Join the conversation
Explain which choices should survive a behind-the-scenes upgrade.
Be the first to share a perspective or an experience.
Reader comments
Newest comments first. Replies stay oldest first.