From 71965e836608792041c9f5e84165339a90c8483d Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 3 Nov 2025 07:23:57 -0700 Subject: [PATCH] Correctly remove classification model from config --- frigate/api/classification.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frigate/api/classification.py b/frigate/api/classification.py index 975370d59..bd450bcc0 100644 --- a/frigate/api/classification.py +++ b/frigate/api/classification.py @@ -844,8 +844,15 @@ def delete_classification_model(request: Request, name: str): config_file = find_config_file() try: # Setting value to empty string deletes the key - updates = {f"classification.custom.{name}": None} + updates = {"classification.custom": None} update_yaml_file_bulk(config_file, updates) + + # Reload and update the in-memory config + with open(config_file, "r") as f: + new_raw_config = f.read() + + new_config = FrigateConfig.parse(new_raw_config) + request.app.frigate_config = new_config except Exception as e: logger.error(f"Error updating config file: {e}") return JSONResponse(