fix(modes): accept code_review as alias for codereview
External callers (lakehouse observer.ts) escalate to /api/run with mode "code_review" (underscored), but the canonical registered mode is "codereview", so those calls hit the unknown-mode 400 and silently dropped. Normalize the alias right after reading the mode so it validates and dispatches via RUNNERS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
083f05c093
commit
5625df924f
@ -10769,6 +10769,11 @@ def run_team():
|
|||||||
return jsonify({"error": "Request body required"}), 400
|
return jsonify({"error": "Request body required"}), 400
|
||||||
|
|
||||||
mode = config.get("mode", "")
|
mode = config.get("mode", "")
|
||||||
|
# Alias: external callers (e.g. lakehouse observer.ts) escalate to the underscored
|
||||||
|
# `code_review`, but the canonical registered mode is `codereview` — normalize so
|
||||||
|
# those calls dispatch via RUNNERS instead of silently failing the 400 below.
|
||||||
|
if mode == "code_review":
|
||||||
|
mode = "codereview"
|
||||||
if not mode:
|
if not mode:
|
||||||
return jsonify({"error": "Mode is required"}), 400
|
return jsonify({"error": "Mode is required"}), 400
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user