Hugging Face 接入 OpenRouter 路由语言模型请求
Hugging Face now routes model requests through OpenRouter for the best price or speed
Hugging Face 的 Inference Providers 服务现通过 OpenRouter 路由语言模型请求,默认按价格、速度和可靠性选择供应商,并在故障时自动切换,现有代码无需修改。开发者可用“:fastest”或“:cheapest”后缀调整策略,但语言模型供应商的自带 API key 将不再可用,图像和视频供应商不受影响。OpenRouter 称新路由使容量错误下降 46 percent、首个 token 时间改善 16.9 percent、吞吐量提升 16.3 percent。
推荐理由
AI 评分 65
新路由机制兼顾价格、速度与可靠性,并保留指定供应商的控制方式,可用于评估现有模型调用工作流的迁移成本。
主题
正文
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.
AI 热点