fix: 覆盖 Codex retry 503 分类

This commit is contained in:
Codex
2026-05-29 14:17:12 +08:00
parent 7534b87153
commit 81642fdd54
4 changed files with 50 additions and 6 deletions
+23
View File
@@ -54,6 +54,29 @@ for await (const line of rl) {
respond(message.id, { turn });
continue;
}
if (mode === "provider-503-retry-event") {
turnCounter += 1;
const turn = {
id: `turn_selftest_${turnCounter}`,
status: "failed",
error: {
message: "unexpected status 503 Service Unavailable: Service temporarily unavailable",
codexErrorInfo: { responseStreamDisconnected: { httpStatusCode: 503 } },
},
};
notify("turn/started", { turn: { id: turn.id, status: "running" } });
notify("error", {
willRetry: true,
error: {
message: "Reconnecting... 1/5",
codexErrorInfo: { responseStreamDisconnected: { httpStatusCode: 503 } },
additionalDetails: "unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://hyueapi.com/responses",
},
});
notify("turn/completed", { turn });
respond(message.id, { turn });
continue;
}
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
notify("turn/started", { turn });