我们构建 OpenRouter 的目的是让开发者能够通过一个 API 访问众多模型和提供商,为每项任务选择最佳模型,并依赖其稳定响应。从今天起,这一服务扩展至所有在 Hugging Face 上构建应用的开发者。Hugging Face Inference Providers 上的聊天模型现在通过 OpenRouter 运行,采用 OpenRouter 客户已经信赖的跨提供商路由机制。
该集成也支持反向操作。OpenRouter 现在可以将每个请求的追踪数据发送到你拥有的 Hugging Face Storage Bucket(存储桶),使你真实流量中的提示词和响应数据与你用于评估或微调它们的模型和数据集并置。设置指南中包含了具体步骤。
你在 Hugging Face 上获得的功能
Hugging Face 上的许多聊天模型由多个提供商提供服务。OpenRouter 的提供商路由现在为 Hugging Face Inference Providers 提供路由支持,并根据实时价格、速度和可靠性为每个请求选择提供商。你无需进行任何设置,现有的 Hugging Face 令牌和代码均可继续使用。
你还获得了自动故障转移功能。如果某个提供商响应变慢或开始出现故障,请求将转发至其他提供商,直到其恢复。如果某个提供商返回错误,请求将在同一次调用中重试下一个提供商。
当我们在十月重新构建此路由机制时,一项实时实验显示:命中容量错误的请求减少了 46%,首令牌生成时间加快了 16.9%,吞吐量提高了 16.3%,而每次请求的成本仅增加了 6.0%。现在,所有在 Hugging Face 上构建应用的开发者都能获得相同的路由服务。
你始终掌控权衡取舍。为模型 ID 添加后缀,例如 :fastest、:cheapest 或提供商名称,即可告诉 OpenRouter 优先事项,请求可通过 OpenAI 的 Chat Completions 和 Responses API 或 Anthropic 的 Messages API 进行处理。对话也会保留在持有其提示缓存的提供商上。
每个模型页面都有一个新的“Providers”(提供商)标签页,显示每个提供商的实时价格、速度和正常运行时间。你可以查看按提供商划分的支出,并关闭你不希望使用的任何提供商。
今天已有来自 38 家实验室的 160 个模型可通过此方式获取,这涵盖了 OpenRouter 提供的所有在 Hub 上有页面的模型。其中包括开发者在 OpenRouter 上使用最多的开源权重模型,其中开源权重模型在十月占据了约 70% 的付费令牌量:
DeepSeek V4.1 Flash
MoonshotAI Kimi K3.1 Pro 和 Kimi K3
Z.ai GLM 5.3 和 GLM 5.3 Flash
Qwen3.8 27B
MiniMax M3.1 Flash
Xiaomi MiMo-V2.6-Flash
NVIDIA Nemotron 3 Ultra
OpenAI gpt-oss-120b
你的追踪数据可驻留在 Hub 上
将 Hugging Face Storage Buckets 添加为广播目的地(目前处于测试阶段),OpenRouter 会将每个请求作为 JSON 文件发送到你拥有的存储桶中。每个文件包含输入消息、模型输出、令牌计数和成本。图像和其他媒体将被排除在外。
这是用于评估集或开源权重模型微调运行的原始素材。你可以按日期或 API 密钥组织这些文件。
开始使用
在 Hugging Face 上:
在 hf.co/settings/tokens 创建一个具有“Inference Providers 调用权限”的令牌。
打开 Hub 上任何受支持模型的页面。在那里与其聊天,或点击“View code”(查看代码)获取适合你的代码或编码代理的设置步骤,包括 Claude Code、Codex、OpenCode、Pi 和 Hermes Agent。
要选择哪些提供商可以处理你的请求,请前往 Hugging Face 设置中的“Inference Providers”(推理提供商)。
要将追踪数据发送到存储桶:
在 Hugging Face 上创建一个 Storage Bucket。
创建一个具有写入权限的访问令牌,并从中生成 S3 凭据。
在 OpenRouter 中,前往 Settings > Observability(设置 > 可观测性),开启 Broadcast(广播),并打开 Hugging Face Storage Buckets。
输入你的命名空间、存储桶名称、访问密钥 ID 和秘密访问密钥。路径模板(如 {apiKeyName}/{date})是可选的。
点击“Test Connection”(测试连接),然后保存。
完整的设置指南涵盖了路径模板和追踪文件格式。
在 Hugging Face Playground(游乐场)中尝试一个模型,或将你的追踪数据发送到 Storage Bucket。
We built OpenRouter so developers can reach many models and providers through one API, use the best model for each task, and count on it to respond. Starting today, that extends to everyone building on Hugging Face. Chat models on Hugging Face Inference Providers now run through OpenRouter, with the same routing across providers that OpenRouter customers already rely on.
The integration also runs the other way. OpenRouter can now send a trace of each request to a Hugging Face Storage Bucket you own, so the prompts and responses from your real traffic sit next to the models and datasets you would use to evaluate or fine-tune on them. The setup guide has the steps.
What you get on Hugging Face
Many chat models on Hugging Face are served by more than one provider. OpenRouter’s provider routing now powers routing on Hugging Face Inference Providers, and it picks the provider for each request based on live price, speed, and reliability. You don’t have to set anything up, and your existing Hugging Face token and code keep working.
You also get automatic failover. If a provider slows down or starts failing, requests go to other providers until it recovers. If a provider returns an error, the request is retried on the next one inside the same call.
When we rebuilt this routing in October , a live experiment measured 46% fewer requests hitting a capacity error, 16.9% faster time to first token, and 16.3% higher throughput, for 6.0% higher cost per request. Everyone building on Hugging Face now gets the same routing.
You stay in control of the trade-off. Adding a suffix to the model ID, such as :fastest , :cheapest , or a provider name, tells OpenRouter what to prioritize, and requests work through OpenAI’s Chat Completions and Responses APIs or Anthropic’s Messages API. A conversation also stays on the provider that holds its prompt cache.
Each model page has a new Providers tab with live price, speed, and uptime for every provider. You can see your spend by provider and turn off any provider you don’t want to use.
160 models from 38 labs are available this way today, which is every model OpenRouter serves that has a page on the Hub. They include the open-weight models developers use most on OpenRouter, where open-weight models carried about 70% of paid tokens in October:
DeepSeek V4.1 Flash
MoonshotAI Kimi K3.1 Pro and Kimi K3
Z.ai GLM 5.3 and GLM 5.3 Flash
Qwen3.8 27B
MiniMax M3.1 Flash
Xiaomi MiMo-V2.6-Flash
NVIDIA Nemotron 3 Ultra
OpenAI gpt-oss-120b
Your traces can live on the Hub
Add Hugging Face Storage Buckets as a Broadcast destination (it’s in beta) and OpenRouter sends each request as a JSON file to a bucket you own. Each file holds the input messages, the model’s output, token counts, and cost. Images and other media are left out.
That’s the raw material for an evaluation set or a fine-tuning run on an open-weight model. You can organize the files by date or by API key.
Get started
On Hugging Face:
Create a token at hf.co/settings/tokens with the “Make calls to Inference Providers” permission.
Open any supported model’s page on the Hub. Chat with it there, or click View code for setup steps for your code or your coding agent, including Claude Code, Codex, OpenCode, Pi, and Hermes Agent.
To choose which providers can serve your requests, go to Inference Providers in your Hugging Face settings.
To send traces to a Storage Bucket:
Create a Storage Bucket on Hugging Face.
Create an access token with Write permission and generate S3 credentials from it.
In OpenRouter, go to Settings > Observability , turn on Broadcast, and open Hugging Face Storage Buckets.
Enter your namespace, bucket name, access key ID, and secret access key. A path template such as {apiKeyName}/{date} is optional.
Click Test Connection, then save.
The full setup guide covers path templates and the trace file format.
Try a model in the Hugging Face Playground , or send your traces to a Storage Bucket .
| 刊期 | 得分 | 排名 | 结果 |
|---|---|---|---|
| 2026-11-28 | 8.4 | 25 | 入选 |
| 2026-11-27 | 8.4 | 32 | 未入选 |
| 2026-11-26 | 8.4 | 35 | 未入选 |
| 2026-11-25 | 8.4 | 30 | 未入选 |
| 2026-11-17 | 9.95 | 29 | 入选 |