fix: support Gemini CLI native auth/model routing and ls_core 1.21.x startup flags#7
Open
xiaoqi419 wants to merge 2 commits into
Open
fix: support Gemini CLI native auth/model routing and ls_core 1.21.x startup flags#7xiaoqi419 wants to merge 2 commits into
xiaoqi419 wants to merge 2 commits into
Conversation
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
This PR fixes several compatibility issues that prevented Gemini CLI from working reliably against the local native proxy path.
What changed
x-goog-api-keyin request auth extraction for Gemini native requestsgemini-nativegemini-3-flash-agent:streamGenerateContentls_corestartup flags for newer binaries (-https_server_portand-extension_server_csrf_token)Why
Before this patch, Gemini CLI traffic could fail in multiple places:
x-goog-api-key, which the server did not acceptls_corebinaries rejected the old-server_portflag and exited immediately on startupValidation
Validated locally in WSL with the synced
ls_core1.21.6 binary and an imported Antigravity account:curl http://127.0.0.1:5173/healthreturns{"status":"ok"}/v1beta/models/gemini-3-flash-agent:streamGenerateContentreturnsOKgemini -p '只回复 OK' --output-format jsonreturns a successful JSON response through the local proxyNotes
There is still a non-blocking warning in logs around one reactive stream path missing a CSRF token, but it does not block basic Gemini CLI requests after these fixes.