Add config validators (#22704)

* add validator for detect width and height

require both or neither

* coerce semantic search model string to enum

Built-in model names (jinav1, jinav2) get converted to the enum, genai provider names that don't match stay as plain strings and follow the existing validation path

* formatting
This commit is contained in:
Josh Hawkins
2026-03-30 08:34:54 -05:00
committed by GitHub
parent f0a6626c6a
commit a5e3dfd107
3 changed files with 22 additions and 3 deletions

View File

@@ -1188,7 +1188,7 @@ class TestConfig(unittest.TestCase):
def test_global_detect_merge(self):
config = {
"mqtt": {"host": "mqtt"},
"detect": {"max_disappeared": 1, "height": 720},
"detect": {"max_disappeared": 1, "height": 720, "width": 1280},
"cameras": {
"back": {
"ffmpeg": {