02 / IT · Analysis
Hugging Face routes language models through OpenRouter
Failed requests are retried with another provider, while support for users' own provider keys ends for language models.
Hugging Face said existing API users can access OpenRouter routing for language models with no pricing change. Users pay the provider's price. Hugging Face adds no markup.
According to the announcement, the previous router returned an error when the selected provider failed. It now retries the request with another provider. That changes what happens before an error reaches the user.
Hugging Face also said support for users' own provider API keys has ended for language models. Existing calling code can stay the same. Charges go to the user's Hugging Face account or organisation.
How failed requests are retried
Hugging Face said routing balances price, speed and reliability when selecting a provider. Requests move elsewhere when a provider slows down or fails. A failed attempt is retried within the same API call.
The announcement lists :fastest for the highest throughput and :cheapest for the lowest price. Users can add these suffixes to a model identifier to choose a routing policy. They can also specify a single provider.
Where support for custom keys ends
Hugging Face said users can no longer supply their own provider keys for language models. Custom keys for image and video providers still work. Image, video and audio generation retain their existing routing without going through OpenRouter.
Hugging Face named OpenRouter account linking as a next step. The announcement gives no launch timing for that connection. Users keeping their existing code still need to check whether it relies on their own provider keys.