-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Prerequisites
- I will write this issue in English (see our Language Policy)
- I have searched existing issues to avoid duplicates
- I am using the latest version of oh-my-opencode
- I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer
Bug Description
Bug Description
The antigravity authentication plugin fails with a 403 error "Verify your account to continue" but doesn't expose the verification URL to the user, making it impossible to resolve without manual debugging. The error originates from Google's Cloud Code API but the plugin doesn't handle the VALIDATION_REQUIRED response properly or provide the validation_url to the user.
This is related to opencode-antigravity-auth issue #335.
Steps to Reproduce
1. Install oh-my-opencode with antigravity-auth plugin:
{
plugin: [
oh-my-opencode@latest,
opencode-antigravity-auth@1.4.6
]
}
2. Configure antigravity models in opencode.json:
{
provider: {
google: {
models: {
antigravity-gemini-3-pro: {
name: Gemini 3 Pro (Antigravity),
limit: { context: 1048576, output: 65535 }
}
}
}
}
}
3. Authenticate with antigravity using a Google account that requires verification
4. Run any command using an antigravity model:
opencode run "test" --model google/antigravity-gemini-3-pro
5. Error occurs: "Verify your account to continue" with no actionable link provided
Expected Behavior
When Google returns a 403 VALIDATION_REQUIRED error, the plugin should:
- Extract and display the verification URL from the error response
- Pause execution and prompt the user to visit the URL
- Provide clear instructions on how to verify the account
- Retry the request after verification is complete
- Mark the account as "verification_required" and skip it in rotation
The error response contains:
{
error: {
code: 403,
status: PERMISSION_DENIED,
details: [{
@type: google.rpc.ErrorInfo,
reason: VALIDATION_REQUIRED,
metadata: {
validation_url: https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=...,
validation_url_link_text: Verify your account
}
}]
}
}
The plugin should surface validation_url to the user.
Actual Behavior
The plugin only shows:
Error: Verify your account to continue.
[Debug Info]
Status: 403
Request ID: N/A
The actual verification URL from Google's error response is not displayed, leaving users stuck without knowing:
- Which URL to visit
- How to verify their account
- Whether it's an account-level or project-level issue
User impact: Complete inability to use antigravity models without manually debugging the API responses.
Doctor Output
oMoMoMoMo... Doctor
Installation
────────────────────────────────────────
✓ OpenCode Installation → 1.1.56
✓ Plugin Registration → Registered (pinned: latest)
Configuration
────────────────────────────────────────
✓ Configuration Validity → Valid JSON config
✓ Model Resolution → 10 agents, 8 categories (18 overrides), 2521 available
Authentication
────────────────────────────────────────
✓ Anthropic (Claude) Auth → Auth plugin available
○ OpenAI (ChatGPT) Auth → Auth plugin not installed
✓ Google (Gemini) Auth → Auth plugin available
Dependencies
────────────────────────────────────────
✓ AST-Grep CLI → installed
✓ AST-Grep NAPI → installed
⚠ Comment Checker → Not installed (optional)
Tools & Servers
────────────────────────────────────────
✓ GitHub CLI → 2.86.0 - authenticated as r-bug-r
✓ LSP Servers → 1/4 servers available
✓ Built-in MCP Servers → 2 built-in servers enabled
○ User MCP Configuration → No user MCP configuration found
○ MCP OAuth Tokens → No OAuth tokens configured
Updates
────────────────────────────────────────
⚠ Version Status → Unable to determine current version
Summary
────────────────────────────────────────
11 passed, 0 failed, 2 warnings, 3 skipped
Total: 16 checks in 3411ms
⚠ All systems operational with warnings.Error Logs
Error: Verify your account to continue.
[Debug Info]
Requested Model: antigravity-gemini-3-pro
Effective Model: gemini-3-pro-low
Project: gen-lang-client-0707651173
Endpoint: https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse
Status: 403
Request ID: N/A
Tool Debug Missing: 1
Tool Debug Summary: idx=0, hasCustom=true, customSchema=true, hasFunction=false, functionSchema=false
Tool Debug Payload: [{"functionDeclarations":[...]}]
Note: The actual error response from Google Cloud API contains the verification URL, but it's not being surfaced to the user.Configuration
~/.config/opencode/opencode.json:
{
$schema: https://opencode.ai/config.json,
plugin: [
oh-my-opencode@latest,
opencode-antigravity-auth@1.4.6
],
provider: {
google: {
name: Google,
models: {
antigravity-gemini-3-pro: {
name: Gemini 3 Pro (Antigravity),
limit: {
context: 1048576,
output: 65535
},
variants: {
low: { thinkingLevel: low },
high: { thinkingLevel: high }
}
},
antigravity-gemini-3-flash: {...},
antigravity-claude-sonnet-4-5: {...}
}
}
}
}
~/.config/opencode/antigravity-accounts.json:
{
version: 3,
accounts: [
{
email: [REDACTED]@gmail.com,
refreshToken: [REDACTED],
projectId: gen-lang-client-[REDACTED],
enabled: true
}
]
}Additional Context
Root Cause Analysis
This is a Google Account Security verification requirement that occurs when:
- Google detects unusual activity on the account
- The account hasn't completed required security verifications
- OAuth tokens need re-authentication due to security policies
The error is not a project-level issue (billing, permissions) but an account-level security verification.
Upstream Issue
This is related to opencode-antigravity-auth#335 (NoeFabris/opencode-antigravity-auth#335), but oh-my-opencode could improve the UX by:
- Catching the VALIDATION_REQUIRED error
- Extracting the validation_url from the error response
- Presenting it clearly to the user
- Providing guidance on account verification
Workarounds Attempted - ✅ Created new Google Cloud project (gen-lang-client-0707651173)
- ✅ Updated project ID in configuration
- ✅ Tried re-authenticating
- ❌ Cannot complete verification because URL is not exposed
- ❌ Cannot access original project (clear-synapse-3p4gj) in Google Cloud Console
Suggested Fix
In the error handling code for antigravity authentication:
if (error.code === 403 && error.status === "PERMISSION_DENIED") {
const errorInfo = error.details?.find(d => d["@type"]?.includes("ErrorInfo"));
if (errorInfo?.reason === "VALIDATION_REQUIRED") {
const verificationUrl = errorInfo.metadata?.validation_url;
console.error(`
⚠️ Google Account Verification Required
Your account needs verification before you can use antigravity models.
Please visit this URL to verify your account:
${verificationUrl}
After verifying, retry your request.
`);
// Mark account as needing verification
account.verificationRequired = true;
return;
}
}
Operating System
Windows
OpenCode Version
1.1.56