Add Hugging Face as a chat provider
Lets users with an existing Hugging Face account chat through HF's Inference Providers router without signing up for another provider. Model IDs are namespaced hf:org/model-name to avoid inferProvider's OpenRouter "/" heuristic misrouting them; curated model list plus a "Custom Model ID…" entry point stand in for HF's lack of a catalog/ pricing API.
This commit is contained in:
@@ -57,10 +57,12 @@ struct Settings: Codable {
|
||||
case openai
|
||||
case ollama
|
||||
case appleOnDevice = "apple_on_device"
|
||||
case huggingface
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .appleOnDevice: return "Apple Intelligence"
|
||||
case .huggingface: return "Hugging Face"
|
||||
default: return rawValue.capitalized
|
||||
}
|
||||
}
|
||||
@@ -72,6 +74,7 @@ struct Settings: Codable {
|
||||
case .openai: return "sparkles"
|
||||
case .ollama: return "server.rack"
|
||||
case .appleOnDevice: return "apple.logo"
|
||||
case .huggingface: return "face.smiling"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user