fix: raw:true bypass for router keyword fast-paths + c-suite fallback agent

Two live-observed router hijack modes on diff content: (1) retail/store
fast-paths (store-resolver, arm:sales) intercepting prompts whose diffs
mention sales/store-ish words, (2) domain preflight 400 agent_mismatch
when the intent classifier confidently misclassifies a diff. raw:true
(_bypassToolRouting) disables the keyword intercepts; attempt 2 retries
as the configurable c-suite fallback agent (architect) which bypasses
the tier-gated domain preflight.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Nirav Patel
2026-08-19 00:00:37 -04:00
co-authored by Claude Fable 5
parent 7416df88c9
commit f7b56297a8
3 changed files with 15 additions and 5 deletions
+8 -4
View File
@@ -6,10 +6,14 @@ export async function chat({ routerUrl, model, messages, agentId, sessionId, ten
const res = await fetch(`${routerUrl.replace(/\/$/, '')}/v1/chat`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
// tools:false — reviews need pure model reasoning; it also keeps the
// router's tool/skill fast-paths (e.g. current-info briefing) from
// hijacking prompts whose diffs mention GitHub/news-like terms.
body: JSON.stringify({ model, messages, agentId, sessionId, tenantId, stream: false, tools: false }),
// tools:false + raw:true — reviews need pure model reasoning. raw:true is
// the router's sanctioned _bypassToolRouting flag: without it, keyword
// fast-paths (current-info briefing, store-resolver, retail dispatch)
// hijack prompts whose DIFF CONTENT mentions github/sales/store-ish terms
// and return non-review text. The domain preflight (agent_mismatch 400)
// still applies per agent tier; the pipeline's attempt-2 fallback agent
// covers that.
body: JSON.stringify({ model, messages, agentId, sessionId, tenantId, stream: false, tools: false, raw: true }),
signal: AbortSignal.timeout(timeoutMs)
});
if (!res.ok) {