Skip to content

feat: add Gemini auth proxy patch#3

Open
Quantumlyy wants to merge 1 commit into
mainfrom
feat/gemini-auth-proxy-patch
Open

feat: add Gemini auth proxy patch#3
Quantumlyy wants to merge 1 commit into
mainfrom
feat/gemini-auth-proxy-patch

Conversation

@Quantumlyy
Copy link
Copy Markdown
Member

Summary

  • Add a background-agents patch for Google/Antigravity OAuth token brokering using the same control-plane security model as Codex.
  • Use opencode-antigravity-auth for request transformation while intercepting sentinel refreshes through /sessions/:id/google-token-refresh.
  • Document the new patch and expected GOOGLE_OAUTH_* secrets.

Validation

  • Reset and cleaned services/background-agents so the submodule has no local modifications.
  • Verified the patch series applies with patch -p1 through 0005.
  • Could not run unit tests in this workspace because pytest and vitest are not installed in the initialized submodule.

Created with Constructor

Copilot AI review requested due to automatic review settings May 18, 2026 20:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new background-agents patch series entry to broker Google/Antigravity (Gemini) OAuth token refreshes via the control plane (similar to the existing Codex model), plus updates model catalogs/documentation to expose the new Google model IDs.

Changes:

  • Add patch 0005-gemini-auth-proxy.patch implementing a control-plane POST /sessions/:id/google-token-refresh endpoint, sandbox-side sentinel auth writing, and a fetch-intercepting plugin that forwards refreshes to the control plane.
  • Extend shared model lists to include Google/Antigravity + Gemini CLI model IDs and defaults.
  • Document the new patch and expected GOOGLE_OAUTH_* secrets in patches/background-agents/README.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
patches/background-agents/README.md Documents the new Gemini auth proxy patch, touched files, and expected secrets.
patches/background-agents/0005-gemini-auth-proxy.patch Adds the end-to-end Google token refresh proxy flow (control plane service + sandbox plugin + tests + model exposure).
patches/background-agents/0003-opencode-and-cleanup.patch Updates the upstream model roster patch to include Google model IDs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +99
+const ANTIGRAVITY_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com";
+const ANTIGRAVITY_CLIENT_SECRET = "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";
+
Comment on lines +125 to +130
Expected secrets:
- `GOOGLE_OAUTH_REFRESH_TOKEN` — either the raw refresh token or the plugin's
packed `refreshToken|projectId|managedProjectId` value
- `GOOGLE_OAUTH_PROJECT_ID` — optional, overrides packed project ID
- `GOOGLE_OAUTH_MANAGED_PROJECT_ID` — optional, overrides packed managed project ID

@constructorr constructorr Bot force-pushed the feat/gemini-auth-proxy-patch branch 2 times, most recently from 87ed9f9 to 70ab9ca Compare May 19, 2026 04:47
@constructorr constructorr Bot force-pushed the feat/gemini-auth-proxy-patch branch from 70ab9ca to 79e404b Compare May 19, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants