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 assert from "node:assert/strict";
import test from "node:test";
import { fileURLToPath } from "node:url";
import { build } from "esbuild";
const REPO_ROOT = fileURLToPath(new URL("../..", import.meta.url));
async function assertBrowserBundleSafe(relativePath: string) {
await assert.doesNotReject(
build({
absWorkingDir: REPO_ROOT,
entryPoints: [fileURLToPath(new URL(relativePath, import.meta.url))],
bundle: true,
format: "esm",
logLevel: "silent",
platform: "browser",
tsconfig: "tsconfig.json",
write: false,
})
);
}
test("media page client entry stays browser-bundle safe", async () => {
await assertBrowserBundleSafe(
"../../src/app/(dashboard)/dashboard/cache/media/MediaPageClient.tsx"
);
});
test("provider detail client entry stays browser-bundle safe", async () => {
await assertBrowserBundleSafe(
"../../src/app/(dashboard)/dashboard/providers/[id]/ProviderDetailPageClient.tsx"
);
});