Google has been actively enforcing its ToS against programmatic use of Google Cloud Code Assist outside of its intended IDE plugin context. Users risk Google account suspension when using this integration at scale or in server/automated environments. Add prominent WARNING callouts to both ANTIGRAVITY_USAGE.md and ANTIGRAVITY_AUTH.md to inform users of this risk and recommend switching to a paid provider for production usage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.3 KiB
Using Antigravity Provider in PicoClaw
This guide explains how to set up and use the Antigravity (Google Cloud Code Assist) provider in PicoClaw.
Warning
Account Suspension Risk / 账号封禁风险
Google has been actively enforcing its Terms of Service for Google Cloud Code Assist. Using this provider to access AI models beyond the intended scope of the service may result in suspension or termination of your Google account.
- This integration relies on the free quota provided by Google Cloud Code Assist, which is intended for individual developer use within IDE plugins.
- Using it programmatically at scale or in automated/server environments may violate Google Cloud Terms of Service.
- Many users have reported account restrictions after heavy usage. Proceed at your own risk.
- For production or high-volume usage, consider using a paid API key from a supported provider (Anthropic, OpenAI, OpenRouter, etc.).
Prerequisites
- A Google account.
- Google Cloud Code Assist enabled (usually available via the "Gemini for Google Cloud" onboarding).
1. Authentication
To authenticate with Antigravity, run the following command:
picoclaw auth login --provider antigravity
Manual Authentication (Headless/VPS)
If you are running on a server (Coolify/Docker) and cannot reach localhost, follow these steps:
- Run the command above.
- Copy the URL provided and open it in your local browser.
- Complete the login.
- Your browser will redirect to a
localhost:51121URL (which will fail to load). - Copy that final URL from your browser's address bar.
- Paste it back into the terminal where PicoClaw is waiting.
PicoClaw will extract the authorization code and complete the process automatically.
2. Managing Models
List Available Models
To see which models your project has access to and check their quotas:
picoclaw auth models
Switch Models
You can change the default model in ~/.picoclaw/config.json or override it via the CLI:
# Override for a single command
picoclaw agent -m "Hello" --model claude-opus-4-6-thinking
3. Real-world Usage (Coolify/Docker)
If you are deploying via Coolify or Docker, follow these steps to test:
- Environment Variables:
PICOCLAW_AGENTS_DEFAULTS_MODEL=gemini-flash
- Authentication persistence:
If you've logged in locally, you can copy your credentials to the server:
Alternatively, run thescp ~/.picoclaw/auth.json user@your-server:~/.picoclaw/auth logincommand once on the server if you have terminal access.
4. Troubleshooting
- Empty Response: If a model returns an empty reply, it may be restricted for your project. Try
gemini-3-flashorclaude-opus-4-6-thinking. - 429 Rate Limit: Antigravity has strict quotas. PicoClaw will display the "reset time" in the error message if you hit a limit.
- 404 Not Found: Ensure you are using a model ID from the
picoclaw auth modelslist. Use the short ID (e.g.,gemini-3-flash) not the full path.
5. Summary of Working Models
Based on testing, the following models are most reliable:
gemini-3-flash(Fast, highly available)gemini-2.5-flash-lite(Lightweight)claude-opus-4-6-thinking(Powerful, includes reasoning)