Skip to main content

Antigravity Provider

Access premium AI models (Claude Opus 4.6, Claude Sonnet 4.6, Gemini 3 Pro) through Antigravity’s OAuth-based platform. Features real-time quota monitoring and multi-account support.

Overview

Antigravity provides access to Claude and Gemini models through a subscription service. CCS integrates seamlessly with OAuth authentication and real-time quota tracking. Provider Identifier: agy Command: ccs agy Supported Models:
  • Claude Opus 4.6 Thinking (default) - Latest flagship with extended thinking
  • Claude Opus 4.6 - Latest flagship standard
  • Claude Sonnet 4.6 Thinking - Balanced with extended thinking
  • Claude Sonnet 4.6 - Fast and capable
  • Gemini 3 Pro - Google’s latest model via Antigravity
  • Interactive model picker via --config
Claude 4.5 model IDs are deprecated in AGY as of v7.51. Existing sessions referencing 4.5 model IDs are automatically migrated to their 4.6 equivalents. Re-run ccs doctor --fix if you see 502 errors after upgrading.
Do not reuse the same Google account for both ccs gemini and ccs agy. Using one Google account across both providers causes token conflicts and authentication failures (see issue #509). Use separate Google accounts for each provider.

Authentication

First-Time Setup

Authentication Flow:
  1. Authorization Code flow via browser callback
  2. OAuth tokens include project_id for quota API access
  3. Token cached locally with auto-refresh
  4. Proactive token refresh prevents mid-request failures

Manual Authentication

Logout

Real-Time Quota Display

Unique Feature: CCS displays real-time quota percentages for Antigravity accounts.
Quota API Integration:
  • Fetches from Antigravity internal API
  • Displays usage percentage (0-100%)
  • Shows reset time for each model
  • Auto-refreshes tokens if expired
Error Handling:
  • 403 Forbidden: Account lacks quota access (displays warning)
  • Unprovisioned: Account not activated in Antigravity app (prompts to sign in)
  • Token Expired: Auto-refreshes via Google OAuth

Multi-Account Support

Manage multiple Antigravity accounts for quota rotation:

Add Account

List Accounts

Switch Account

Rename Account

Account Registry: ~/.ccs/cliproxy/accounts.json Auto-Nicknames: Generated from email prefix (e.g., john@gmail.comjohn)

Model Configuration

Antigravity supports interactive model selection with extended context support:
Model Settings: ~/.ccs/agy.settings.json First-Run Behavior: Prompts for model selection before first execution Extended Context Support:
  • Claude Opus 4.6: Use --1m flag for 1M token window (opt-in)
  • Gemini 3 Pro: 1M token window auto-enabled by default
  • Other models: Standard context windows
Auto-Rotation: CLIProxyAPI can auto-rotate accounts on rate limit (configured in config.yaml)

Commands

Basic Usage

Authentication Flags

Account Management Flags

Configuration Flags

Storage Locations

Quota Management

Pre-flight Check

CCS checks account quota before starting sessions:
Configuration:

Pause/Resume Accounts

Manually control which accounts are used:
Dashboard: Pause/resume toggles also available in web dashboard account dropdown.

Project ID Display

Dashboard shows GCP project_id for each Antigravity account:
  • Location: OAuth Providers → Antigravity → Account dropdown
  • Field: Read-only with folder icon (FolderCode)
  • Privacy: Respects privacy blur mode (Settings → Privacy)
  • Tooltip: “GCP Project ID (read-only)”
Warning State: If project_id shows “N/A” with warning badge:
  • Cause: Account authenticated before project_id tracking
  • Impact: Quota API calls may fail
  • Solution: Re-authenticate to refresh token with project_id

Account Tiers

Antigravity accounts have tier classifications for quota prioritization: Tier Types: Tier Storage: ~/.ccs/cliproxy/accounts.json.providers.agy.accounts[].tier Tier Prioritization: CCS uses tier information for intelligent account selection:
When multiple accounts are available, CCS prefers higher-tier accounts:
  1. Select accounts with quota above threshold
  2. Sort by tier (ultra, pro, free — highest first)
  3. Use highest-tier account with available quota
Dashboard Display: Tier badges appear in:
  • Account list (ccs agy --accounts)
  • Dashboard OAuth Providers → Antigravity dropdown
  • Quota status cards
Tier Detection: CCS reads the live Antigravity tier from loadCodeAssist whenever quota refresh runs. Manual tier values in accounts.json or the Dashboard remain useful as a fallback when the provider cannot return tier evidence.

Token Format

Project ID: Required for quota API calls, obtained during OAuth flow

Quota API Endpoints

CCS uses Antigravity’s internal API:
  1. loadCodeAssist - Get project ID and tier evidence. CCS tries the daily Cloud Code host first and falls back to the production host if needed.
  2. fetchAvailableModels - Get quota percentages & reset times
Authentication: OAuth tokens from ~/.ccs/cliproxy/auth/antigravity-*.json Auto-Refresh: Tokens refresh automatically if expired or expiring soon (under 5 minutes)

Quota Response

Requirements

  • Antigravity subscription
  • Browser for OAuth (or --headless for servers)
  • Network access to Antigravity authentication servers

Troubleshooting

Quota Not Displaying

Account Unprovisioned

Error: “Account not activated in Antigravity app” Solution: Sign in to Antigravity web app at least once to provision your account

403 Forbidden on Quota API

Error: “Account lacks quota access” Solution: Verify subscription is active. Contact Antigravity support if issue persists.

Project ID Shows N/A

Warning: “Project ID: N/A” in Dashboard account dropdown Cause: OAuth token missing project_id (authenticated before feature added) Solution:
  1. Remove account: ccs agy --logout
  2. Re-authenticate: ccs agy --auth
  3. Verify in Dashboard: OAuth Providers → Antigravity → Account dropdown
  4. Confirm project_id displays (e.g., “project-123456”)
Note: Re-authentication is required only once per account. Project ID persists after successful OAuth.

Token Expiry

Tokens refresh automatically. If refresh fails:

Cost Information

Antigravity Subscription Required: Check antigravity.dev for current pricing Usage Limits: Subject to quota limits shown in real-time display

Next Steps

Multi-Account Setup

Manage multiple Antigravity accounts