mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 05:17:59 +00:00
Reworked the Hugging Face provider (#944)
This commit is contained in:
1 parent
a7228c7782
commit
f14c69b938
28 files changed
+1039
-93
No files matched your search
@@ -3,16 +3,46 @@
|
||||
/// <summary>
|
||||
/// Enum for inference providers that Hugging Face supports.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Besides the providers themselves, this enum carries the routing strategies Hugging Face offers.
|
||||
/// They are no providers, but they take the same place: the router picks a provider for us instead
|
||||
/// of us naming one.
|
||||
///
|
||||
/// NONE must stay the first value: settings are read through the tolerant enum converter, which
|
||||
/// falls back to the first value whenever it meets a name we no longer know. That is what happens
|
||||
/// to a configuration naming one of the providers Hugging Face stopped routing in July 2026
|
||||
/// (Hyperbolic, SambaNova, Nebius, NVIDIA, Clarifai, Black Forest Labs), and to one naming the
|
||||
/// Hugging Face Inference API, which serves no model we can reach: it has no chat models at all,
|
||||
/// and its OpenAI-compatible routes for embeddings and transcription do not exist. Such a provider
|
||||
/// has to end up on NONE, where the validation asks the user to choose again. Were a routing
|
||||
/// strategy first, those configurations would silently switch to automatic routing instead.
|
||||
/// </remarks>
|
||||
public enum HFInferenceProvider
|
||||
{
|
||||
NONE,
|
||||
|
||||
|
||||
//
|
||||
// Routing strategies. Hugging Face writes them where a provider name would go:
|
||||
//
|
||||
AUTOMATIC,
|
||||
CHEAPEST,
|
||||
PREFERRED,
|
||||
|
||||
//
|
||||
// The providers Hugging Face routes:
|
||||
//
|
||||
BASETEN,
|
||||
CEREBRAS,
|
||||
NEBIUS_AI_STUDIO,
|
||||
SAMBANOVA,
|
||||
NOVITA,
|
||||
HYPERBOLIC,
|
||||
TOGETHER_AI,
|
||||
COHERE,
|
||||
DEEPINFRA,
|
||||
FEATHERLESS_AI,
|
||||
FIREWORKS,
|
||||
HF_INFERENCE_API,
|
||||
GROQ,
|
||||
NOVITA,
|
||||
NSCALE,
|
||||
OVHCLOUD,
|
||||
PUBLIC_AI,
|
||||
SCALEWAY,
|
||||
TOGETHER_AI,
|
||||
ZAI,
|
||||
}
|
||||
Reference in new issue
Block a user