Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

test: fix post-merge test breakages from #2227 #2233 #2238

diegosouzapw831f64ed38e1
diff --git a/open-sse/executors/antigravity.ts b/open-sse/executors/antigravity.ts
index 132c066ec3..9d6fce0dab 100644
--- a/open-sse/executors/antigravity.ts
+++ b/open-sse/executors/antigravity.ts
@@ -55,7 +55,7 @@ interface AntigravityContent {
}
type AntigravityCredentials = ProviderCredentials & {
- projectId?: string;
+ projectId?: string | null;
expiresIn?: number;
};
diff --git a/tests/unit/responses-handler.test.ts b/tests/unit/responses-handler.test.ts
index 450ca31099..743faea99a 100644
--- a/tests/unit/responses-handler.test.ts
+++ b/tests/unit/responses-handler.test.ts
@@ -306,7 +306,10 @@ test("handleResponsesCore rejects invalid Responses API input that cannot be tra
);
});
-test("handleResponsesCore injects SSE keepalive comments for Responses streams", async (t) => {
+test("handleResponsesCore injects SSE keepalive frames for Responses streams", async (t) => {
+ // PR #2233 changed the Responses-API heartbeat shape from a SSE comment
+ // (`: keepalive ...`) to a `data: {"type":"response.in_progress"}` frame,
+ // because strict proxies only count `data:` lines as activity.
t.mock.timers.enable({ apis: ["setInterval"] });
try {
const { result } = await invokeResponsesCore({
@@ -321,7 +324,7 @@ test("handleResponsesCore injects SSE keepalive comments for Responses streams",
const sse = await result.response.text();
- assert.match(sse, /^: keepalive .*$/m);
+ assert.match(sse, /data: \{"type":"response\.in_progress"\}/);
assert.match(sse, /event: response\.created/);
assert.match(sse, /data: \[DONE\]/);
} finally {
diff --git a/tests/unit/search-registry.test.ts b/tests/unit/search-registry.test.ts
index 01bd1adc88..8c21f07926 100644
--- a/tests/unit/search-registry.test.ts
+++ b/tests/unit/search-registry.test.ts
@@ -154,7 +154,7 @@ test("zai-search config is correct", () => {
test("getAllSearchProviders returns flat list", () => {
const all = getAllSearchProviders();
- assert.equal(all.length, 11);
+ assert.equal(all.length, 12);
assert.ok(all.some((p) => p.id === "serper-search"));
assert.ok(all.some((p) => p.id === "brave-search"));
assert.ok(all.some((p) => p.id === "perplexity-search"));