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

fix(batch): F10 audit — increase flaky perf test threshold from 100ms to 500ms

diegosouzapw69394a906ea7
diff --git a/tests/unit/lib/batches/costEstimator.test.ts b/tests/unit/lib/batches/costEstimator.test.ts
index c6522812fd..f065c4564e 100644
--- a/tests/unit/lib/batches/costEstimator.test.ts
+++ b/tests/unit/lib/batches/costEstimator.test.ts
@@ -135,13 +135,13 @@ test("estimateBatchCost: Anthropic shape (params) → parses params instead of b
// ── Performance ────────────────────────────────────────────────────────────────
-test("estimateBatchCost: 1000 lines processed in < 100ms", () => {
+test("estimateBatchCost: 1000 lines processed in < 500ms", () => {
const lines = Array.from({ length: 1000 }, (_, i) => makeLine(`req-${i}`, "gpt-4o", 256));
const jsonl = makeJsonl(lines);
const start = Date.now();
const result = estimateBatchCost({ jsonl, model: "gpt-4o", endpoint: ENDPOINT });
const elapsed = Date.now() - start;
- assert.ok(elapsed < 100, `should complete in < 100ms, took ${elapsed}ms`);
+ assert.ok(elapsed < 500, `should complete in < 500ms, took ${elapsed}ms`);
assert.equal(result.totalRequests, 1000);
});