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 { redirect } from "next/navigation";
const LEGACY_TAB_ROUTES: Record<string, string> = {
advanced: "/dashboard/settings/advanced",
ai: "/dashboard/settings/ai",
appearance: "/dashboard/settings/appearance",
featureFlags: "/dashboard/settings/feature-flags",
"feature-flags": "/dashboard/settings/feature-flags",
cache: "/dashboard/settings/cache",
general: "/dashboard/settings/general",
modalityBridge: "/dashboard/settings/modality-bridge",
"modality-bridge": "/dashboard/settings/modality-bridge",
resilience: "/dashboard/settings/resilience",
routing: "/dashboard/settings/routing",
security: "/dashboard/settings/security",
sidebar: "/dashboard/settings/sidebar",
};
type SettingsPageProps = {
searchParams?: Promise<Record<string, string | string[] | undefined>>;
};
function resolveSettingsRoute(value: string | undefined): string {
return value
? LEGACY_TAB_ROUTES[value] || "/dashboard/settings/general"
: "/dashboard/settings/general";
}
export default async function SettingsPage({ searchParams }: SettingsPageProps) {
const params = searchParams ? await searchParams : {};
const tab = Array.isArray(params.tab) ? params.tab[0] : params.tab;
redirect(resolveSettingsRoute(tab));
}