Add vLLM models authentication diagnostics
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user