# Hugging Face moves chat inference to OpenRouter — custom provider keys stop working

Hugging Face now routes language-model Inference Providers requests through OpenRouter while retaining its own token and billing. Automatic provider selection and retries arrive, but custom provider API keys no longer work for chat models.

The November 16 router migration changes who serves Hugging Face chat requests and removes bring-your-own-provider-key support for language models, without moving image, video or audio tasks.

- Status: Active
- Published: 2026-11-19T06:13:03+13:00
- Updated: 2026-11-19T06:13:03+13:00
- Categories: Artificial Intelligence, AI Coding, Open Models, Inference & APIs
- Tags: AI gateways, API migration, Hugging Face, OpenRouter
- Canonical HTML: https://beyondthe.news/dossiers/hugging-face-inference-providers-openrouter-chat-routing-custom-keys-2026

## What changed

On November 16, 2026 Hugging Face switched its Inference Providers language-model routing from its custom router to OpenRouter. Existing HF API endpoints and tokens remain; OpenRouter chooses from eligible serving providers and can retry a failed attempt on another provider. The migration introduces provider policies such as :fastest and :cheapest and per-account/provider restrictions. Crucially, Hugging Face no longer supports user-supplied third-party provider keys for these language-model calls; the charges appear on the HF account. Image, video and audio Inference Providers continue on the previous path.

## Why it matters

Applications using standard HF billing may gain more serving choices and failover without an endpoint migration, but those relying on provider-specific contracts, credits, keys, regional policies or fixed serving characteristics need to recheck their integrations. Automatic routing can change the underlying operator and cost/performance trade-off; a nominally unchanged API is not an unchanged operational contract.

## The new request path

A language-model request continues to use Hugging Face authentication and its documented compatible API. Hugging Face hands model routing to OpenRouter, which chooses a provider according to availability, speed, price and reliability. A model identifier suffix can select :fastest, :cheapest or a named provider. This does not guarantee that a failed streamed response can be replayed without duplicated text or tool actions.

## Breaking change for custom provider keys

Hugging Face explicitly says custom third-party provider API keys can no longer be used for language-model Inference Providers calls. Builders must use HF-billed inference or move workloads to a direct provider/OpenRouter integration when their own key or contract is required. Custom keys for image/video generation remain supported. The announcement does not specify a universal grace period, so audit actual deployed behaviour rather than assuming a future cutoff.

## Billing, controls and migration checks

Hugging Face says it adds no markup over the provider price and retains billing through HF, with monthly plan credits subject to current terms. Teams can disable individual providers in account or organisation settings and use model suffixes to constrain selection. Audit model/provider availability, tool and structured-output support, context windows, privacy and data-region requirements, budget controls, prompt caching and actual invoices. Test the exact model and request type; catalog availability is not a service-level guarantee.

## Evidence boundaries

Hugging Face's November 16 first-party announcement documents the routing and key-policy changes. Independent migration analysis explains key and billing traps. OpenRouter's reported latency, throughput and failure-rate improvements are from its own router measurements, not independently measured before-and-after outcomes for this specific Hugging Face migration. The announcement is for language models; it should not be generalized to all multimodal generation.

## Key details

- Migration announced November 16, 2026; chat model Inference Providers now use OpenRouter routing.
- Existing Hugging Face token and API remain for supported language-model calls.
- Custom provider keys no longer work for language-model requests; image/video custom keys remain supported.
- Provider choice supports default, :fastest, :cheapest and named-provider suffixes.
- Hugging Face says provider prices are passed through without its own markup; verify live billing and eligibility.

## Builder takeaways

- Inventory language-model calls using custom provider keys and choose HF billing or a direct provider integration.
- Review provider eligibility, data-region and privacy controls before assuming the same processing location.
- Pin or restrict providers where required, and test fallback behaviour and streaming/tool-call idempotency.
- Check actual account/organisation usage and provider charges after migration.

## What to watch

- OpenRouter account linking to Hugging Face, currently described as future work.
- Extension of routing to other modalities and any change to custom-key support.
- Measured production latency, failover and effective billing across representative workloads.

## Uncertainties

- No independently verified end-to-end latency or cost improvement for Hugging Face users.
- No exact universal custom-key cutover hour or grace period in the announcement.
- Actual provider/model support, cache hits and geographic eligibility change over time.

## Sources

- [Hugging Face and OpenRouter join forces to make open-weight models easy to run](https://huggingface.co/blog/openrouter) — Hugging Face · primary · 2026-11-16T00:00:00+13:00. First-party router change, pricing, provider controls and explicit custom-key breaking change.
- [Hugging Face OpenRouter migration: Code, keys and billing](https://kingy.ai/blog/hugging-face-openrouter-router-migration-guide/) — Kingy.ai · independent · 2026-11-18T00:00:00+13:00. Independent operational analysis of billing, BYOK and migration limitations.

