Antigravity provider uses CLI subprocess instead of native API for inference
Bug: Antigravity provider uses CLI subprocess instead of native API for inference
Description
The Antigravity provider correctly uses native OAuth for login, token refresh, and model catalog listing (via cloudcode-pa.googleapis.com), but falls back to a CLI subprocess transport for actual inference. It invokes the antigravity editor binary (a VS Code fork) with flags like --model and --p that the Electron app doesn't understand, producing no model output.
Steps to Reproduce
jcode login -p antigravity— succeeds, OAuth tokens savedjcode model list -p antigravity— works (uses native API, returns model catalog)jcode run -p antigravity "say hello"— fails
Error Output
$ jcode run -p antigravity -m gemini-3-flash "say hello"
[trace] connection_type=cli subprocess
Error: Antigravity CLI produced no output: Warning: 'model' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'p' is not in the list of known options, but still passed to Electron/Chromium.
Auth Doctor Output
$ jcode auth doctor antigravity
Antigravity (antigravity)
auth_kind: OAuth
status: available
method: OAuth
health: source: ~/.jcode/antigravity_oauth.json · expiry: exact timestamp · refresh: automatic · probe: timestamp check
credential_source: jcode-managed file (~/.jcode/antigravity_oauth.json)
expiry: exact timestamp
refresh: automatic
validation_method: timestamp check
last_refresh: not recorded
validation: validation failed
needs_attention: true
diagnostics:
- Last runtime validation failed: provider_smoke: antigravity provider smoke prompt failed:
Antigravity CLI produced no output: Warning: 'model' is not in the list of known options,
but still passed to Electron/Chromium.
Warning: 'p' is not in the list of known options, but still passed to Electron/Chromium.
next_steps:
- Inspect runtime readiness: `jcode auth-test --provider antigravity`
- For browser/callback issues: `jcode login --provider antigravity --print-auth-url`
- Review current state: `jcode auth status --json`
Auth Status (redacted)
{
"id": "antigravity",
"display_name": "Antigravity",
"status": "available",
"method": "OAuth",
"health": "source: ~/.jcode/antigravity_oauth.json · expiry: exact timestamp · refresh: automatic · probe: timestamp check",
"credential_source": "jcode-managed file",
"expiry_confidence": "exact timestamp",
"refresh_support": "automatic",
"validation_method": "timestamp check",
"last_refresh": null,
"validation": "validation failed",
"auth_kind": "OAuth",
"recommended": false
}
Login Output (redacted)
$ jcode login -p antigravity
Starting native Antigravity login...
jcode will authenticate directly with Google Antigravity; the Antigravity desktop app is not required.
Opening browser for Antigravity login...
Successfully logged in to Antigravity!
Tokens saved to ~/.jcode/antigravity_oauth.json
Validating Antigravity login with live auth/runtime checks...
=== auth-test: antigravity ===
✓ credential_probe — Loaded Antigravity OAuth tokens.
✓ refresh_probe — Antigravity token load/refresh succeeded.
✗ provider_smoke — antigravity provider smoke prompt failed: Antigravity CLI produced no output
result: FAIL
Analysis
The binary contains the string Using Antigravity CLI provider (experimental) and uses connection_type=cli subprocess for inference. The antigravity binary on PATH is the Antigravity desktop editor (VS Code fork, v1.107.0), not a model CLI. The native API transport (used successfully for model listing) should also be used for inference.
Expected Behavior
The Antigravity provider should use the native HTTP API transport (same as model listing via cloudcode-pa.googleapis.com) for inference, not shell out to the editor binary.
Environment
- jcode: v0.11.9 (f071bc2a)
- OS: macOS x86_64
- Antigravity desktop app: v1.107.0
- Antigravity binary: ~/.antigravity/antigravity/bin/antigravity
Yes i cannot log in to Antigravity
Fixed. The Antigravity provider now performs inference over the native HTTP API, not a CLI subprocess. AntigravityProvider::generate_content / complete in crates/jcode-base/src/provider/antigravity.rs POST to the Code Assist generateContent endpoint with bearer OAuth + project headers and stream TextDelta/NativeToolCall events (ConnectionType { connection: "https" }). There is no longer any antigravity editor-binary subprocess in the inference path. Thanks for the thorough analysis. If a current build still shells out, please reopen with version + jcode auth-test --provider antigravity output.