You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add Antigravity CLI connector & Google OAuth provider #28889
I have verified this feature I am about to request has not been suggested before.
Describe the enhancement you want to request
Two related requests for better Google/Antigravity auth in opencode:
1. Antigravity CLI binary as a connector
Google rebranded the gemini CLI to antigravity CLI. Opencode should be able to discover and use the antigravity CLI binary directly as a provider/connector — reading its authenticated session, tokens, and available models — similar to how other CLI-based auth flows work. This would let users who have authenticated via antigravity CLI use those credentials in opencode without additional setup.
2. Google OAuth as a native provider
Currently the Google provider requires an API key (GOOGLE_GENERATIVE_AI_API_KEY). There should be a native Google OAuth sign-in option (like Anthropic/Copilot have their own auth flows) so users can sign in with their Google account and get access to Gemini models through their Google/Google One subscription without needing to generate/manage API keys.
The Antigravity CLI has two headless surfaces, and only one of them is permitted by Google's terms.
agy -p "<prompt>" (headless print mode). Google's FAQ says using third-party software to access Antigravity violates section 6 of the Antigravity Additional Terms, and the Antigravity team has answered that a third-party coding agent invoking agy -p as a backend "violates Section 6 … and can trigger automated account suspension". That is why this was closed as not planned, and I am not asking to revisit it.
agy acp (the Agent Client Protocol stdio server). This is the unmodified antigravity-acp runtime, which Google names as usable for single-user interactive development: "Using the unmodified antigravity-acp binary with native oauth-personal sign-in for single-user interactive development (for the Gemini models in your plan) is compliant and will not cause a suspension."
So this is a different integration from the one that was closed. Is the ACP runtime acceptable to you?
If it is, the shape would mirror the built-in claude-agent provider: OpenCode spawns agy acp and speaks ACP to it, the way the claude-agent provider drives the local claude binary through Anthropic's Agent SDK. The model list comes from the account at runtime (session/new returns the models and the effort levels), so it is never a pinned list, and the effort levels become OpenCode variants instead of separate model entries.
What I measured on an Antigravity CLI 1.5.14 (Google AI Pro account):
agy acp answers initialize, session/new and session/prompt, and streams agent_message_chunk, tool_call / tool_call_update and usage_update.
The account's list is 4 models: Gemini 3.8 Flash at low/medium/high, Claude Sonnet 4.6, Claude Opus 4.6 and GPT-OSS 120B. The CLI also lists Gemini 4, but reports it as unavailable on a Pro plan ("currently available to Ultra plan subscribers").
Two questions, so I can build the right thing:
Is driving the unmodified agy acp runtime acceptable given that it is the integration Google names?
If yes, should this be a built-in antigravity provider like claude-agent, or should OpenCode grow a general "any ACP agent as a provider" seam that Antigravity is the first user of?
I have a working bridge against the ACP runtime already, so I can put the implementation up quickly once you have an answer.
Following up on my question above, since this was closed as not planned and I would like an answer before reopening anything.
The closed requests were all about wrapping the CLI's print mode (agy -p) in a third-party agent. The Antigravity team has since drawn the line explicitly, on this forum:
Using the unmodified antigravity-acp binary with native oauth-personal sign-in for single-user interactive development (for the Gemini models in your plan) is compliant and will not cause a suspension.
and
having a third-party coding agent (like Claude Code) invoke agy -p as a sub-tool or automated backend wrapper violates Section 6 of the Terms of Service and can trigger automated account suspension.
So the question is narrower than the closed ones: is driving the unmodified agy acp runtime something OpenCode would ship?
A provider that does exactly that is ready: #65489. It
drives agy acp and never agy -p, so it stays on the surface Google names as usable;
takes its model list from the account (session/new reports it), so nothing is written down in OpenCode and a model Google adds shows up without a change;
publishes one model per model with the effort levels as variants, the same shape the Claude Agent provider uses, because the CLI names the reasoning effort in the model;
surfaces the agent's own tool calls as provider-executed calls and answers the agent's permission requests from OpenCode's own permission rules.
Two questions, so I can build the right thing rather than the wrong one:
Is driving the unmodified antigravity-acp runtime acceptable, given that it is the integration Google names?
If yes, should this be a built-in antigravity provider like claude-agent, or should OpenCode grow a general "any ACP agent as a provider" seam that Antigravity is the first user of?
I am happy to hold the pull request until there is an answer either way.
Activity
rekram1-node commentedon Jun 6, 2026
not allowed
ozdemirmelihahmed commentedon Nov 16, 2026
why not?
AKOrojo commentedon Nov 21, 2026
The Antigravity CLI has two headless surfaces, and only one of them is permitted by Google's terms.
agy -p "<prompt>"(headless print mode). Google's FAQ says using third-party software to access Antigravity violates section 6 of the Antigravity Additional Terms, and the Antigravity team has answered that a third-party coding agent invokingagy -pas a backend "violates Section 6 … and can trigger automated account suspension". That is why this was closed as not planned, and I am not asking to revisit it.agy acp(the Agent Client Protocol stdio server). This is the unmodifiedantigravity-acpruntime, which Google names as usable for single-user interactive development: "Using the unmodifiedantigravity-acpbinary with nativeoauth-personalsign-in for single-user interactive development (for the Gemini models in your plan) is compliant and will not cause a suspension."So this is a different integration from the one that was closed. Is the ACP runtime acceptable to you?
If it is, the shape would mirror the built-in
claude-agentprovider: OpenCode spawnsagy acpand speaks ACP to it, the way the claude-agent provider drives the localclaudebinary through Anthropic's Agent SDK. The model list comes from the account at runtime (session/newreturns the models and the effort levels), so it is never a pinned list, and the effort levels become OpenCode variants instead of separate model entries.What I measured on an Antigravity CLI 1.5.14 (Google AI Pro account):
agy acpanswersinitialize,session/newandsession/prompt, and streamsagent_message_chunk,tool_call/tool_call_updateandusage_update.Two questions, so I can build the right thing:
agy acpruntime acceptable given that it is the integration Google names?antigravityprovider likeclaude-agent, or should OpenCode grow a general "any ACP agent as a provider" seam that Antigravity is the first user of?I have a working bridge against the ACP runtime already, so I can put the implementation up quickly once you have an answer.
feat(core): add the Google Antigravity provider
AKOrojo commentedon Nov 21, 2026
Following up on my question above, since this was closed as not planned and I would like an answer before reopening anything.
The closed requests were all about wrapping the CLI's print mode (
agy -p) in a third-party agent. The Antigravity team has since drawn the line explicitly, on this forum:and
So the question is narrower than the closed ones: is driving the unmodified
agy acpruntime something OpenCode would ship?A provider that does exactly that is ready: #65489. It
agy acpand neveragy -p, so it stays on the surface Google names as usable;session/newreports it), so nothing is written down in OpenCode and a model Google adds shows up without a change;Two questions, so I can build the right thing rather than the wrong one:
antigravity-acpruntime acceptable, given that it is the integration Google names?antigravityprovider likeclaude-agent, or should OpenCode grow a general "any ACP agent as a provider" seam that Antigravity is the first user of?I am happy to hold the pull request until there is an answer either way.
feat(core): add the Google Antigravity provider