News

Hugging Face switches language-model inference routing to OpenRouter

Hugging Face moved language-model traffic on Inference Providers to OpenRouter, changing provider selection, retries, billing controls and custom-key support.

D
Nov 17, 2026 · 2 min read

Hugging Face has moved language-model requests on its Inference Providers service to OpenRouter, replacing its custom router while leaving existing client code and Hugging Face tokens unchanged.

The switch changes what happens behind an unpinned request. OpenRouter now chooses among providers serving the requested model using live measures of price, speed and reliability. If the first provider fails, the router retries the same call with another provider; Hugging Face said its previous router returned the initially selected provider’s error instead.

Users can still direct the choice through the model ID. The :fastest suffix prioritizes throughput, :cheapest selects the lowest price and a provider-name suffix pins that provider. A pinned request does not fail over to a different provider. Without a suffix, the default router balances cost, performance and reliability. OpenRouter also says its routing is cache-aware, keeping an ongoing conversation with the provider that holds its prompt cache when possible.

Provider controls remain available in Hugging Face settings. Users can disable individual providers, after which the router will not send requests to them; trying to pin a disabled provider returns an error. For requests billed to an organization, the organization’s settings take precedence over a member’s personal choices.

Billing remains centralized through Hugging Face. Hugging Face says it charges the provider’s rate without an additional markup, applying eligible account or organization credits before pay-as-you-go charges. Its usage view breaks spending down by model and provider, with a corresponding view for paid organizations. The arrangement follows Hugging Face’s earlier addition of Google Cloud billing for eligible Hub charges.

The migration removes one payment path. Customers can no longer supply their own provider API keys for language-model requests routed through OpenRouter because those calls are billed to the Hugging Face account or designated organization. Hugging Face said custom provider keys still work for image and video services, while image, video and audio generation continue to route directly through Inference Providers rather than OpenRouter.

OpenRouter says its provider-ranking system weighs effective price, time to first token, throughput, error and rate-limit rates, and output quality. In a one-week switchback experiment, the company said it divided more than 24 million requests and 103 billion input tokens between its old and new routing algorithms. OpenRouter reported that the new system reduced median time to first token by 16.9%, raised median throughput by 16.3% and cut the share of requests encountering a 429 capacity error by 46%, while increasing cost per thousand requests by 6.0%. Those results were reported by OpenRouter and have not been independently audited.

OpenRouter said the Hugging Face integration initially covers 160 models from 38 labs, which it described as every OpenRouter-served model with a Hugging Face Hub page. Hugging Face separately characterized OpenRouter as serving more than 800 trillion tokens per month to more than 10 million users across more than 600 models and more than 80 providers; those scale figures were supplied by the companies and have not been independently audited.

More news