oh my pi enable antigravity A developer published an extension for oh-my-pi (version 18.18.4 and later) that re-enables Google Antigravity logins and models after upstream PR #18622 added a `disabled` rule to the google-antigravity catalog entry. The extension strips the restrictive auth policy hooks, wraps the provider definition to bypass the free-tier eligibility check, and resolves a project ID via the loadCodeAssist endpoint, falling back to "aicode-consumers" when none is found. | | / | | | Extension to re-enable Google Antigravity logins and models in oh-my-pi = 18.18.4, | | | and bypass the artificial "ineligible account" location/free-tier block. | | | | | | Upstream PR 18622 added a disabled rule to google-antigravity in the catalog, | | | and google-antigravity-project has a rigid check that throws if free-tier is | | | flagged as ineligible, even when the user has valid OAuth credentials, paid tier, | | | or an active cloudaicompanionProject. | | | / | | | import as compatAuth from "@oh-my-pi/pi-catalog/compat/auth"; | | | import { getProviderDefinition, registerOAuthProvider } from "@oh-my-pi/pi-ai"; | | | import { Database } from "bun:sqlite"; | | | import { getAgentDbPath } from "@oh-my-pi/pi-utils"; | | | // 1. Clear paused status and remove restrictive built-in hooks | | | const policy = compatAuth.authPolicyFor "google-antigravity" ; | | | if policy { | | | delete policy as any .disabled; | | | if policy.login { | | | delete policy.login as any .afterExchange; | | | } | | | if policy.refresh { | | | delete policy.refresh as any .afterRefresh; | | | } | | | } | | | // 2. Wrap provider definition to bypass the eligibility check | | | const def = getProviderDefinition "google-antigravity" ; | | | const formatApiKey = creds: any = | | | JSON.stringify { | | | token: creds.access, | | | projectId: creds.projectId, | | | refreshToken: creds.refresh, | | | expiresAt: creds.expires, | | | email: creds.email, | | | accountId: creds.accountId, | | | } ; | | | if def && def.login { | | | const originalLogin = def.login; | | | const originalRefreshToken = def.refreshToken; | | | const resolveProjectId = async | | | accessToken: string, | | | onProgress?: msg: string = void, | | | signal?: AbortSignal | | | : Promise