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

fix(routing): add missing v1beta rewrites to next.config to resolve 404 on Gemini models endpoint (#2102)

diegosouzapw862a9c2c8955
diff --git a/next.config.mjs b/next.config.mjs
index c0d33ed51d..34e209a73e 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -189,6 +189,14 @@ const nextConfig = {
source: "/v1",
destination: "/api/v1",
},
+ {
+ source: "/v1beta/:path*",
+ destination: "/api/v1beta/:path*",
+ },
+ {
+ source: "/v1beta",
+ destination: "/api/v1beta",
+ },
];
},
};