fix: 归类 v0.1 provider 可用性失败

This commit is contained in:
Codex
2026-05-29 14:05:15 +08:00
parent 8412073944
commit 7534b87153
9 changed files with 39 additions and 5 deletions
+12
View File
@@ -35,6 +35,10 @@ for await (const line of rl) {
respond(message.id, {});
continue;
}
if (mode === "provider-503-rpc-error") {
respond(message.id, null, { code: -32000, message: "responseStreamDisconnected: HTTP 503 Service Unavailable from provider" });
continue;
}
if (mode === "missing-terminal") {
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "running" };
@@ -42,6 +46,14 @@ for await (const line of rl) {
respond(message.id, { turn });
continue;
}
if (mode === "provider-503-terminal") {
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "failed", error: { message: "HTTP 503 Service Unavailable" } };
notify("turn/started", { turn: { id: turn.id, status: "running" } });
notify("turn/completed", { turn });
respond(message.id, { turn });
continue;
}
turnCounter += 1;
const turn = { id: `turn_selftest_${turnCounter}`, status: "completed" };
notify("turn/started", { turn });