From ba71e79abd9afed0893a1aef9599fa03a6847596 Mon Sep 17 00:00:00 2001 From: Louis Lefebvre Date: Fri, 20 Feb 2026 22:04:32 +0000 Subject: [PATCH] Allow vllm provider to work without API key Skip the API key requirement check when using the vllm provider, enabling use of OpenAI-compatible endpoints that don't require authentication (e.g. opencode.ai/zen free models). --- pkg/providers/factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/providers/factory.go b/pkg/providers/factory.go index b6f1b5e21..b22d3e94b 100644 --- a/pkg/providers/factory.go +++ b/pkg/providers/factory.go @@ -295,7 +295,7 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) { } if sel.providerType == providerTypeHTTPCompat { - if sel.apiKey == "" && !strings.HasPrefix(model, "bedrock/") { + if sel.apiKey == "" && !strings.HasPrefix(model, "bedrock/") && providerName != "vllm" { return providerSelection{}, fmt.Errorf("no API key configured for provider (model: %s)", model) } if sel.apiBase == "" {