Repository navigation
fix(usage): reuse Gemini CLI project ID for quota checks (port 9router#1428) - #4454
Merged
diegosouzapw merged 1 commit intoJun 20, 2026
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Ports decolua/9router#1428 by @Delcado19. The Gemini CLI usage path now short-circuits the `loadCodeAssist` round-trip when the connection already carries a stored `projectId` (or `providerSpecificData.projectId`), and normalizes the two upstream shapes — bare string or `{ id: "..." }` — plus trims stray whitespace, matching the executor/oauth normalization already shipped in `open-sse/executors/gemini-cli.ts` and `src/lib/oauth/services/gemini.ts`. The dead-end "Gemini CLI project ID not available." message is replaced with actionable guidance pointing the operator at reconnect / Code Assist setup. TDD: new `tests/unit/gemini-usage-projectid.test.ts` (4 cases) covers stored-projectId short-circuit, `{id:...}` normalization, whitespace trimming, and the improved error message. Co-authored-by: Delcado <Delcado19@users.noreply.github.com>
diegosouzapw
force-pushed
the
feat/port-pr-1428-reuse-gemini-cli-project-id
branch
from
June 20, 2026 23:24
392b503 to
f3431d7
Compare
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…w#4454) Integrated into release/v3.8.32
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
Ports decolua/9router#1428 by @Delcado19 (122 LOC upstream).
The Gemini CLI usage path (
getGeminiUsageinopen-sse/services/usage.ts) now:projectId— when present, it short-circuits theloadCodeAssistround-trip instead of always going to the network.loadCodeAssistreturns the project either as a bare string or wrapped in{ id: "..." }; both are now unwrapped consistently. This matches the existing executor/oauth normalization inopen-sse/executors/gemini-cli.ts::extractProjectIdandsrc/lib/oauth/services/gemini.ts.The
projectIdwas already plumbed through the connection (3rd argument togetGeminiUsage); upstream surfaced the normalization gap that prevented it from short-circuiting in OmniRoute's flow.Test plan
tests/unit/gemini-usage-projectid.test.ts(4 cases) — RED before fix, GREEN after.projectId→ skipsloadCodeAssist, callsretrieveUserQuotadirectly.loadCodeAssistreturns{cloudaicompanionProject: {id: "..."}}→ unwrapped.projectIdavailable → message contains "Reconnect Gemini CLI" + "Gemini Code Assist".agy-usage-quota,antigravity-usage-fetcher,antigravity-usage-service(18/18 pass).