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(security/quality): clear CodeQL high + SonarCloud reliability gate for v3.8.10 (#3186)

Diego Rodrigues de Sa e Souzac27a32d4328d
diff --git a/open-sse/executors/antigravity.ts b/open-sse/executors/antigravity.ts
index d4e588b95e..b6c8027c50 100644
--- a/open-sse/executors/antigravity.ts
+++ b/open-sse/executors/antigravity.ts
@@ -54,9 +54,9 @@ const MAX_RETRY_AFTER_MS = 60_000;
const LONG_RETRY_THRESHOLD_MS = 60_000;
const CREDITS_EXHAUSTED_TTL_MS = 5 * 60 * 60 * 1000; // 5 hours
// The upstream API uses plain model IDs (no -high/-low suffix).
-// Tier suffixes were speculative and caused 404 for gemini-3.x models.
-// Only keep models that are live-proven via streamGenerateContent.
-const BARE_PRO_IDS: Set<string> = new Set();
+// Tier suffixes were speculative and caused 404 for gemini-3.x models — the
+// bare-Pro→Low normalization was retired (the set stayed empty, making the guard
+// dead code). Only keep models that are live-proven via streamGenerateContent.
interface AntigravityContent {
role: string;
@@ -432,11 +432,6 @@ async function cleanModelName(model: string): Promise<string> {
clean = resolveAntigravityModelId(clean);
}
- // 3. Normalize bare Pro IDs to the Low tier (matching OpenClaw convention).
- // The upstream API requires an explicit tier suffix; bare IDs cause errors.
- if (BARE_PRO_IDS.has(clean)) {
- clean = `${clean}-low`;
- }
return clean;
}
diff --git a/tests/unit/llama-cpp-local-url.test.ts b/tests/unit/llama-cpp-local-url.test.ts
index 234bea1ae9..ecd110fe26 100644
--- a/tests/unit/llama-cpp-local-url.test.ts
+++ b/tests/unit/llama-cpp-local-url.test.ts
@@ -16,5 +16,8 @@ test("llama-cpp buildUrl routes to the configured local baseUrl, not OpenAI", ()
});
assert.equal(url, "http://127.0.0.1:8080/v1/chat/completions");
- assert.ok(!url.includes("api.openai.com"), `expected local URL, got ${url}`);
+ // Assert the resolved host is the local one — parse the URL and compare the
+ // hostname exactly (a substring check like `url.includes("api.openai.com")`
+ // is an incomplete URL sanitization pattern: `api.openai.com.evil` would match).
+ assert.equal(new URL(url).hostname, "127.0.0.1", `expected local host, got ${url}`);
});