Skip to content

feat: Add Google Antigravity Authentication Support#88

Merged
steipete merged 7 commits intoopenclaw:mainfrom
mukhtharcm:feat/antigravity-integration
Jan 3, 2026
Merged

feat: Add Google Antigravity Authentication Support#88
steipete merged 7 commits intoopenclaw:mainfrom
mukhtharcm:feat/antigravity-integration

Conversation

@mukhtharcm
Copy link
Copy Markdown
Member

Summary

This PR adds support for Google Antigravity authentication, allowing users to access Claude Opus 4.5, Gemini 3, and other models through Google's Cloud Code Assist API.

Changes

  • New auth option: Added "Google Antigravity" as an authentication choice in both onboard and configure wizards
  • OAuth flow: Implemented Google Antigravity OAuth using loginAntigravity from pi-ai SDK
  • Flexible credentials: Updated writeOAuthCredentials to accept any OAuthProvider instead of just "anthropic"
  • Schema compatibility fix: Added sanitizeSchemaForGoogle() to strip unsupported JSON Schema keywords before sending to Google's API

Why the schema fix is needed

Google's Cloud Code Assist API doesn't support advanced JSON Schema keywords like patternProperties, const, anyOf, etc. Without sanitization, tool calls fail with errors like:

Cloud Code Assist API error (400): Invalid JSON payload received. 
Unknown name "patternProperties" at 'request.tools[0].function_declarations[3].parameters.properties[2].value'

Testing

  • Tested OAuth flow with Google account
  • Verified tool calls work correctly with Antigravity models
  • Tested via both Telegram bot and direct agent commands

Available Antigravity Models

After authenticating, users can access:

  • claude-opus-4-5-thinking, claude-sonnet-4-5, claude-sonnet-4-5-thinking
  • gemini-3-pro-high, gemini-3-pro-low, gemini-3-flash
  • gpt-oss-120b-medium

@mukhtharcm
Copy link
Copy Markdown
Member Author

@petter-b

I'm not sure if this is the proper way for implementing it, you are free to ping me if things are wrong :)

@mukhtharcm mukhtharcm force-pushed the feat/antigravity-integration branch from 6efae4c to 7b95711 Compare January 2, 2026 06:45
@mukhtharcm
Copy link
Copy Markdown
Member Author

@steipete similar to https://github.com/NoeFabris/opencode-antigravity-auth in the last commit, I added a vps aware oauth flow.

ie, if we're running this on a vps, it'll ask for the callback url instead of trying to autocapture it (which will never happen since browser is in our system and clawdis is running in vps and the callback url will be to localhost)

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 3, 2026

🦞 Codex Review

Findings

  • 🚨 HIGH: Non-interactive onboarding ignores new antigravity choice; falls through without creds or error, leading to half-configured setup if --auth-choice antigravity is passed. Suggest explicit handling.
  • ⚠️ Medium: Schema sanitizer drops additionalProperties; any tool schema that relies on map/record types loses structure, so Google function declarations may reject or mis-handle those inputs.

Open Questions

  • Should antigravity be allowed in non-interactive mode, or hard-fail like oauth?
  • Any tools rely on map-like schemas that need additionalProperties?

Summary
Adds Antigravity OAuth flow (manual fallback for VPS/SSH), new auth choice in configure/onboarding, patches pi-ai's Google schema sanitizer + lockfile updates.

Review by Clawd 🦞 via Codex

@mukhtharcm
Copy link
Copy Markdown
Member Author

Claude Opus 4.5 — Review Response


Findings Addressed

🚨 HIGH: Non-interactive onboarding — Antigravity handling

Fixed in commit 03d4eca

Antigravity is now explicitly rejected in non-interactive mode with a clear error message:

} else if (authChoice === "oauth" || authChoice === "antigravity") {
  runtime.error(
    `${authChoice === "oauth" ? "OAuth" : "Antigravity"} requires interactive mode.`
  );
  runtime.exit(1);
  return;
}

⚠️ Medium: Schema sanitizer drops additionalProperties

Investigated — no regression found

The clawdis_cron tool uses additionalProperties: true on empty object schemas for job and patch parameters:

job: Type.Object({}, { additionalProperties: true })

This generates:

{ "type": "object", "properties": {}, "additionalProperties": true }

After sanitization:

{ "type": "object", "properties": {} }

Finding:
This is a pre-existing schema design limitation, not a regression introduced by sanitization. In both cases, the schema provides zero structural guidance to the model—neither defines what properties job should contain. The model relies entirely on tool name and description context in both versions.

Additionally, Google’s API rejects additionalProperties entirely, so stripping it is required for compatibility.

Proper fix (out of scope):
Define explicit schemas matching CronJobCreate and CronJobPatch types.


Open Questions Answered

Q: Should Antigravity be allowed in non-interactive mode, or hard-fail like OAuth?
A: Hard-fail like OAuth (now implemented). Both require browser-based authentication flows that cannot complete without user interaction.

Q: Do any tools rely on map-like schemas that need additionalProperties?
A: Yes — clawdis_cron has two parameters using { additionalProperties: true }. However, investigation shows no functional regression because the original empty-object schema provided no structural guidance either. Both versions rely equally on model inference from context.


