Hugging Face改用OpenRouter路由
Hugging Face与OpenRouter宣布,Hugging Face Inference Providers的语言模型请求现由OpenRouter的提供商路由系统处理。用户仍可使用原有Hugging Face令牌和API,OpenRouter会依据实时价格、速度与可靠性数据选择提供商,并在请求失败时尝试另一家提供商。语言模型请求不再支持用户自带的提供商API密钥,而是计入Hugging Face账户账单。
此次调整让开发者无需修改代码即可获得自动选路与故障转移,同时改变了密钥使用和计费方式。
Hugging 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 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.
Today, we are switching 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.
Run them with the tools you already use
The 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:
#Hugging Face#OpenRouter#Hugging Face Inference Providers#Hugging Face Hub