summaryrefslogtreecommitdiff
path: root/internal/notify/notify.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-11 09:37:31 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-11 09:37:31 +0000
commit027536520409757ba38cd4c78e07b2ca0797a2d7 (patch)
treedc0671430ede3e0adf80d6640ed62c7d7c979264 /internal/notify/notify.go
parent7978760316319d22670cd6369c15b68c649761bc (diff)
fix(executor): validate the model classifier's output against a known model list
The Gemini-based Classifier trusted its LLM output verbatim. Twice in production it echoed part of its own prompt's JSON schema literally -- 'model-name' (the prompt's own placeholder, also fixed here to be less echo-prone) and separately 'choose-the-best-model' -- instead of substituting a real model identifier. Both were syntactically valid JSON strings that passed straight through to the claude CLI's --model flag, which rejected them and failed the task outright. validateClassification now rejects anything outside the known model list, which Classify's existing error handling already treats as 'classification failed' and falls back to no explicit model override -- the same documented fallback path, now also covering 'succeeded but returned garbage.'
Diffstat (limited to 'internal/notify/notify.go')
0 files changed, 0 insertions, 0 deletions