feat: add CLIProxyAPI v6.6.89 Antigravity compatibility to fix antigravity usage#137
Conversation
Added troubleshooting section for common issues related to multi-account authentication, Gemini model not found, and session errors.
Update model names in README.md
Port Antigravity payload enhancements from CLIProxyAPI v6.6.89: - Add systemInstruction with role 'user' and Antigravity identity text - Add requestType: 'agent' to wrapped request body - Add ANTIGRAVITY_SYSTEM_INSTRUCTION constant with full identity/guidelines Reference: router-for-me/CLIProxyAPI@67985d8
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis PR duplicates the Changes
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/constants.ts:
- Around line 140-228: The ANTIGRAVITY_SYSTEM_INSTRUCTION string has
content-quality problems: fix the numbering duplicate (three "4" entries) under
"Design Aesthetics" so list items are correctly numbered/ordered, change
"Javascript" to "JavaScript" in the "Core" tech stack section, and remove
unintended trailing commas from section headers and list introductions (e.g.,
after "## Technology Stack,", "Design Aesthetics,", and "Implementation
Workflow,", etc.) to make punctuation consistent; keep the overall intent but
trim or consider collapsing non-essential long guidelines to reduce the
constant's size if possible.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
src/constants.tssrc/plugin/request.ts
🧰 Additional context used
🧬 Code graph analysis (1)
src/plugin/request.ts (1)
src/constants.ts (1)
ANTIGRAVITY_SYSTEM_INSTRUCTION(149-228)
🔇 Additional comments (4)
src/plugin/request.ts (3)
48-48: LGTM - Import added correctly.The import of
ANTIGRAVITY_SYSTEM_INSTRUCTIONis properly structured and positioned with related constants.
1284-1284: LGTM - Request type correctly set.Setting
requestType: "agent"aligns with the CLIProxyAPI v6.6.89 compatibility objective.
1250-1278: Verify the CLIProxyAPI v6.6.89 API contract for systemInstruction.role.The injection logic sets
systemInstruction.role = "user"per CLIProxyAPI v6.6.89 compatibility requirements, but this is non-standard (most APIs expectrole: "system"). The input handling (object with parts, plain string, or missing instruction) is correct, and the logic properly prepends the 79-lineANTIGRAVITY_SYSTEM_INSTRUCTIONconsistently.However, verify that the Antigravity API contract actually accepts
role: "user"for system instructions—this setting is unusual and warrants confirmation against CLIProxyAPI v6.6.89 documentation or API behavior.The 79-line instruction prepended to every request will increase token consumption. Monitor for context-length errors in production.
src/constants.ts (1)
149-228: The AI summary incorrectly claims duplication ofANTIGRAVITY_SYSTEM_INSTRUCTION.Only a single export of
ANTIGRAVITY_SYSTEM_INSTRUCTIONexists at line 149 insrc/constants.ts. The summary's assertion that it was "duplicated twice" is inaccurate.
- Fix 'Javascript' → 'JavaScript' capitalization - Fix duplicate numbering (4, 4) → (4, 5) in Design Aesthetics - Remove trailing commas from section headers and list items - Normalize indentation (tabs → spaces)
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @src/constants.ts:
- Line 150: Replace the incorrect brand capitalization "Google Deepmind" with
the correct "Google DeepMind" wherever that literal appears (e.g., the string on
line containing "You are Antigravity, a powerful agentic AI coding assistant
designed by the Google Deepmind team") so the constant/string uses the official
brand capitalization.
🧹 Nitpick comments (1)
src/constants.ts (1)
178-178: Fix verb form for parallel structure.Line 178 uses "Using modern typography" (present participle) while surrounding bullets use imperative verbs ("Avoid", "Use", "Add"). This breaks parallel structure.
✏️ Proposed fix
- - Using modern typography (e.g., from Google Fonts like Inter, Roboto, or Outfit) instead of browser defaults. + - Use modern typography (e.g., from Google Fonts like Inter, Roboto, or Outfit) instead of browser defaults.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
src/constants.ts
🔇 Additional comments (3)
src/constants.ts (3)
140-148: LGTM! Clear documentation of the new constant.The comment structure and JSDoc clearly document the purpose and origin of this system instruction constant.
217-228: LGTM! Clear agent behavior guidelines.The ephemeral message and communication style sections provide clear, actionable guidelines for agent behavior and user interaction.
164-164: Past content issues have been resolved.The previous review identified several content quality issues that have been addressed in the current version:
- Line 164 now correctly uses "JavaScript" (capital S)
- Lines 182-183 show correct sequential numbering (items 4 and 5, not three items numbered "4")
- Section headers no longer have trailing commas
Good work addressing the feedback!
Also applies to: 182-183
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/constants.ts (1)
161-207: Consider standardizing markdown header levels.The instruction uses inconsistent header levels: "Design Aesthetics" uses
#(line 174) while "Technology Stack" (line 161), "Implementation Workflow" (line 185), and "SEO Best Practices" (line 207) use##. Standardizing to the same level would improve consistency when rendered.♻️ Proposed fix for header consistency
-# Design Aesthetics +## Design Aesthetics
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
src/constants.ts
🔇 Additional comments (1)
src/constants.ts (1)
140-229: Past issues successfully addressed.The constant has been properly implemented with the fixes from previous review feedback applied:
- "JavaScript" is now correctly capitalized (line 164)
- "Google DeepMind" uses proper brand capitalization (line 150)
- Numbering under "Design Aesthetics" is now sequential: 4, 5 (lines 182-183)
The large instruction payload matches the CLIProxyAPI v6.6.89 reference and serves the intended purpose of providing identity and guidelines for Antigravity requests.
|
can we merge this ASAP 😂 |
|
Tested and worked perfectly on my end. Great work 🙏 |
|
Working perfect here! |
|
The new version, in combination with the ultrawork mode of oh my opencode, can easily lead to overly long context |
…rors Port Antigravity payload enhancements from CLIProxyAPI v6.6.89: - Add ANTIGRAVITY_SYSTEM_INSTRUCTION with agent identity/guidelines - Inject systemInstruction with role 'user' for Antigravity requests - Add requestType: 'agent' to wrapped request body - Update userAgent to 'antigravity' for Antigravity requests This fixes RESOURCE_EXHAUSTED (429) errors when using Antigravity. Adapted from: NoeFabris/opencode-antigravity-auth#137 Reference: router-for-me/CLIProxyAPI@67985d8
- Add ANTIGRAVITY_SYSTEM_INSTRUCTION constant for system identity - Inject system instruction with role 'user' for Antigravity requests - Add requestType 'agent' field to wrapped request body - Maintains compatibility with latest Antigravity API changes - Reference: PR #137 from NoeFabris/opencode-antigravity-auth
…rors Port Antigravity payload enhancements from CLIProxyAPI v6.6.89: - Add ANTIGRAVITY_SYSTEM_INSTRUCTION with agent identity/guidelines - Inject systemInstruction with role 'user' for Antigravity requests - Add requestType: 'agent' to wrapped request body - Update userAgent to 'antigravity' for Antigravity requests This fixes RESOURCE_EXHAUSTED (429) errors when using Antigravity. Adapted from: NoeFabris/opencode-antigravity-auth#137 Reference: router-for-me/CLIProxyAPI@67985d8
|
Thanks for your great works, PR merge, release on 1.2.8 |
…rors Port Antigravity payload enhancements from CLIProxyAPI v6.6.89: - Add ANTIGRAVITY_SYSTEM_INSTRUCTION with agent identity/guidelines - Inject systemInstruction with role 'user' for Antigravity requests - Add requestType: 'agent' to wrapped request body - Update userAgent to 'antigravity' for Antigravity requests This fixes RESOURCE_EXHAUSTED (429) errors when using Antigravity. Adapted from: NoeFabris/opencode-antigravity-auth#137 Reference: router-for-me/CLIProxyAPI@67985d8
…rors Port Antigravity payload enhancements from CLIProxyAPI v6.6.89: - Add ANTIGRAVITY_SYSTEM_INSTRUCTION with agent identity/guidelines - Inject systemInstruction with role 'user' for Antigravity requests - Add requestType: 'agent' to wrapped request body - Update userAgent to 'antigravity' for Antigravity requests This fixes RESOURCE_EXHAUSTED (429) errors when using Antigravity. Adapted from: NoeFabris/opencode-antigravity-auth#137 Reference: router-for-me/CLIProxyAPI@67985d8
…rors Port Antigravity payload enhancements from CLIProxyAPI v6.6.89: - Add ANTIGRAVITY_SYSTEM_INSTRUCTION with agent identity/guidelines - Inject systemInstruction with role 'user' for Antigravity requests - Add requestType: 'agent' to wrapped request body - Update userAgent to 'antigravity' for Antigravity requests This fixes RESOURCE_EXHAUSTED (429) errors when using Antigravity. Adapted from: NoeFabris/opencode-antigravity-auth#137 Reference: router-for-me/CLIProxyAPI@67985d8
Summary
This PR ports the Antigravity payload enhancements from CLIProxyAPI v6.6.89 to maintain compatibility with the latest Antigravity API changes.
Changes
1. System Instruction Injection
ANTIGRAVITY_SYSTEM_INSTRUCTIONconstant with the full Antigravity identity and guidelines textsystemInstructionwithrole: "user"into requests (matches CLIProxyAPI behavior)2. Request Type
requestType: "agent"to the wrapped request bodyReference
Commit from CLIProxyAPI: router-for-me/CLIProxyAPI@67985d8
Testing
npm run build)Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.