diegosouzapw/OmniRoute · error · Error
HTTP ${res.status}
Error message
HTTP ${res.status} What it means
Error "HTTP ${res.status}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/(dashboard)/dashboard/cli-code/components/ClaudeClassifierCompatToggle.tsx:41
* Claude Code's `--permission-mode auto` sends an internal `/v1/messages` security-classifier
* request that requires the response to START with `<block>no</block>` (ALLOW) / `<block>yes</block>`
* (BLOCK). When a combo/fallback route sends that call to a cheap model returning empty content,
* Claude Code fails closed on every gated action. "auto" detects the classifier request and
* short-circuits with a synthetic ALLOW response without calling upstream; "always" applies it to
* every Claude-format request. Cycles off → auto → always via the existing /api/settings PATCH.
*/
export default function ClaudeClassifierCompatToggle() {
const t = useTranslations("cliTools");
const [mode, setMode] = useState<CompatMode>("off");
const [loading, setLoading] = useState(true);
const [saving, setSaving] = useState(false);
const [error, setError] = useState<string | null>(null);
const load = useCallback(async () => {
setLoading(true);
try {
const res = await fetch("/api/settings");
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
setMode(isCompatMode(data?.claudeClassifierCompat) ? data.claudeClassifierCompat : "off");
setError(null);
} catch (err) {
setError(err instanceof Error ? err.message : t("classifierCompatLoadFailed"));
} finally {
setLoading(false);
}
}, [t]);
useEffect(() => {
load();
}, [load]);
const cycle = useCallback(async () => {
const next = MODES[(MODES.indexOf(mode) + 1) % MODES.length];
const previous = mode;
setMode(next); // optimisticView on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/(dashboard)/dashboard/cli-code/components/ClaudeClassifierCompatToggle.tsx:41 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/548d3f00668290e2.
Report an issue: GitHub.