Repository navigation
feat(web,server): accurate usage limits and pricing for Pi and Antigravity - #3
Merged
Merged
Conversation
added 4 commits
October 22, 2026 13:32
- Read the Kimi credential from the pi agent auth.json and query the usage endpoints
- Label windows with the upstream ("Kimi Code 5-hour") so a pi limit names its subscription
- Probe during provider status checks, only when pi is enabled and authenticated
- Strip tier suffixes (-high, -low, -trial) into a rateModel the rate tables resolve - Leave unknown SKUs such as gemini-3.8-flash-n unpriced rather than guess - Scan all <stateDir>/providers/antigravity profiles, including unconfigured instances - Resolve OpenRouter run tags (:free, :batch) to the base model rate
- Send client version 2.25.0: the quota endpoint only returns the Gemini and Argon groups to newer clients - Label Argon buckets "Gemini 4 Argon" so they stay apart from Gemini windows
- Add ModelVendorIcon, which maps a model or window name to a vendor logo - Use it for pi, OpenCode and Antigravity in the model breakdown, pooled limit cards and composer limit rows - Fall back to the provider mark when no vendor matches
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.
Problem
Usage reporting was accurate only for Claude and Codex. Pi reported no subscription limits, even with a Kimi Code login. Antigravity's limits card showed only the unused Claude/GPT group, priced models it had used at $0, and skipped conversation data under profiles of unconfigured instances or other state directories.
Change
One PR because all four commits fix the same defect: usage accuracy for providers that front other vendors' models. The commits are separable for review.
Surfaces: web only (desktop wraps it, mobile unchanged). The server probes are client-agnostic, so local, relay and tunnel connections behave the same. OpenCode gets logos only.
Scope and approval
Fork PR into WianVDM/t3code main requested by the fork owner. This change is not proposed to pingdotgg/t3code, so the upstream prior-approval rule does not apply.
Verification
Automated tests:
Manual verification:
Before and after, same instance and data, 1280px wide, dark theme. Before is main at 6460ba9, after is this branch at 26d761d.
Limits tab. Before: Antigravity shows only the Claude/GPT group and Pi shows nothing. After: Gemini 5-hour, Gemini weekly and Gemini 4 Argon weekly appear, Pi shows the Kimi Code windows, and each row carries its vendor logo.
Cost tab, model breakdown. Before: Antigravity totals $0.00 and every Gemini row is Unpriced. After: Gemini rows are priced (Antigravity $82.49, the total moves from $2,325.25 to $2,407.63), and multi-vendor providers show the model vendor logo.
Not checked:
Models and harness: Claude Sonnet 5.5 (orchestration), Gemini 3.8 Flash (commits and PR prep) and earlier Pi-provider runs, in T3 Code.