Draft
Conversation
- OAuth flow using Google's Gemini CLI credentials (PKCE + cloud-platform scope) - Proxy routes subscription requests through cloudcode-pa.googleapis.com (Code Assist API) - Auto-discovers/provisions GCP project via loadCodeAssist + onboardUser LRO - Token storage as OAuthTokenBlob with project ID, auto-refresh with 60s buffer - Frontend: popup OAuth flow in OAuthDetailView, provider-aware dispatch - Model discovery filtered to 5 working Code Assist models - Shared subscription config with knownModels whitelist - Code Assist response envelope unwrapping for both streaming and non-streaming
21a4c25 to
7ba0cef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GeminiAuthServicehandles OAuth token exchange and access token refresh with in-memory cacheGeminiAuthControllerprovides/api/v1/routing/gemini-auth(start) and/callbackendpointsAuthorization: Bearerheader instead of?key=query parameterpostMessage, and automatic cleanup on popup closeTest plan
Summary by cubic
Adds Gemini subscription support via Google Code Assist with a popup PKCE OAuth flow. Subscription requests now use Bearer tokens and target the Code Assist API; tokens auto-refresh and responses are unwrapped for clients.
New Features
/api/v1/oauth/gemini/authorizeand/api/v1/oauth/gemini/revokewith PKCE; defaults to Gemini CLI client; stores a token blob with project ID and auto-refresh.v1internal:generateContent) withAuthorization: Bearer(no?key=); unwraps the Code Assist response envelope (streaming and non‑streaming)./oauth/*/donepopup completion; disconnect flows updated.Migration
GOOGLE_GEMINI_CLIENT_IDandGOOGLE_GEMINI_CLIENT_SECRETto enable OAuth (falls back to the Gemini CLI defaults if present).Written for commit 7ba0cef. Summary will update on new commits.