LocalAI/core/gallery
lif d7b2eee08f
fix: add nil checks before mergo.Merge to prevent panic in gallery model installation (#7785)
Fixes #7420

Added nil checks before calling mergo.Merge in InstallModelFromGallery and InstallModel
functions to prevent panic when req.Overrides or configOverrides are nil. The panic was
occurring at models.go:248 during Qwen-Image-Edit gallery model download.

Changes:
- Added nil check for req.Overrides before merging in InstallModelFromGallery (line 126)
- Added nil check for configOverrides before merging in InstallModel (line 248)
- Added test case to verify nil configOverrides are handled without panic

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-30 09:51:45 +01:00
..
importers chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
backend_types.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
backends.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
backends_test.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
gallery.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
gallery_suite_test.go feat: Add backend gallery (#5607) 2025-06-15 14:56:52 +02:00
gallery_test.go feat(ui): allow to order search results (#7507) 2025-12-11 00:11:33 +01:00
metadata_type.go feat: Add backend gallery (#5607) 2025-06-15 14:56:52 +02:00
models.go fix: add nil checks before mergo.Merge to prevent panic in gallery model installation (#7785) 2025-12-30 09:51:45 +01:00
models_test.go fix: add nil checks before mergo.Merge to prevent panic in gallery model installation (#7785) 2025-12-30 09:51:45 +01:00
models_types.go feat(ui): allow to order search results (#7507) 2025-12-11 00:11:33 +01:00
request_test.go feat: Add backend gallery (#5607) 2025-06-15 14:56:52 +02:00