mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-17 12:22:34 +03:00
Merged in the 2026-09-16 sweep of the maintainer's own open PRs, at the owner's explicit instruction. No push was made to the PR branch: the merge took the head as the owning session left it (verified OPEN, non-draft and MERGEABLE against the release tip immediately before merging).
19 lines
927 B
TypeScript
19 lines
927 B
TypeScript
/**
|
|
* Shared classification for browser-backed executors: distinguishes a missing Playwright
|
|
* Chromium binary (`chromium.launch: Executable doesn't exist at ...`) from a transient upstream
|
|
* fault. This is a host/config problem, not something a retry loop can fix, so executors must
|
|
* NOT surface it as a plain retryable 5xx (which marks the account unavailable / trips the
|
|
* provider circuit breaker). Originally added for `gemini-web.ts` (#3516); extracted here so
|
|
* every browser-backed executor (Gemini Web, Z.ai Web, ...) can share the same detection.
|
|
*/
|
|
export function isMissingBrowserExecutable(message: string): boolean {
|
|
if (!message) return false;
|
|
const lower = message.toLowerCase();
|
|
return (
|
|
lower.includes("executable doesn't exist") ||
|
|
lower.includes("executablenotfound") ||
|
|
lower.includes("playwright install") ||
|
|
(lower.includes("chromium") && lower.includes("download"))
|
|
);
|
|
}
|