Hugging Face now routes open-weight model calls through OpenRouter, and you can no longer bring your own provider key
Hugging Face replaced its own inference router with OpenRouter's for language models, and the change includes one breaking change.
What happened
Hugging Face says requests to language models on Inference Providers now go through OpenRouter, which picks a provider for each call based on live price, speed and reliability, and retries on another provider inside the same call if the first one fails. Before, Hugging Face picked one provider and returned its error. The router accepts OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API, so existing code keeps working.
You can steer routing with a suffix on the model id: :fastest, :cheapest, or a provider name to pin one. Routing is cache-aware, and Hugging Face recommends sending a stable UUID per conversation in the X-HF-Session-Id header. Providers can be turned off in user or organization settings. Hugging Face says it adds no markup to provider prices.
The breaking change: because these requests are billed to your Hugging Face account, you can no longer use your own API key for a provider with language models. Custom keys still work for image and video providers.
OpenRouter says its rebuilt routing cut capacity errors by 46% and improved time to first token by 16.9% and throughput by 16.3%, with a 6.0% increase in cost. Hugging Face also cites OpenRouter figures putting average open-weight prices at $0.28 per million input tokens and $1.62 output, against $1.27 and $6.36 for closed models.
My take
For most automations this is an improvement. Retries move from your code into the call, and one provider having a bad hour stops breaking a workflow.
Three things need attention. First, if a client used their own provider key because of a negotiated rate or a data agreement with that provider, that path is gone for language models, so check where those requests now go and who bills them. Second, the provider can change between calls, and the same open-weight model can behave slightly differently across hosts. Pin a provider when you run evals so results are comparable. Third, use the settings to disable any provider that doesn't meet the client's data requirements, and set it at the organization level so it applies to every key.
More posts
- Open OCR models now read 1,000 pages for under $0.10, and better serving saved more than switching modelsNov 20, 2026
- Gemini 4 Neon costs $3 in and $15 out per million tokens and tops Zapier's AutomationBench at 56.3%, though it uses more output tokens per taskNov 20, 2026
- Gemini API's Tool Retrieval loads tool schemas only when the model asks for them, so agents with hundreds of tools send fewer input tokensNov 20, 2026
