can1357/oh-my-pi · error · AIError.OAuthError
${ineligibility.reasonMessage}${validation}
Error message
${ineligibility.reasonMessage}${validation} What it means
assertFreeTierEligible runs after loadCodeAssist during Antigravity login. If the free tier is not in allowedTiers but appears in ineligibleTiers with a reasonMessage, this provisioning OAuthError surfaces Google's own ineligibility message (plus an optional validation URL appended on a new line). The Google account cannot use the Antigravity free tier, so the login aborts before onboarding.
Source
Thrown at packages/ai/src/registry/oauth/google-antigravity.ts:145
}
function getFreeTierIneligibility(
payload: LoadCodeAssistResponse,
): { reasonMessage: string; validationUrl: string | undefined } | undefined {
const tier = payload.ineligibleTiers?.find(candidate => candidate.tierId === FREE_TIER_ID);
if (!tier?.reasonMessage) return undefined;
return {
reasonMessage: tier.reasonMessage,
validationUrl: tier.validationUrl && tier.validationUrl.length > 0 ? tier.validationUrl : undefined,
};
}
function assertFreeTierEligible(payload: LoadCodeAssistResponse): void {
if (isFreeTierAllowed(payload)) return;
const ineligibility = getFreeTierIneligibility(payload);
if (!ineligibility) return;
const validation = ineligibility.validationUrl ? `\n${ineligibility.validationUrl}` : "";
throw new AIError.OAuthError(`${ineligibility.reasonMessage}${validation}`, {
kind: "provisioning",
provider: PROVIDER,
});
}
async function requestCloudCodeAssist({
label,
url,
method,
headers,
body,
signal,
timeoutMs,
}: CloudCodeRequest): Promise<unknown> {
throwIfLoginCancelled(signal);
const init: RequestInit = body === undefined ? { method, headers } : { method, headers, body };
const response = await oauthFetch(url, init, { provider: PROVIDER, signal, timeoutMs });
if (response.status !== 200) {View on GitHub (pinned to 9690622007)
Solutions
- Open the validationUrl printed in the error message and complete whatever Google requires (terms acceptance, identity/billing verification).
- Check with your Google Cloud/Workspace administrator that Cloud AI Companion / Gemini Code Assist is enabled for your account.
- Verify your account's region is supported for the Antigravity free tier.
- Try a different Google account that is eligible for the free tier.
- If you believe eligibility is wrong, re-run login after fixing account settings to refresh loadCodeAssist.
Example fix
// The error itself is not a code bug; resolve the account restriction: // error message example: // "Free tier is not available for this account.\nhttps://codeassist.google.com/validate" // after completing validation at the URL, retry: await loginAntigravity(ctrl); // now passes assertFreeTierEligible
Defensive patterns
Strategy: try-catch
Try / catch
try {
await loginAntigravity(ctrl);
} catch (err) {
if (err instanceof AIError.OAuthError && err.provider === "google-antigravity" && !String(err.message).includes("failed to")) {
// Google's own ineligibility message (+ optional validation URL). Surface it verbatim:
ui.show_message("Antigravity login blocked", `${err.message}\nOpen the validation URL above to fix eligibility.`);
} else {
throw err;
}
} Prevention
- Read the reasonMessage/validationUrl in the error — it is Google's own guidance on how to become eligible.
- Ensure the Google account is not Workspace-restricted (admin must enable Cloud AI Companion).
- Verify the account's region and billing configuration support the free tier before integrating.
- Pre-test eligibility with a known-good Google account in CI before enabling the provider.
When it happens
Trigger: loadCodeAssist returns a payload where allowedTiers lacks the 'free-tier' id and ineligibleTiers contains a 'free-tier' entry with tierId 'free-tier' and a non-empty reasonMessage; assertFreeTierEligible then throws reasonMessage (+ validationUrl).
Common situations: Google Workspace-managed accounts where the admin disabled Cloud Code/Antigravity; accounts already on a paid tier or with billing configs blocking the free tier; region restrictions; accounts flagged by Google requiring additional validation (the validationUrl points to the fix, e.g. accepting terms or verifying identity).
Related errors
- failed to unmarshal LoadCodeAssistResponse: ${result.summary
- failed to unmarshal OnboardUser operation: ${result.summary}
- Antigravity credentials missing projectId
- No OAuth credential available for provider: ${provider}
- OAuth refresh ownership aborted by caller
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/3e5f0cea5824ed13.
Report an issue: GitHub.