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
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
import { defineConfig } from "vitest/config";
import path from "path";
export default defineConfig({
test: {
environment: "node",
globals: true,
pool: "threads",
// MCP suites initialize isolated SQLite databases; Vitest 5 at 20 workers
// makes native migration/close operations contend and flakes audit tests.
// Keep all files/tests enabled while bounding the worker fan-out.
maxWorkers: 4,
fileParallelism: true,
maxConcurrency: 20,
include: [
"open-sse/mcp-server/__tests__/**/*.test.ts",
"open-sse/services/autoCombo/__tests__/**/*.test.ts",
"open-sse/services/combo/__tests__/**/*.test.ts",
"open-sse/services/__tests__/antigravity-quota-family.test.ts",
// #8890 shipped this suite into a directory no runner collects, so it had
// never executed once (check:test-discovery flags it as a NEW orphan).
"open-sse/services/__tests__/fail-fast-concurrency-gate.test.ts",
"src/lib/memory/__tests__/generic-backend.test.ts",
"tests/unit/autoCombo/**/*.test.ts",
"tests/unit/api/**/*.spec.ts",
"tests/unit/encryption.spec.ts",
"src/shared/components/**/*.test.tsx",
"src/shared/hooks/__tests__/**/*.test.tsx",
"src/app/(dashboard)/**/__tests__/**/*.test.tsx",
],
exclude: ["**/node_modules/**", "**/.git/**"],
coverage: {
reportsDirectory: "coverage",
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
// Mirrors tsconfig paths. Without it, a UI test importing from open-sse
// resolves to undefined instead of failing loudly — which silently made
// every provider look credentialed in the free-tier card tests.
"@omniroute/open-sse": path.resolve(__dirname, "./open-sse"),
},
},
});