MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / homeGeminiModelMatches

Function homeGeminiModelMatches

internal/api/server.go:1273–1281  ·  view source on GitHub ↗
(entry homeModelEntry, action string)

Source from the content-addressed store, hash-verified

1271}
1272
1273func homeGeminiModelMatches(entry homeModelEntry, action string) bool {
1274 id := strings.TrimSpace(entry.id)
1275 if id == "" || action == "" {
1276 return false
1277 }
1278 normalizedAction := strings.TrimPrefix(action, "models/")
1279 normalizedID := strings.TrimPrefix(id, "models/")
1280 return action == id || action == "models/"+id || normalizedAction == normalizedID
1281}
1282
1283// homeModelsAuthStatus inspects a home models response for an authentication/error envelope.
1284// It returns the HTTP status code to surface (401 for credential issues, 502 otherwise)

Callers 1

handleHomeGeminiModelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected