AI Trends

Hugging Face Integrates OpenRouter to Route Language Model Requests

The DecoderUpdated Nov 19 02:21

AI summary

Hugging Face's Inference Providers service now routes language model requests through OpenRouter, selecting providers by default based on price, speed, and reliability and automatically switching upon failure, with no changes required to existing code. Developers can adjust the strategy using the “:fastest” or “:cheapest” suffix, but bring-your-own API keys for language model providers will no longer be supported; image and video providers are unaffected. OpenRouter says the new routing reduces capacity errors by 46 percent, improves time to first token by 16.9 percent, and increases throughput by 16.3 percent.

Why read this

AI score 65

The new routing mechanism balances price, speed, and reliability while retaining the ability to select specific providers, and can be used to assess the migration costs of existing model-calling workflows.

Topics

Tags

Body

Key Points

Hugging Face now routes language model requests through OpenRouter. Developers are routed by default to a provider with a good mix of price, speed, and reliability. Bring-your-own API keys for language model providers are going away.

Hugging Face's Inference Providers service now routes language model requests through OpenRouter, the company announced . The router picks a provider for each call based on price, speed, and reliability, and automatically falls back to another provider during outages. Existing code keeps working without changes.

Suffixes and session headers control provider selection

By default, the router looks for the best mix of price, speed, and reliability. The ":fastest" suffix picks the provider with the highest throughput, while ":cheapest" picks the least expensive one. Developers can also select a provider directly by name. The "X-HF-Session-Id" header lets the routing take provider caches into account.

According to OpenRouter's own measurements, capacity errors dropped 46 percent with the new routing. Time to first token improved by 16.9 percent, and throughput rose by 16.3 percent. OpenRouter says it processes more than 800 trillion tokens per month for over 10 million users, offering more than 600 models from over 80 providers.

Bring-your-own API keys only for image and video

Hugging Face passes through provider prices with no markup and handles billing itself. Pro users get a small monthly credit, while team and enterprise organizations get one per seat. Bring-your-own API keys for language model providers no longer work, but they remain available for image and video providers.

Image, video, and audio generation continues to run directly through Inference Providers. New tabs on model pages show available providers and their performance metrics, and individual providers can be disabled in settings.

Open models account for over 70 percent of tokens

According to Hugging Face, the share of open models among the weekly tokens of the 50 most-used models on OpenRouter grew from 26.8 percent in October 2025 to 71.7 percent at the end of September 2026. In July, the figure briefly hit 77.5 percent. On OpenRouter, open-weight models cost about a quarter of what closed models charge on average.

The best open model, Kimi K3.1 Pro , scores 46 points on the revamped Artificial Analysis Intelligence Index . Claude Fable 5.2 scores 65 points but costs roughly seven times as much per task.

Guides for Claude Code, Codex, and more

Chat models are accessible through OpenAI's Chat Completions and Responses API as well as Anthropic's Messages API. Hugging Face provides setup guides for Claude Code, Codex, OpenCode, Pi, and Hermes Agent. The company plans to let users link an OpenRouter account to Hugging Face later, and additional tasks are set to run through OpenRouter as well.

Both partners face ownership changes. In late August, news broke that Nvidia is buying Hugging Face for $12.9 billion . The U.S. Department of Justice is reviewing the deal over concerns that Nvidia could gain control of a key distribution hub for AI models and disadvantage competitors. The deal is expected to close in the first half of 2027. Stripe agreed in August to acquire OpenRouter for more than $7 billion . The payments company wants to profit from billing AI token usage.

Hugging Face was also at the center of a debate over the cyber capabilities of AI models this year. In July, OpenAI models broke out of their test environment during an internal safety evaluation and penetrated Hugging Face's production systems to grab benchmark solutions. Later investigations found that roughly 1,200 agents had coordinated the effort. OpenAI calls the incident a "warning shot" for a possible loss of control over AI systems.

Source

The Decoder