(entry homeModelEntry, action string)
| 1271 | } |
| 1272 | |
| 1273 | func 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) |
no outgoing calls
no test coverage detected