Summary

  • HIGH issue: Fixed
  • Medium issue: Investigated, no regression; documented as a pre-existing schema design limitation

Review by Claude Opus 4.5 via OpenCode

mukhtharcm and others added 7 commits January 3, 2026 04:56
- Add 'antigravity' as new auth choice in onboard and configure wizards
- Implement Google Antigravity OAuth flow using loginAntigravity from pi-ai
- Update writeOAuthCredentials to accept any OAuthProvider (not just 'anthropic')
- Add schema sanitization for Google Cloud Code Assist API to fix tool call errors
- Default model set to google-antigravity/claude-opus-4-5 after successful auth

The schema sanitization removes unsupported JSON Schema keywords (patternProperties,
const, anyOf, etc.) that Google's Cloud Code Assist API doesn't understand.
Detects SSH/VPS/headless environments and prompts user to paste
the OAuth callback URL instead of relying on localhost server.

- Add antigravity-oauth.ts with VPS detection and manual OAuth flow
- Update onboard-interactive.ts to use VPS-aware flow
- Update configure.ts to use VPS-aware flow
@steipete steipete force-pushed the feat/antigravity-integration branch from 03d4eca to 430d1d3 Compare January 3, 2026 04:01
@steipete steipete merged commit fabad7a into openclaw:main Jan 3, 2026
4 of 6 checks passed
@mukhtharcm mukhtharcm deleted the feat/antigravity-integration branch January 3, 2026 04:15
dgarson referenced this pull request in dgarson/clawdbot Feb 4, 2026
feat: scrub compaction messages to avoid spamming user
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Task 1: Port commits #87 and #88 (cache eviction + SQLITE_BUSY regression test)
- Task 2: Port commits #114 and #149 (scope warning + model cache reuse)

SUMMARY: .planning/phases/12-memory-qmd-hardening/12-09-SUMMARY.md
slathrop referenced this pull request in slathrop/openclaw-js Feb 11, 2026
Tasks completed: 2/2
- Port i18n tooling + seed translations (commits #87, #88)
- Port language code + switcher fixes (commits #89, #91)

SUMMARY: .planning/phases/17-docs/17-08-SUMMARY.md
Peleke referenced this pull request in Peleke/openclaw Feb 14, 2026
…ols (#88)

Phase 1: Three-tier observation guard in observeRunOutcomes — conversational
turns (no real tools used) now skip observation entirely instead of marking
all arms as rejected. Prevents Beta distribution collapse from "hello" messages.

Phase 2: Full reset and lagged reward mechanism:
- QortexLearningClient.reset() method + QortexResetResult type
- POST /reset and /reward API routes with 64KB body limit
- `openclaw learning reset` CLI command with --confirm flag
- `/learning reset|reward|status` chat command with fuzzy arm matching
- Dashboard: reset button, per-arm thumbs up/down feedback buttons
- XSS hardening: escHtml() for all dynamic content in dashboard innerHTML
- Docs: /learning command documented in slash-commands.md

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Peleke referenced this pull request in Peleke/openclaw Feb 14, 2026
PrivacySmurf pushed a commit to PrivacySmurf/openclaw that referenced this pull request Feb 18, 2026
…on payload

Issue openclaw#88 — Post-Compaction Held Message Display

Changes:
- types.ts: add compactionHeldMessages[] to SessionEntry for tracking
  messages that arrive while the compaction gate is active
- get-reply-run.ts: three-part change:
  1. Accumulate held messages in session store during gate (non-ok messages)
  2. User-facing verification: show what was happening + [Q1][Q2]... held
     messages + 'What should I do? Type ok to resume.' (no agent internals)
  3. On 'ok': inject agent freeze protocol + held message list as system
     context (invisible to user via extraSystemPrompt); clear both
     compactionPendingVerification and compactionHeldMessages from store
songliu0403-rgb pushed a commit to songliu0403-rgb/openclaw that referenced this pull request Feb 26, 2026
heatherstew44-maker pushed a commit to heatherstew44-maker/openclaw that referenced this pull request Mar 8, 2026
downgrade whisper-rs to 0.13.2 to continue to support older versions of macos
github-actions bot pushed a commit to Piboonsak/openclaw_github that referenced this pull request Mar 9, 2026
zhyongrui added a commit to zhyongrui/openclaw that referenced this pull request Mar 20, 2026
…nclaw code run --json output (openclaw#88)

* feat: implement issue openclaw#85

* feat: implement issue openclaw#85
0x666c6f added a commit to 0x666c6f/openclaw that referenced this pull request Mar 26, 2026
* fix(sre:PLA-894): anchor bug-report RCA on primary symptom

* fix(sre): address RCA review findings

* fix(sre): harden RCA prompt normalization

* fix(sre): simplify RCA correction matching

* fix(sre): restore bug-report prompt wait hint

* fix(sre): close RCA review gaps

* fix(sre): tighten RCA symptom corrections

* fix(sre): normalize provider live-probe rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants