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

864 B
Raw Blame
import assert from "node:assert/strict";
import test from "node:test";

import { FREE_MODEL_BUDGETS } from "../../open-sse/config/freeModelCatalog.ts";
import { getRegistryEntry } from "../../open-sse/config/providerRegistry.ts";

const LIVE_AGENTROUTER_MODEL_IDS = ["claude-opus-4-8", "claude-opus-5", "gpt-5.6-sol"];

test("AgentRouter registry fallback matches the authenticated live catalog", () => {
  const ids = getRegistryEntry("agentrouter")
    ?.models.map((model) => model.id)
    .sort();
  assert.deepEqual(ids, [...LIVE_AGENTROUTER_MODEL_IDS].sort());
});

test("AgentRouter free-model fallback exposes only currently routable model IDs", () => {
  const ids = FREE_MODEL_BUDGETS.filter((model) => model.provider === "agentrouter")
    .map((model) => model.modelId)
    .sort();
  assert.deepEqual(ids, [...LIVE_AGENTROUTER_MODEL_IDS].sort());
});