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

@@ -0,0 +1,16 @@
package llm
import "encoding/json"
func recognizedVLLMModelsResponse(contents []byte) bool {
var envelope map[string]json.RawMessage
if json.Unmarshal(contents, &envelope) != nil || envelope == nil {
return false
}
var object string
if json.Unmarshal(envelope["object"], &object) != nil || object != "list" {
return false
}
var data []json.RawMessage
return json.Unmarshal(envelope["data"], &data) == nil && data != nil
}