From dcfabc2261b8e2371cd94aae871625fef57f4b6b Mon Sep 17 00:00:00 2001 From: PeninsulaInd Date: Wed, 25 Mar 2026 15:30:36 -0500 Subject: [PATCH] Fix NoneType crash in LLM plural check when OpenRouter returns null content Co-Authored-By: Claude Opus 4.6 (1M context) --- cheddahbot/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheddahbot/scheduler.py b/cheddahbot/scheduler.py index 213c76f..9a72cbe 100644 --- a/cheddahbot/scheduler.py +++ b/cheddahbot/scheduler.py @@ -134,7 +134,7 @@ class Scheduler: timeout=15, ) resp.raise_for_status() - answer = resp.json()["choices"][0]["message"]["content"].strip() + answer = (resp.json()["choices"][0]["message"]["content"] or "").strip() result = "YES" in answer.upper() log.debug("LLM plural check: '%s' vs '%s' ->%s (%s)", a, b, result, answer) except Exception as e: