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
fix(oauth): show manual paste mode for LAN IP access
diegosouzapwff01e9edaa63
diff --git a/omniroute-1.4.3.tgz b/omniroute-1.4.3.tgznew file mode 100644index 0000000000..b5a4e81367Binary files /dev/null and b/omniroute-1.4.3.tgz differdiff --git a/package-lock.json b/package-lock.jsonindex 2764827cf4..dc43476856 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "omniroute",- "version": "1.4.0",+ "version": "1.4.3","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "omniroute",- "version": "1.4.0",+ "version": "1.4.3","license": "MIT","workspaces": ["open-sse"@@ -5339,6 +5339,7 @@"version": "2.3.2","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz","integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",+ "dev": true,"hasInstallScript": true,"license": "MIT","optional": true,diff --git a/package.json b/package.jsonindex 6ffd70bcbb..ece7ea4227 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "omniroute",- "version": "1.4.2",+ "version": "1.4.3","description": "Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.","type": "module","bin": {diff --git a/src/shared/components/OAuthModal.tsx b/src/shared/components/OAuthModal.tsxindex 68db6845b1..983ccd414d 100644--- a/src/shared/components/OAuthModal.tsx+++ b/src/shared/components/OAuthModal.tsx@@ -34,9 +34,11 @@ export default function OAuthModal({const callbackProcessedRef = useRef(false);const flowStartedRef = useRef(false);- // Detect if running on localhost or private/LAN IP (client-side only)- // Google OAuth rejects private IPs (192.168.x.x, 10.x.x.x, etc.) the same as localhost,- // requiring device_id/device_name. Treat them identically for redirect URI construction.+ // Detect if running on true localhost vs LAN IP (client-side only)+ // - True localhost (127.0.0.1/localhost): popup auto-callback works+ // - LAN IPs (192.168.x, 10.x, 172.x): redirect URI uses localhost but callback+ // won't resolve back to the VPS, so use manual paste mode+ const [isTrueLocalhost, setIsTrueLocalhost] = useState(false);useEffect(() => {if (typeof window !== "undefined") {const hostname = window.location.hostname;@@ -46,7 +48,9 @@ export default function OAuthModal({hostname.startsWith("192.168.") ||hostname.startsWith("10.") ||/^172\.(1[6-9]|2\d|3[01])\./.test(hostname);+ const isTrulyLocal = hostname === "localhost" || hostname === "127.0.0.1";setIsLocalhost(isLocal);+ setIsTrueLocalhost(isTrulyLocal);setPlaceholderUrl(`${window.location.origin}/callback?code=...`);}}, []);@@ -272,8 +276,8 @@ export default function OAuthModal({setAuthData({ ...data, redirectUri });- // For non-localhost: use manual input mode (user pastes callback URL)- if (!isLocalhost) {+ // For non-true-localhost (LAN IPs, remote): use manual input mode (user pastes callback URL)+ if (!isTrueLocalhost) {setStep("input");window.open(data.authUrl, "oauth_auth");} else {@@ -290,7 +294,7 @@ export default function OAuthModal({setError(err.message);setStep("error");}- }, [provider, isLocalhost, startPolling, onSuccess]);+ }, [provider, isLocalhost, isTrueLocalhost, startPolling, onSuccess]);// Reset guard when modal closesuseEffect(() => {@@ -493,8 +497,8 @@ export default function OAuthModal({{step === "input" && !isDeviceCode && (<><div className="space-y-4">- {/* Remote server info for Google OAuth providers */}- {!isLocalhost && GOOGLE_OAUTH_PROVIDERS.includes(provider) && (+ {/* Remote/LAN server info for Google OAuth providers */}+ {!isTrueLocalhost && GOOGLE_OAUTH_PROVIDERS.includes(provider) && (<div className="rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-200"><span className="material-symbols-outlined text-sm align-middle mr-1">warning@@ -515,7 +519,7 @@ export default function OAuthModal({</div>)}{/* Generic remote info for other providers */}- {!isLocalhost && !GOOGLE_OAUTH_PROVIDERS.includes(provider) && (+ {!isTrueLocalhost && !GOOGLE_OAUTH_PROVIDERS.includes(provider) && (<div className="rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-200"><span className="material-symbols-outlined text-sm align-middle mr-1">info</span><strong>Remote access:</strong> Since you're accessing OmniRoute remotely,