fix: 覆盖 Codex retry 503 分类
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user