diegosouzapw/OmniRoute · error · SentinelBlockedError
Sentinel /prepare blocked
Error message
Sentinel /prepare blocked (HTTP ${prepResp.status}) What it means
Sentinel anti-bot guard (SentinelBlockedError): the stage-1 POST to /chat-requirements/prepare returned 401/403. ChatGPT's Sentinel/Cloudflare layer actively blocked the request before issuing a prepare_token — the session looks automated or the credential/fingerprint was rejected; subsequent conversation calls cannot proceed on this session.
Solutions
- Refresh the session cookie — a stale session often trips the Sentinel check
- Reduce request frequency and let the account cool down if it was flagged for automation
- Complete any verification challenge in a real browser on the same account, then re-save the cookie
- Route to a different provider while the ChatGPT web session is blocked
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at open-sse/executors/chatgpt-web.ts:456 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/d34499e776430b52.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/executors/chatgpt-web.ts:456
...browserHeaders(),
...oaiHeaders(sessionId, deviceId),
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`,
Cookie: buildSessionCookieHeader(cookie),
Priority: "u=1, i",
};
if (accountId) headers["chatgpt-account-id"] = accountId;
// Stage 1: POST /chat-requirements/prepare → { prepare_token, ... }
const prepResp = await tlsFetchChatGpt(SENTINEL_PREPARE_URL, {
method: "POST",
headers,
body: JSON.stringify({ p: prekey }),
timeoutMs: 30_000,
signal,
});
if (prepResp.status === 401 || prepResp.status === 403) {
throw new SentinelBlockedError(`Sentinel /prepare blocked (HTTP ${prepResp.status})`);
}
if (prepResp.status >= 400) {
throw new Error(`Sentinel /prepare failed (HTTP ${prepResp.status})`);
}
let prepData: ChatRequirements = {};
try {
prepData = JSON.parse(prepResp.text || "{}") as ChatRequirements;
} catch {
console.warn("[chatgpt-web] chat requirements prep JSON parse failed");
/* keep empty */
}
// Stage 2: POST /chat-requirements with the prepare_token in the body. This
// is the call that actually returns the chat-requirements-token used on the
// conversation request.
if (!prepData.prepare_token) {
return prepData; // pass through whatever we got — caller handles missing fields
}
View on GitHub (pinned to a179ffed5b)