From a011df1ddc584f5f8f1f1f0589093db766ce6be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E6=99=BA=E8=B6=850668000959?= Date: Sun, 7 Jun 2026 20:54:00 +0800 Subject: [PATCH] fix: add ok check for singleflight type assertion in model probe singleflight.Group.Do() returns any, which is type-asserted as bool without an ok check at model_status.go:211. If a non-bool value is returned (e.g. nil from shared/cache corruption), this panics. Add ok check and return false (model probe failed) as a safe default. --- web/backend/api/model_status.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/backend/api/model_status.go b/web/backend/api/model_status.go index 03666ae9f..0ecdf9412 100644 --- a/web/backend/api/model_status.go +++ b/web/backend/api/model_status.go @@ -208,7 +208,10 @@ func (s *modelProbeCacheState) probe(cacheKey string, probeFunc func() bool) boo return result, nil }) - result, _ := v.(bool) + result, ok := v.(bool) + if !ok { + return false + } return result }