Route Gemini OAuth through @google/genai SDK - #25
Conversation
Use GoogleGenAI httpOptions for timeout and retries instead of raw fetch, removing the REST JSON cast.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5832970e65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5832970e65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Drop the placeholder apiKey (NodeAuth always appends the key header when apiKey is set). Temporarily unset GEMINI/GOOGLE API key env vars during the OAuth SDK call so implicit env keys cannot add the header either.
|
Pushed abbb727 addressing the Codex review: OAuth now constructs |
Follows the Gemini OAuth SDK follow-up fix.
Add a CLI Version row from package.json and build rows with concat.
Annotate prefix rows as CheckRow[] then concat so tsc accepts renderTable input.
Bracket OAuth and model fetch under bracketStatus with phased status messages, fix the OAuth race timeout, resolve email via getTokenInfo, drop forced consent on re-auth, and soften the browser success copy.
Summary
fetchGemini OAuth path withGoogleGenAIso OAuth uses the samehttpOptionsas API-key calls: 120s timeout and three retry attempts.Authorization: Bearer <access_token>inhttpOptions.headers; use a placeholderapiKeyonly to satisfy the SDK constructor without sending a real API key on the wire.response.json()cast toGenerateContentResponse, so responses stay SDK-parsed and aligned with the API-key path.Test plan
pnpm run typecheckandpnpm run lint:ci