Add vLLM models authentication diagnostics

This commit is contained in:
2026-11-22 18:17:30 +00:00
parent ca8cf1b827
commit c3257b63f0
9 changed files with 116 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ import (
)
func TestAuthenticationSelection(t *testing.T) {
none, explicit, endpoint := "none", "openrouter_key", "https://diagnostics.example/probe"
none, explicit, models, endpoint := "none", "openrouter_key", "vllm_models", "https://diagnostics.example/probe"
for _, tc := range []struct {
name, provider, adapter, destination string
metadata *domain.BackendSmokeTestConfig
@@ -18,6 +18,10 @@ func TestAuthenticationSelection(t *testing.T) {
{name: "explicit adapter", metadata: &domain.BackendSmokeTestConfig{Authentication: &domain.AuthenticationProbeConfig{Kind: &explicit}}, adapter: "openrouter_key", destination: "https://example.test/v1/key"},
{name: "disabled", provider: "openrouter", metadata: &domain.BackendSmokeTestConfig{Authentication: &domain.AuthenticationProbeConfig{Kind: &none}}, adapter: "none", destination: "https://example.test/v1"},
{name: "generic unsupported", destination: "https://example.test/v1"},
{name: "vllm default", provider: "vllm", adapter: "vllm_models", destination: "https://example.test/v1/models"},
{name: "vllm override", provider: "vllm", metadata: &domain.BackendSmokeTestConfig{Authentication: &domain.AuthenticationProbeConfig{Endpoint: &endpoint}}, adapter: "vllm_models", destination: endpoint},
{name: "explicit vllm on generic", metadata: &domain.BackendSmokeTestConfig{Authentication: &domain.AuthenticationProbeConfig{Kind: &models}}, adapter: "vllm_models", destination: "https://example.test/v1/models"},
{name: "disabled vllm", provider: "vllm", metadata: &domain.BackendSmokeTestConfig{Authentication: &domain.AuthenticationProbeConfig{Kind: &none}}, adapter: "none", destination: "https://example.test/v1"},
} {
t.Run(tc.name, func(t *testing.T) {
kind := AuthenticationAdapter(tc.provider, tc.metadata)