Hugging Face moves Inference Providers to OpenRouter's router for language models

Hugging Face moves Inference Providers to OpenRouter's router for language models

Hugging Face and OpenRouter announced a partnership aimed at making open-weight models easy to run. Hugging Face says every major open-weight release is already published on its Hub, and OpenRouter serves those models at scale, routing each request across 80+ providers based on live measurements of each one. Together, every open-weight model on the Hub that a provider serves can be called with a Hugging Face token, through the same API, with the best provider picked for each request.

The concrete change: Hugging Face is switching Inference Providers from its own custom router to OpenRouter's. Requests to language models now go through OpenRouter, which picks the provider for each call on live price, speed and reliability, and retries on another provider if the first one fails. Before, Inference Providers picked one provider for a request and returned its error if that provider failed. Hugging Face says user code stays the same.

The router supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API for every chat model, whatever the provider behind it. The post links setup guides for Claude Code, Codex, OpenCode, Pi and Hermes Agent. The same token also covers storage with Storage Buckets, compute with Jobs and dedicated inference with Inference Endpoints. PRO, Team and Enterprise plans include monthly credits for compute and inference.

The post makes the case for open-weight models with OpenRouter data. 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. Over the same period weekly open-weight volume grew more than 60-fold, against almost tenfold for closed models. This week the most used model on OpenRouter is open-weight: DeepSeek V4.1 Flash 1017, with 59.2 trillion tokens. On average, open-weight models cost about four times less: $0.28 per million input tokens and $1.62 per million output tokens, against $1.27 and $6.36 for closed models. Hugging Face concedes that the best open-weight models still trail the best proprietary ones on the hardest benchmarks. On the Artificial Analysis Intelligence Index, Kimi K3.1 Pro, the best open-weight model, scores 46 against 65 for Claude Fable 5.2, at about a seventh of the cost per task ($3.68 against $26.54). For a lot of workloads, the post says, that trade-off is worth it.

On the routing side, OpenRouter serves more than 800 trillion tokens a month to over 10 million users, across 600+ models from 80+ providers. It recently rebuilt its provider routing: instead of looking only at the lowest list price, it sends each request to the provider with the best mix of price, speed and reliability. When a provider slows down or starts failing, traffic moves away until it recovers, and a failed try is retried on the next best provider inside the same call. In OpenRouter's own measurements, the new routing cut capacity errors by 46% and improved time to first token by 16.9% and throughput by 16.3%.

Users can still steer the choice with a suffix on the model id: no suffix gives the default mix of price, speed and reliability, :fastest gives the highest throughput, :cheapest the lowest price, and a provider name such as :novita restricts routing to that provider. Routing is also cache-aware, so a conversation stays on the provider that holds its prompt cache; sending a stable UUID per conversation in the X-HF-Session-Id header makes this explicit.

Pricing does not change. Users pay the provider's price on their Hugging Face bill, with no markup from Hugging Face. PRO users get $2 of credits every month, and Team and Enterprise organizations get $2 per seat. Image, video and audio generation continue to work as before, directly through Hugging Face Inference Providers and not through OpenRouter, with the same token and API and access to tens of thousands of LoRAs.

Model pages gain two tabs. Providers lists every provider OpenRouter can route the model to, with 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. The usage overview breaks spend down by the provider each request went to. In settings, users can turn off any provider, and the router never sends their requests there; organizations have the same settings, applied to every request billed to the organization.

There is one breaking change. Because language-model requests now go through OpenRouter and are billed to the user's Hugging Face account or organization, users can no longer use their own API key for a provider with these models. They can still pick a provider with the model:provider suffix or turn providers off in settings. Custom keys for image and video providers keep working. Hugging Face calls this the first step of the partnership. Next: connecting an OpenRouter account to Hugging Face, and routing more tasks through OpenRouter.

Key facts

  • Hugging Face switches Inference Providers for language models from its own custom router to OpenRouter's, which picks a provider per request on live price, speed and reliability and retries on another if one fails.
  • The router supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API for every chat model; pricing is unchanged, with no Hugging Face markup.
  • Breaking change: for language models, users can no longer use their own API key for a provider. Custom keys for image and video providers keep working.
  • OpenRouter's data: open-weight models rose from 26.8% of tokens in October 2025 to 71.7% at the end of September 2026, and cost about four times less on average than closed models.
  • OpenRouter reports its new routing cut capacity errors by 46% and improved time to first token by 16.9% and throughput by 16.3%.

Why it matters

Hugging Face is the main place open-weight models are published, and this change makes the same Hub models callable through one token with automatic provider choice and failover. Before, a request went to one provider and that provider's error came back to the user. Now the request is retried on the next best provider inside the same call. The post pairs the change with OpenRouter's figures on the growth of open-weight usage: 26.8% of tokens in October 2025, 71.7% at the end of September 2026, with a peak of 77.5% in July. Hugging Face calls this the first step of a wider partnership.

Who it affects

Anyone calling language models through Hugging Face Inference Providers, including users of coding agents and SDKs such as Claude Code, Codex, OpenCode, Pi and Hermes Agent, for which the post links setup guides. Users who relied on their own provider API keys for language models are hit by the breaking change. PRO, Team and Enterprise accounts get monthly credits: $2 for PRO users and $2 per seat for Team and Enterprise organizations. Users of image, video and audio generation see no change.

How to use it

Call any open-weight model on the Hub that a provider serves with a Hugging Face token; Hugging Face says the code stays the same. Use OpenAI's Chat Completions or Responses APIs, or Anthropic's Messages API. Steer routing with a suffix on the model id: none for the default mix of price, speed and reliability, :fastest for highest throughput, :cheapest for lowest price, or a provider name such as :novita to use only that provider. To keep a conversation on the provider that holds its prompt cache, send a stable UUID per conversation in the X-HF-Session-Id header. Turn off unwanted providers in settings, for a user or an organization. The Providers and Metrics tabs on model pages show prices, speed, uptime and context length, and the usage overview splits spend by provider. Pricing is the provider's price on the Hugging Face bill, with no markup.

How solid is it

This is a first-party announcement from Hugging Face, so the switch itself, the pricing terms and the breaking change are stated by the party making them. The routing gains (46% fewer capacity errors, 16.9% better time to first token, 16.3% better throughput) are OpenRouter's own measurements, and the post does not specify the baseline beyond the earlier routing. The usage and price figures come from OpenRouter data, and the post says the price comparison is 'on average' without saying whether that is a mean or a median. The post names no individual authors and contains no quotations from people.

Risks and caveats

The breaking change is the main one: custom provider keys no longer work for language models, though provider suffixes and settings still let users pick or exclude providers. Hugging Face itself says the best open-weight models still trail the best proprietary ones on the hardest benchmarks: Kimi K3.1 Pro scores 46 against 65 for Claude Fable 5.2 on the Artificial Analysis Intelligence Index, at about a seventh of the cost per task ($3.68 against $26.54). The post gives no timescale for the planned next steps, and does not say how many users or how much traffic the key change affects.

“Your code stays the same.”

— Hugging Face blog post