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
/**
* GET /api/tools/agent-bridge/agents
* Returns the full list of registered MITM targets mapped to a stable UI shape.
* LOCAL_ONLY: registered in routeGuard.ts
*/
import { ALL_TARGETS } from "@/mitm/targets/index";
import { detectAgent } from "@/mitm/detection/index";
import { sanitizeErrorMessage } from "@omniroute/open-sse/utils/error";
import { createErrorResponse } from "@/lib/api/errorResponse";
export async function GET(): Promise<Response> {
try {
const agents = ALL_TARGETS.map((t) => ({
id: t.id,
name: t.name,
hosts: t.hosts,
viability: t.viability ?? "supported",
state: detectAgent(t.id),
}));
return Response.json({ agents });
} catch (err) {
const msg = sanitizeErrorMessage(err instanceof Error ? err.message : String(err));
return createErrorResponse({ status: 500, message: msg });
}
}