Summary
The issue was generated by AI - But it was verified be me.
The plugin sends "MACOS" as the platform value in API calls to Google's Cloud AI Companion endpoints (loadCodeAssist, onboardUser), but the API rejects it as an invalid enum value for google.internal.cloud.code.v1internal.ClientMetadata.Platform.
This causes all new macOS users to silently fail project provisioning — no managedProjectId is ever stored, and they get 403 Permission Denied errors when trying to use any model.
Root Cause
In src/constants.ts (compiled to dist/src/constants.js), the clientMetadata and getAntigravityHeaders() use:
The Google API rejects this with:
{
"error": {
"code": 400,
"message": "Invalid value at 'metadata.platform' (type.googleapis.com/google.internal.cloud.code.v1internal.ClientMetadata.Platform), \"MACOS\"",
"status": "INVALID_ARGUMENT"
}
}
Tested Values
| Value |
Result |
PLATFORM_UNSPECIFIED |
OK |
MACOS |
INVALID_ARGUMENT |
MAC_OS |
INVALID_ARGUMENT |
LINUX |
INVALID_ARGUMENT |
WINDOWS |
INVALID_ARGUMENT |
DARWIN |
INVALID_ARGUMENT |
0 - 5 (numeric) |
OK |
Only PLATFORM_UNSPECIFIED works as a string value. Numeric enum values (0-5) also work.
Impact
- All new macOS users cannot provision a managed project and will get 403 errors on every request
- Existing users are unaffected because their
managedProjectId was provisioned before Google tightened the enum validation, and the cached value is reused
- The failure is completely silent —
loadManagedProject and onboardManagedProject in project.js swallow non-OK responses with continue/break and no warning-level logging
Silent failure chain
OAuth login
→ fetchProjectID calls loadCodeAssist with platform="MACOS"
→ API returns 400 INVALID_ARGUMENT (silently skipped)
→ projectId stored as "" (empty string)
→ ensureProjectContext called on first request
→ loadManagedProject returns null (400 silently skipped)
→ onboardManagedProject also gets 400 (silently breaks)
→ Falls back to ANTIGRAVITY_DEFAULT_PROJECT_ID ("rising-fact-p41fc")
→ Result cached — never retried
→ User sees "Permission denied" on every request
Fix
Replace "MACOS" with "PLATFORM_UNSPECIFIED" in src/constants.ts wherever it appears in platform metadata:
getAntigravityHeaders() → Client-Metadata header
clientMetadata object
- Any other location where the platform enum is set
Additionally, I'd recommend logging at warn level when loadCodeAssist or onboardUser return non-2xx responses (currently silently swallowed in project.js).
Environment
- Plugin version: 1.6.0
- OS: macOS (darwin/x64)
- Antigravity version: 1.19.6
Summary
The issue was generated by AI - But it was verified be me.
The plugin sends
"MACOS"as theplatformvalue in API calls to Google's Cloud AI Companion endpoints (loadCodeAssist,onboardUser), but the API rejects it as an invalid enum value forgoogle.internal.cloud.code.v1internal.ClientMetadata.Platform.This causes all new macOS users to silently fail project provisioning — no
managedProjectIdis ever stored, and they get403 Permission Deniederrors when trying to use any model.Root Cause
In
src/constants.ts(compiled todist/src/constants.js), theclientMetadataandgetAntigravityHeaders()use:The Google API rejects this with:
{ "error": { "code": 400, "message": "Invalid value at 'metadata.platform' (type.googleapis.com/google.internal.cloud.code.v1internal.ClientMetadata.Platform), \"MACOS\"", "status": "INVALID_ARGUMENT" } }Tested Values
PLATFORM_UNSPECIFIEDMACOSMAC_OSLINUXWINDOWSDARWIN0-5(numeric)Only
PLATFORM_UNSPECIFIEDworks as a string value. Numeric enum values (0-5) also work.Impact
managedProjectIdwas provisioned before Google tightened the enum validation, and the cached value is reusedloadManagedProjectandonboardManagedProjectinproject.jsswallow non-OK responses withcontinue/breakand no warning-level loggingSilent failure chain
Fix
Replace
"MACOS"with"PLATFORM_UNSPECIFIED"insrc/constants.tswherever it appears in platform metadata:getAntigravityHeaders()→Client-MetadataheaderclientMetadataobjectAdditionally, I'd recommend logging at
warnlevel whenloadCodeAssistoronboardUserreturn non-2xx responses (currently silently swallowed inproject.js).Environment