{"slug": "hugging-face-and-openrouter-join-forces-to-make-open-weight-models-easy-to-run", "title": "Hugging Face and OpenRouter join forces to make open-weight models easy to run", "summary": "Hugging Face switched its Inference Providers routing from its own custom router to OpenRouter's, letting developers call any open-weight model on the Hugging Face Hub that a provider serves using their existing Hugging Face token and unchanged code. OpenRouter routes each request across 80+ providers based on live price, speed and reliability measurements, retries failed calls on the next-best provider, and supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API for every chat model. OpenRouter reported that open-weight models rose from 26.8% of tokens served in October 2025 to 71.7% at the end of September 2026, peaking at 77.5% in July, with open-weight models averaging $0.28 per million input tokens and $1.62 per million output tokens versus $1.27 and $6.36 for closed models.", "body_md": "# \n\t\tHugging Face and OpenRouter join forces to make open-weight models easy to run\n\t\n\n [Update on GitHub](https://github.com/huggingface/blog/blob/main/openrouter.md)\n\nHugging Face and OpenRouter are teaming up to make open-weight models easy to run. Every major open-weight release is already being published on the Hugging Face Hub, and [OpenRouter](https://openrouter.ai) serves those models at scale, routing each request across 80+ providers based on live measurements of each one. Together, every open-weight model on the Hub that a provider serves can be called with your Hugging Face token, through the same API, with the best provider picked for each request.\n\nToday, we are switching [Inference Providers](https://huggingface.co/docs/inference-providers) from our own custom router to OpenRouter's. Requests made to language models now go through OpenRouter, which picks the best provider for each call based on live price, speed and reliability, and retries on another provider if the first one fails. Your code stays the same.\n\n## \n\t\tRun them with the tools you already use\n\t\n\nThe router supports OpenAI's Chat Completions and Responses APIs and Anthropic's Messages API for every chat model, whatever the provider behind it. Pick your coding agent or SDK and a model, then copy the steps, or copy the whole setup as a prompt for your agent:\n\nSetup guides for [Claude Code](https://huggingface.co/docs/inference-providers/integrations/claude-code), [Codex](https://huggingface.co/docs/inference-providers/integrations/codex), [OpenCode](https://huggingface.co/docs/inference-providers/integrations/opencode), [Pi](https://huggingface.co/docs/inference-providers/integrations/pi) and [Hermes Agent](https://huggingface.co/docs/inference-providers/integrations/hermes-agent)\n\nThe same Hugging Face token also gives you storage with [Storage Buckets](https://huggingface.co/storage), compute with [Jobs](https://huggingface.co/docs/hub/jobs-overview) and dedicated inference with [Inference Endpoints](https://huggingface.co/docs/inference-endpoints). PRO, Team and Enterprise plans include monthly credits for compute and inference.\n\n## \n\t\tHow open-weight models are used\n\t\n\nOn OpenRouter, open-weight models went from 26.8% of the tokens served in October 2025 to 71.7% at the end of September 2026, after peaking at 77.5% in July ([OpenRouter, October 2026](https://openrouter.ai/blog/insights/open-weight-vs-closed-weight-models/)). Over the same period, weekly open-weight volume grew more than 60-fold, against almost tenfold for closed models. This week, the most used model on OpenRouter is an open-weight one, DeepSeek V4.1 Flash 1017, with 59.2 trillion tokens ([rankings](https://openrouter.ai/rankings)).\n\nOpen-weight models cost about four times less on average: $0.28 per million input tokens and $1.62 per million output tokens, against $1.27 and $6.36 for closed models.\n\nThe best open-weight models still trail the best proprietary ones on the hardest benchmarks. On the [Artificial Analysis Intelligence Index](https://artificialanalysis.ai/leaderboards/models), Kimi K3.1 Pro, the best open-weight model, scores 46 against 65 for Claude Fable 5.2, at about a seventh of the cost per task ($3.68 against $26.54). For a lot of workloads, that trade-off is worth it.\n\n## \n\t\tRouting powered by OpenRouter\n\t\n\nOpenRouter serves more than 800 trillion tokens a month to over 10 million users, across 600+ models from 80+ providers. Its routing is based on live measurements of every provider across that traffic.\n\nOpenRouter recently [rebuilt its provider routing](https://openrouter.ai/blog/announcements/how-we-rebuilt-provider-routing/): instead of only looking at the lowest list price, it sends each request to the provider with the best mix of price, speed and reliability.\n\nWhen a provider slows down or starts failing, traffic moves away from it until it recovers, and a failed try is retried on the next best provider inside the same call. In OpenRouter's measurements, the new routing cut capacity errors by 46% and improved time to first token by 16.9% and throughput by 16.3%.\n\nBefore, Inference Providers picked one provider for your request and returned its error if it failed. Now, the request is retried on another provider. You can still choose a policy or a provider with a suffix on the model id:\n\n```\nzai-org/GLM-5.3            # default: best mix of price, speed and reliability\nzai-org/GLM-5.3:fastest    # highest throughput\nzai-org/GLM-5.3:cheapest   # lowest price\nzai-org/GLM-5.3:novita     # only Novita\n```\n\nRouting is also cache-aware: a conversation stays on the provider that holds its prompt cache. To make it explicit, send a stable UUID per conversation in the `X-HF-Session-Id` header (see the [prompt caching guide](https://huggingface.co/docs/inference-providers/prompt-caching)).\n\n## \n\t\tPricing\n\t\n\nPricing doesn't change: you pay the provider's price on your Hugging Face bill, and Hugging Face doesn't add a markup on top of it. PRO users get $2 of credits every month, and Team and Enterprise organizations get $2 per seat. See [Pricing and Billing](https://huggingface.co/docs/inference-providers/pricing) for the details.\n\n## \n\t\tImage, video and audio generation\n\t\n\nImage, video, and audio generation continue to work exactly as before, directly through Hugging Face Inference Providers without going through OpenRouter. You can keep using the same token and API, and access tens of thousands of [LoRAs](https://huggingface.co/models?inference_provider=all&pipeline_tag=text-to-image&other=lora).\n\n## \n\t\tSee where your requests go\n\t\n\nOn model pages, you can chat with the model right away in the widget. Two new tabs show what's behind it: Providers lists every provider OpenRouter can route the model to, with its input and output price, speed and uptime over the last 24 hours, and Metrics shows the best price, throughput, time to first token, context length and uptime among them:\n\nYour [usage overview](https://huggingface.co/settings/inference-providers/overview) breaks your spend down by the provider each request went to:\n\nIn your [settings](https://huggingface.co/settings/inference-providers), you can turn off any provider you don't want: the router never sends your requests there. Organizations have the same settings, and they apply to every request billed to the organization.\n\n## \n\t\tBreaking change: custom provider keys\n\t\n\nRequests to language models now go through OpenRouter and are billed to your Hugging Face account or organization, so you can no longer use your own API key for a provider with these models. You can still pick a provider with a suffix on the model id (`model:provider`) or turn providers off in your settings, and your code stays the same. Custom keys for image and video providers keep working.\n\n## \n\t\tWhat's next\n\t\n\nThis is the first step of our partnership with OpenRouter. Next:\n\n- Connect your OpenRouter account to Hugging Face.\n- More tasks routed through OpenRouter.\n\nTry a [model](https://huggingface.co/models?inference_provider=all&sort=trending&other=conversational), or read the [Inference Providers docs](https://huggingface.co/docs/inference-providers) to get started.", "url": "https://wpnews.pro/news/hugging-face-and-openrouter-join-forces-to-make-open-weight-models-easy-to-run", "canonical_source": "https://huggingface.co/blog/openrouter", "published_at": "2026-11-16 00:00:00+00:00", "updated_at": "2026-11-16 17:22:47.739083+00:00", "lang": "en", "topics": ["ai-infrastructure", "large-language-models", "ai-tools", "artificial-intelligence", "ai-products"], "entities": ["Hugging Face", "OpenRouter", "DeepSeek V4.1 Flash 1017", "Kimi K3.1 Pro", "Claude Fable 5.2", "Artificial Analysis Intelligence Index", "Claude Code", "Codex"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/hugging-face-and-openrouter-join-forces-to-make-open-weight-models-easy-to-run", "markdown": "https://wpnews.pro/news/hugging-face-and-openrouter-join-forces-to-make-open-weight-models-easy-to-run.md", "text": "https://wpnews.pro/news/hugging-face-and-openrouter-join-forces-to-make-open-weight-models-easy-to-run.txt", "jsonld": "https://wpnews.pro/news/hugging-face-and-openrouter-join-forces-to-make-open-weight-models-easy-to-run.jsonld"}}