Added the optional API key to every self-hosted host

This commit is contained in:
Thorsten Sommer 2026-09-16 18:43:01 +02:00
parent e137bece1b
commit d7b922219e
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -491,7 +491,11 @@ public static class LLMProvidersExtensions
LLMProviders.GWDG => true,
LLMProviders.HUGGINGFACE => true,
LLMProviders.SELF_HOSTED => host is (Host.OLLAMA or Host.VLLM),
// Every self-hosted engine can ask for a key: LM Studio brings its own tokens, and any of
// them can sit behind a proxy which authenticates. The field is labeled as optional for
// them, so offering it costs nothing where no key is needed, while leaving it out means
// the user cannot enter the one their server expects:
LLMProviders.SELF_HOSTED => host is not Host.NONE,
_ => false,
};