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
test(quota): combo protection guard matches qtSd/ prefix
diegosouzapw5d84a8fa7a1f
diff --git a/tests/unit/combos-quota-protected.test.ts b/tests/unit/combos-quota-protected.test.tsindex b9dd5c7f99..6c1776a86d 100644--- a/tests/unit/combos-quota-protected.test.ts+++ b/tests/unit/combos-quota-protected.test.ts@@ -42,9 +42,9 @@ test.after(() => {// ---- quota-protected combos -----test("DELETE /api/combos/[id] returns 409 for a quotaShared-* combo and does NOT delete it", async () => {+test("DELETE /api/combos/[id] returns 409 for a qtSd/* combo and does NOT delete it", async () => {const combo = await combosDb.createCombo({- name: "quotaShared-mypool-openai/gpt-4o",+ name: "qtSd/groupdemo/openai/gpt-4o",strategy: "priority",models: [{ provider: "openai", model: "gpt-4o" }],isHidden: true,@@ -67,16 +67,16 @@ test("DELETE /api/combos/[id] returns 409 for a quotaShared-* combo and does NOTassert.ok(still, "Quota combo must still exist after rejected DELETE");});-test("PUT /api/combos/[id] returns 409 for a quotaShared-* combo and does NOT mutate it", async () => {+test("PUT /api/combos/[id] returns 409 for a qtSd/* combo and does NOT mutate it", async () => {const combo = await combosDb.createCombo({- name: "quotaShared-mypool-openai/gpt-4o",+ name: "qtSd/groupdemo/openai/gpt-4o",strategy: "priority",models: [{ provider: "openai", model: "gpt-4o" }],isHidden: true,});const response = await comboRoute.PUT(- makePutRequest(combo.id, { name: "quotaShared-mypool-openai/gpt-4o", strategy: "random" }),+ makePutRequest(combo.id, { name: "qtSd/groupdemo/openai/gpt-4o", strategy: "random" }),{ params: Promise.resolve({ id: combo.id }) });