# Hugging Face switches Inference Providers routing to OpenRouter for open-weight LLMs

> **Key takeaway:** Hugging Face has replaced its custom router with OpenRouter's provider-agnostic infrastructure, allowing unified API access to open-weight language models across 80+ providers with automatic failover and live-optimized routing.

**Published:** 2026-11-16T18:02:10.945722+00:00 
**Source:** Hugging Face Blog &amp; Announcements 
**Category:** ai-open-models 
**Canonical URL:** https://fosswire.org/news/hugging-face-switches-inference-providers-routing-to-openrou.html 

## Summary
Hugging Face and OpenRouter have formed a partnership that replaces Hugging Face's custom Inference Providers router with OpenRouter's multi-provider infrastructure for all language model requests. Developers can now call any open-weight model on the Hugging Face Hub using their existing Hugging Face token, while OpenRouter automatically selects the optimal provider for each request based on real-time price, speed, and reliability metrics, with transparent retry logic if a provider fails. The routing supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API regardless of the underlying provider.

The change reflects dramatic growth in open-weight model usage: on OpenRouter, open-weight models grew from 26.8% of tokens in October 2025 to 71.7% by September 2026, with weekly volume increasing more than 60-fold. Image, video, and audio generation continue to route directly through Hugging Face without OpenRouter. Custom provider API keys are no longer supported for language models, though provider selection via model ID suffixes and provider blocking in settings remain available.

## Routing architecture and API changes
- **Unified token authentication:** A single Hugging Face token now grants access to Inference Providers (via OpenRouter), Storage Buckets, Jobs, and Inference Endpoints, with PRO/Team/Enterprise plans including monthly compute credits.
- **Live provider optimization:** OpenRouter routes each request to the provider with the best combination of price, speed, and reliability based on live measurements across 800+ trillion monthly tokens, reducing capacity errors by 46% and improving time to first token by 16.9%.
- **Automatic retry with same-call failover:** Failed requests are retried on the next-best provider within the same API call, replacing the previous behavior of returning the first provider's error.
- **Explicit routing policies:** Developers can append suffixes to model IDs (`:fastest`, `:cheapest`, `:provider-name`) to override default routing, or disable specific providers account-wide in settings.
- **Cache-aware session stickiness:** Conversations maintain provider affinity when prompt caching is in use via the `X-HF-Session-Id` header with a stable UUID per conversation.

## Why it matters
This integration lowers operational barriers for developers building on open-weight models by abstracting provider fragmentation behind a single authenticated API, while the live routing data exposes competitive pressure on inference pricing and reliability across the 80+ provider ecosystem. For the open-source AI community, it reinforces Hugging Face Hub as a central distribution point and gives independent model publishers broader reach through OpenRouter's provider network without requiring separate commercial agreements.