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: iFlow OAuth secret, MITM server compile, GeminiCLI projectId, model catalog, electron version, tierPriority schema
diegosouzapw2b6c88cd2613
diff --git a/electron/package.json b/electron/package.jsonindex 72b841c2af..6a728a8b43 100644--- a/electron/package.json+++ b/electron/package.json@@ -1,6 +1,6 @@{"name": "omniroute-desktop",- "version": "2.0.13",+ "version": "2.3.13","description": "OmniRoute Desktop Application","main": "main.js","author": {diff --git a/open-sse/translator/request/openai-to-gemini.ts b/open-sse/translator/request/openai-to-gemini.tsindex f6b62b3045..7ab8453195 100644--- a/open-sse/translator/request/openai-to-gemini.ts+++ b/open-sse/translator/request/openai-to-gemini.ts@@ -320,12 +320,17 @@ export function openaiToGeminiCLIRequest(model, body, stream) {// Wrap Gemini CLI format in Cloud Code wrapperfunction wrapInCloudCodeEnvelope(model, geminiCLI, credentials = null, isAntigravity = false) {- const projectId = credentials?.projectId;+ let projectId = credentials?.projectId;if (!projectId) {- throw new Error(- `${isAntigravity ? "Antigravity" : "GeminiCLI"} account is missing projectId. Reconnect OAuth to load your real Cloud Code project before sending requests.`+ // Graceful fallback: warn instead of hard-throw so the request reaches+ // the provider and fails with a meaningful provider-side error (#338).+ // Users who reconnect OAuth will get their real projectId loaded.+ console.warn(+ `[OmniRoute] ${isAntigravity ? "Antigravity" : "GeminiCLI"} account is missing projectId. ` ++ `Attempting request with empty project — reconnect OAuth to resolve.`);+ projectId = "";}const cleanModel = model.includes("/") ? model.split("/").pop()! : model;@@ -371,12 +376,14 @@ function wrapInCloudCodeEnvelope(model, geminiCLI, credentials = null, isAntigra}function wrapInCloudCodeEnvelopeForClaude(model, claudeRequest, credentials = null) {- const projectId = credentials?.projectId;+ let projectId = credentials?.projectId;if (!projectId) {- throw new Error(- "Antigravity/Claude account is missing projectId. Reconnect OAuth to load your real Cloud Code project before sending requests."+ console.warn(+ `[OmniRoute] Antigravity/Claude account is missing projectId. ` ++ `Attempting request with empty project — reconnect OAuth to resolve.`);+ projectId = "";}const cleanModel = model.includes("/") ? model.split("/").pop()! : model;diff --git a/package-lock.json b/package-lock.jsonindex aa35b423f9..f1d07f1522 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "omniroute",- "version": "2.3.12",+ "version": "2.3.13","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "omniroute",- "version": "2.3.12",+ "version": "2.3.13","hasInstallScript": true,"license": "MIT","workspaces": [diff --git a/scripts/prepublish.mjs b/scripts/prepublish.mjsindex a64f79cc9f..6b6af8a7cb 100644--- a/scripts/prepublish.mjs+++ b/scripts/prepublish.mjs@@ -101,13 +101,42 @@ if (existsSync(publicSrc)) {cpSync(publicSrc, publicDest, { recursive: true });}-// ── Step 8: Copy MITM cert utilities (if needed) ───────────+// ── Step 8: Compile + copy MITM cert utilities ─────────────const mitmSrc = join(ROOT, "src", "mitm");const mitmDest = join(APP_DIR, "src", "mitm");if (existsSync(mitmSrc)) {- console.log(" 📋 Copying MITM utilities...");+ console.log(" 🔨 Compiling MITM utilities (TypeScript → JavaScript)...");mkdirSync(mitmDest, { recursive: true });- cpSync(mitmSrc, mitmDest, { recursive: true });++ // Write a temporary tsconfig.json targeting the mitm directory+ const mitmTsconfig = {+ compilerOptions: {+ target: "ES2020",+ module: "CommonJS",+ outDir: mitmDest,+ rootDir: mitmSrc,+ resolveJsonModule: true,+ esModuleInterop: true,+ skipLibCheck: true,+ },+ include: [mitmSrc + "/**/*"],+ };+ const tmpTsconfigPath = join(ROOT, "tsconfig.mitm.tmp.json");+ writeFileSync(tmpTsconfigPath, JSON.stringify(mitmTsconfig, null, 2));++ try {+ execSync(`npx tsc -p ${tmpTsconfigPath}`, { cwd: ROOT, stdio: "inherit" });+ console.log(" ✅ MITM utilities compiled to app/src/mitm/");+ } catch (err) {+ console.warn(" ⚠️ MITM compile warning (non-fatal):", err.message);+ // Fallback: copy source files so at least they are present+ cpSync(mitmSrc, mitmDest, { recursive: true });+ } finally {+ // Cleanup temp tsconfig+ try {+ rmSync(tmpTsconfigPath);+ } catch {}+ }}// ── Step 9: Copy shared utilities needed at runtime ────────diff --git a/src/app/api/combos/auto/route.ts b/src/app/api/combos/auto/route.tsindex 8c3b040fa8..694df34149 100644--- a/src/app/api/combos/auto/route.ts+++ b/src/app/api/combos/auto/route.ts@@ -22,6 +22,7 @@ interface ScoringWeights {latencyInv: number;taskFit: number;stability: number;+ tierPriority: number;}const DEFAULT_WEIGHTS: ScoringWeights = {@@ -30,7 +31,8 @@ const DEFAULT_WEIGHTS: ScoringWeights = {costInv: 0.2,latencyInv: 0.15,taskFit: 0.1,- stability: 0.1,+ stability: 0.05,+ tierPriority: 0.05,};interface AutoComboConfig {diff --git a/src/lib/oauth/constants/oauth.ts b/src/lib/oauth/constants/oauth.tsindex e4223ebc2f..c8e7f0768e 100644--- a/src/lib/oauth/constants/oauth.ts+++ b/src/lib/oauth/constants/oauth.ts@@ -67,7 +67,7 @@ export const QWEN_CONFIG = {// iFlow OAuth Configuration (Authorization Code)export const IFLOW_CONFIG = {clientId: process.env.IFLOW_OAUTH_CLIENT_ID || "10009311001",- clientSecret: process.env.IFLOW_OAUTH_CLIENT_SECRET || "",+ clientSecret: process.env.IFLOW_OAUTH_CLIENT_SECRET || "4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",authorizeUrl: "https://iflow.cn/oauth",tokenUrl: "https://iflow.cn/oauth/token",userInfoUrl: "https://iflow.cn/api/oauth/getUserInfo",diff --git a/src/shared/constants/pricing.ts b/src/shared/constants/pricing.tsindex 167d3d1c12..9ac0bd5cfd 100644--- a/src/shared/constants/pricing.ts+++ b/src/shared/constants/pricing.ts@@ -32,6 +32,14 @@ export const DEFAULT_PRICING = {// OpenAI Codex (cx)cx: {+ // Issue #334: add gpt5.4+ "gpt5.4": {+ input: 5.0,+ output: 20.0,+ cached: 2.5,+ reasoning: 30.0,+ cache_creation: 5.0,+ },"gpt-5.2-codex": {input: 5.0,output: 20.0,@@ -39,6 +47,7 @@ export const DEFAULT_PRICING = {reasoning: 30.0,cache_creation: 5.0,},+"gpt-5.2": {input: 5.0,output: 20.0,@@ -764,6 +773,50 @@ export const DEFAULT_PRICING = {reasoning: 2.5,cache_creation: 0.5,},+ // Models from issue #334+ "claude-sonnet-4": {+ input: 3.0,+ output: 15.0,+ cached: 1.5,+ reasoning: 15.0,+ cache_creation: 3.0,+ },+ "claude-opus-4.6": {+ input: 15.0,+ output: 75.0,+ cached: 7.5,+ reasoning: 75.0,+ cache_creation: 15.0,+ },+ "deepseek-v3.2": {+ input: 0.27,+ output: 1.1,+ cached: 0.07,+ reasoning: 1.1,+ cache_creation: 0.27,+ },+ "minimax-m2.1": {+ input: 0.4,+ output: 1.6,+ cached: 0.1,+ reasoning: 1.6,+ cache_creation: 0.4,+ },+ "qwen3-coder-next": {+ input: 2.0,+ output: 8.0,+ cached: 0.5,+ reasoning: 8.0,+ cache_creation: 2.0,+ },+ // Kiro "Auto" model — routes to best available+ auto: {+ input: 3.0,+ output: 15.0,+ cached: 1.5,+ reasoning: 15.0,+ cache_creation: 3.0,+ },},};diff --git a/src/shared/validation/schemas.ts b/src/shared/validation/schemas.tsindex 785989a22f..d0634eb28c 100644--- a/src/shared/validation/schemas.ts+++ b/src/shared/validation/schemas.ts@@ -89,6 +89,7 @@ const scoringWeightsSchema = zlatencyInv: z.number().min(0).max(1),taskFit: z.number().min(0).max(1),stability: z.number().min(0).max(1),+ tierPriority: z.number().min(0).max(1).optional().default(0.05),}).optional();