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: hardcode Antigravity UA to darwin/arm64 to match CLIProxyAPI production behavior

Ravi Tharumab142145a4e70
diff --git a/open-sse/services/antigravityHeaders.ts b/open-sse/services/antigravityHeaders.ts
index bb549f79d1..135125b8c4 100644
--- a/open-sse/services/antigravityHeaders.ts
+++ b/open-sse/services/antigravityHeaders.ts
@@ -1,3 +1,5 @@
+import os from "node:os";
+
/**
* Antigravity and Gemini CLI header utilities.
*
@@ -7,8 +9,6 @@
* Based on CLIProxyAPI's misc/header_utils.go.
*/
-import os from "node:os";
-
const ANTIGRAVITY_VERSION = "1.21.9";
const GEMINI_CLI_VERSION = "0.31.0";
const GEMINI_SDK_VERSION = "1.41.0";
@@ -33,31 +33,16 @@ function getArch(): string {
}
}
-function getAntigravityOS(): string {
- const p = os.platform();
- switch (p) {
- case "darwin": return "darwin";
- case "win32": return "windows";
- default: return p;
- }
-}
-
-function getAntigravityArch(): string {
- const a = os.arch();
- switch (a) {
- case "x64": return "amd64";
- case "ia32": return "386";
- case "arm64": return "arm64";
- default: return a;
- }
-}
-
/**
- * Antigravity User-Agent: "antigravity/VERSION OS/ARCH"
- * Example: "antigravity/1.21.9 darwin/arm64"
+ * Antigravity User-Agent: "antigravity/VERSION darwin/arm64"
+ *
+ * Always claims darwin/arm64 regardless of actual server OS.
+ * Real Antigravity is a macOS desktop tool — most users are on macOS.
+ * Claiming linux/amd64 from a datacenter IP is MORE suspicious than
+ * darwin/arm64. Matches CLIProxyAPI's proven production behavior.
*/
export function antigravityUserAgent(): string {
- return `antigravity/${ANTIGRAVITY_VERSION} ${getAntigravityOS()}/${getAntigravityArch()}`;
+ return `antigravity/${ANTIGRAVITY_VERSION} darwin/arm64`;
}
/**