Hugging Face now routes open-model chat requests through OpenRouter: what changes for builders

On November 16, 2026 Hugging Face said chat-model requests on Inference Providers now run through OpenRouter. Here is what stays the same, what breaks, and how to use the routing options.

0

1. What happened

On November 16, 2026, Hugging Face announced a partnership with OpenRouter. Language-model requests sent to Hugging Face Inference Providers are now routed by OpenRouter instead of Hugging Face’s own router. OpenRouter published a matching announcement the same day. Hugging Face’s docs now say routing is powered by OpenRouter and that a failed or rate-limited provider triggers automatic failover.

Request path

2. Why it matters to builders

One Hugging Face token reaches any open-weight chat model that at least one provider serves, at the provider’s price with no Hugging Face markup. The post says existing code keeps working.

There is one breaking change. Chat-model requests can no longer use your own provider API key. They are billed to your Hugging Face account or organization. Custom keys still work for image and video providers. If you relied on bring-your-own-key for a negotiated rate or a data agreement, check this before you rely on the new path.

What stays and what changes

3. How the routing works

The router accepts OpenAI Chat Completions and Responses requests and Anthropic Messages requests for every chat model. It spreads traffic across more than 80 providers using live price, speed and reliability, and retries on another provider within the same call if one fails.

You steer it with a suffix on the model ID: :fastest, :cheapest, or a provider name such as :novita. The router also keeps a conversation on the provider that holds its prompt cache. You can make that explicit with a stable UUID in the X-HF-Session-Id header. Administrators can switch off individual providers, and the router will not send their requests there.

Routing suffixes

4. What to do

The example below follows Hugging Face’s documentation. We have not run it ourselves.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://router.huggingface.co/v1",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4.1-Flash:cheapest",
    messages=[{"role": "user", "content": "Hello"}],
    extra_headers={"X-HF-Bill-To": "my-org-name"},  # Team/Enterprise billing
)

A sensible order of work, which is our suggestion and not an official procedure:

  1. Search your code for provider keys used on chat calls. Those requests now bill through Hugging Face.
  2. Decide per workload between default routing, :fastest and :cheapest.
  3. Disable any provider your compliance rules exclude.
  4. Compare spend by provider on the usage page after a week.

Migration checklist

5. What is still unknown

OpenRouter says its rebuilt routing cut capacity errors by 46%, improved time to first token by 16.9% and raised throughput by 16.3%, according to the Hugging Face post. These are vendor figures. We could not see the baseline or the workload behind them. The first phase is described as only the start: linking OpenRouter accounts to Hugging Face and routing more task types are listed as next steps, without dates.

Reported versus unknown

Takeaways

  • Your base URL and token stay the same; the routing engine behind them changed.
  • Bring-your-own-key no longer works for chat models on this path.
  • Model-ID suffixes give you per-request control over price versus speed.
  • Treat the performance percentages as claims until you measure your own traffic.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *