test(cliproxy): add thinking suffix test and document exit 0 behavior

- Add test case for comma-separated thinking params (32768,extended)
- Add clarifying comment to isProviderError() about exit 0 handling
This commit is contained in:
Tam Nhu Tran committed 2026-02-12 11:04:37 +07:00
1 parent b6e1d0c481
commit c35de7ec9a
2 files changed
+16

No files matched your search

+2
View File
@@ -125,6 +125,8 @@ export function detectFailedTier(
/** Check if Claude exit indicates provider error (vs normal user exit) */
export function isProviderError(exitCode: number, stderr: string): boolean {
// Exit code 0 means success, even if stderr has error-like output
// (could be warnings, debug info, etc.)
if (exitCode === 0) return false;
return PROVIDER_ERROR_PATTERNS.some((p) => p.test(stderr));
}