Orply.

Hugging Face Routes Model Inference Through OpenRouter

Alejandro AOHugging FaceThursday, November 19, 20263 min read

Hugging Face is replacing its custom inference-provider router with OpenRouter, which will route model requests among available providers, according to Alejandro AO. He argues the change reflects the growing use of open-weight models: OpenRouter’s chart shows them accounting for 81.7% of tokens processed in November 2024, though AO’s separate comparison refers to request share. Users can try models through Hugging Face pages or connect them to applications and coding agents, while account settings allow provider exclusions and spending limits.

Hugging Face routes model requests through OpenRouter

Alejandro AO says Hugging Face is replacing its custom inference-provider router with OpenRouter. When users call a model through Hugging Face, requests will be routed through OpenRouter, which selects among available inference providers. The change is presented as a way to use models from Hugging Face while OpenRouter handles routing.

AO frames the partnership against the growth of open-weight models. He says that at the same point the previous year, 78% of requests on OpenRouter went to closed-weight models, compared with 81% going to open-weight models now. The accompanying chart measures share of tokens processed, not requests: it shows 78.4% closed-weight tokens on November 24, 2023, and 81.7% open-weight tokens on November 16, 2024. The chart’s dates and measure differ from the speaker’s request-share comparison. AO also says that, at the time of recording, eight of OpenRouter’s ten most popular models were open-weight.

The model-page flow is demonstrated with DeepSeek-V4.1-Flash-1017. A user searches for the model on Hugging Face, opens its Inference Providers chat widget, and enters a prompt. AO says that request goes through OpenRouter. The model page is the direct route for trying a model in chat: users can select a model, prompt it there, and see its inference-provider options.

The widget separates the chat from information about routing. Its Providers view shows available providers and which one OpenRouter is routing a request to. Its Metrics view displays figures across providers for the selected model. In the example, the model is served by 12 providers; the displayed best available figures are $0.04 per million input tokens, $0.29 per million output tokens, 222 tokens per second, 0.31 seconds to first token, a 1.05-million-token context window, and 100% uptime over the previous 24 hours.

The same model can be reached through code or a coding agent

The model page also has a Getting Started tab, which shows examples for calling the model from Python and JavaScript. These are application-integration paths, distinct from entering a prompt in the model-page chat. The tab also lists setup options for Pi, OpenCode, Claude Code, and Codex. AO says users can connect a Hugging Face account to those tools or to another coding agent.

That distinction makes the integration useful in more than one setting: a user can experiment in the browser, use the examples to call the model from an application, or configure a coding agent to use the account. In each case, the selected model is accessed through Hugging Face’s Inference Providers integration, with requests routed through OpenRouter.

Credits, provider exclusions and spending limits shape account use

AO says Hugging Face Pro accounts receive $2 in monthly credits, usable across Hub services including private and public storage, ZeroGPU, and inference. He estimates that the monthly credits would cover about 150 million tokens of DeepSeek-V4.1-Flash in regular conversations with prompt caching, which OpenRouter handles automatically.

AO also says Hugging Face adds no markup to inference prices: the prices and costs are the same as those announced by OpenRouter. The billing screen shown in the demonstration displays the account’s credits and inference usage, alongside storage and compute information.

Account settings include usage analytics, with a model breakdown and information such as requests and accrued cost. They also include controls over which providers may receive requests. AO demonstrates turning off Novita and says requests will no longer be routed to it. The settings shown also list Cerebras, fal, Together AI, and Fireworks. Users can enable or disable providers individually, so a provider turned off in settings is excluded from routing.

The settings page also shows a monthly spending-limit control. AO says enterprise accounts can manage this setting for all members of their organization. The provider toggles determine which listed providers are eligible for routing; the spending limit sets a separate boundary on monthly inference spending.

The frontier, in your inbox tomorrow at 08:00.

Sign up free. Pick the industry Briefs you want. Tomorrow morning, they land. No credit card.

Sign up free