AI Agent News/stories/hugging-face-moves-language-model-routing-in-inference-providers-to-openrouter.md

Infrastructure

Hugging Face moves language model routing in Inference Providers to OpenRouter

Hugging Face is switching language model requests in Inference Providers to OpenRouter, which picks a provider for each call based on live price, speed and reliability. Custom provider keys can no longer be used for those models, while image, video and audio generation stay on Hugging Face directly.

Source: huggingface.co/blog/openrouter

Hugging Face and OpenRouter are partnering so that every open-weight model on the Hugging Face Hub that a provider serves can be called with a Hugging Face token through one API. Language model requests now go through OpenRouter, which chooses a provider for each request based on live price, speed and reliability and retries another provider if the first one fails. The router supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API.

OpenRouter says open-weight models rose from 26.8% of the tokens it served in October 2025 to 71.7% at the end of September 2026, and they cost about four times less on average. In its own measurements, its newer provider routing cut capacity errors by 46%. Developers can still pin a routing policy or a single provider with a suffix on the model id, such as :fastest, :cheapest or a provider name.

Pricing is unchanged, with no Hugging Face markup on top of the provider's price, and providers can be turned off in settings. Custom provider keys no longer work for language models, which are now billed to the Hugging Face account or organization. Image, video and audio generation continue through Inference Providers as before.

Why it matters if you build agents

Agent code that calls language models through Hugging Face keeps the same interface, but any custom provider key used for those models will stop working and has to be replaced with a Hugging Face token. Requests that fail on one provider may now be retried on another automatically, so retry logic in agent code may matter less. Sessions can send a stable UUID in the X-HF-Session-Id header to keep prompt caching on one provider.

Get stories like this every weekday

One short email with the day's agent tooling news.

Subscribe