Skip to content

fix(server): price Antigravity Orchestrator (Argon) usage - #47202

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
drstrangerujn:fix/antigravity-orchestrator-argon-pricing
Dec 2, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
drstrangerujn:fix/antigravity-orchestrator-argon-pricing

Conversation

@drstrangerujn

Copy link
Copy Markdown
Contributor

Problem

Antigravity's Orchestrator (Argon) (gemini-pro-orchestrator-argon, model ID 1681) shows up as unpriced ($0.00) in Usage -> Cost:

  1. antigravityRateModel maps gemini-pro-orchestrator-neon -> gemini-4-neon, gemini-pro-orchestrator-g1-pro -> gemini-4-argon, and gemini-pro-orchestrator -> gemini-4-carbon, but does not map gemini-pro-orchestrator-argon, leaving it unmatched in the LiteLLM rate table.
  2. MODEL_IDS omits 1681, so steps without inline model-name metadata fall back to antigravity-model-1681 instead of gemini-pro-orchestrator-argon.

Fix

Follows the same pattern as #40352:

  • Add 1681: "gemini-pro-orchestrator-argon" to MODEL_IDS in apps/server/src/provider/Drivers/antigravityUsageReader.ts.
  • Map gemini-pro-orchestrator-argon to "gemini-4-argon" in antigravityRateModel.
  • Add test coverage in apps/server/src/provider/Drivers/antigravityUsageReader.test.ts for both the explicit model name (gemini-pro-orchestrator-argon) and model-less steps carrying model ID 1681.

Verification

  • Found in local Antigravity conversation DB: gen_metadata records field 3 = 1681, field 19 = "gemini-pro-orchestrator-argon", field 21 = "Orchestrator (Argon)".
  • Before fix: All 35 gemini-pro-orchestrator-argon records in local Antigravity history resolved with rateModel: undefined and costSource: "unpriced" ($0.00).
  • After fix: Running readAntigravityUsage + priceUsage against the same local Antigravity conversations directory and usage-model-rates.json priced all 35/35 records via rateModel: "gemini-4-argon" (costSource: "modelPriced", $5.06).
  • Automated checks:
    • vp test run src/provider/Drivers/antigravityUsageReader.test.ts src/usage/usagePricing.test.ts -> 2 files, 32 passed.
    • vp fmt --check apps/server/src/provider/Drivers/antigravityUsageReader.ts apps/server/src/provider/Drivers/antigravityUsageReader.test.ts -> passed.

Assisted by Gemini 4 Neon.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Dec 2, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 0c7659f

Macroscope's review found this PR approvable — Recognizes Antigravity Argon Orchestrator usage and applies the existing Argon rates to usage cost summaries. The change is confined to usage reporting and does not alter provider charges or model-selection defaults.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0c7659f and c507568.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The usage reader now resolves model ID 1681 to gemini-pro-orchestrator-argon. It maps that model and gemini-pro-orchestrator-g1-pro to gemini-4-argon. The test covers named and model-less steps.

Changes: Argon model mapping

Layer / File(s) Summary
Model mapping and test coverage
apps/server/src/provider/Drivers/antigravityUsageReader.ts, apps/server/src/provider/Drivers/antigravityUsageReader.test.ts
The reader adds the fallback mapping for model ID 1681 and maps both Argon orchestrator names to gemini-4-argon. The test covers named and model-less steps resolved to that rate model.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · previous review 0c765

This change prices Antigravity Orchestrator (Argon) usage in Usage → Cost. It has tests for named and model-less steps, and no actionable merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): price Antigravity Orchestrator (Argon) usage" names the main change. The PR adds the model ID 1681 to MODEL_IDS and maps gemini-pro-orchestrator-argon to gemini-4-argon so that…
Description check Passed The description follows the template sections Problem, Fix (Change), Scope, and Verification. It explains the root cause in two numbered points: a missing rate-model mapping and a missing MODEL_IDS en…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(server): price Antigravity Orchestrator (Argon) usage" names the main change. The PR adds the model ID 1681 to MODEL_IDS and maps gemini-pro-orchestrator-argon to gemini-4-argon so that this Antigravity model is priced instead of showing $0.00. The title is specific, follows the conventional commit format, and matches the changeset.

Full details: Description check

Explanation

The description follows the template sections Problem, Fix (Change), Scope, and Verification. It explains the root cause in two numbered points: a missing rate-model mapping and a missing MODEL_IDS entry for 1681. It lists the file-level changes and the test coverage, and it reports before and after pricing results with the commands run. The Scope section does not link an issue or explain why no issue is needed, and it does not link the referenced PR #40352 as a maintainer request. The template also asks for the model and harness used, and the description includes 'Assisted by Gemini 4 Neon', which covers that. Overall the description is mostly complete, with a gap in the Scope section.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4a77a59 and 0c7659f.

Files selected for processing: 2

  • apps/server/src/provider/Drivers/antigravityUsageReader.test.ts
  • apps/server/src/provider/Drivers/antigravityUsageReader.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 2, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Seed five separate synthetic Antigravity conversation databases, each with 200K input and 20K output tokens: named Orchestrator Argon (no numeric ID), numeric-only 1681, named Orchestrator Neon, numeric-only 1537, and named Gemini 4 Argon. On each fresh server, create a project through t3.project, enable Antigravity in settings.json with Gemini API key mode and a dummy key, open /usage, allow Antigravity usage access, select Cost and 30 days, wait for loading to finish, and capture the full breakdown.

Environment: real web client and server, browser viewport 1280×1100, light theme, isolated fresh state, T3CODE_DEV_SEED=0; ANTIGRAVITY_DATA_DIR points to the same synthetic history on both sides. Provider setup is written through the normal settings file; usage access and display controls are driven in the UI.

Scenario: Orchestrator Argon named and numeric history contributes to estimated cost

Proven: the scenario fails on base b64cbc65f4 and passes on head c50756897f.

Base b64cbc65f4 Head c50756897f
Result ❌ failed
ASSERTION_FAILED: expect.toContainText failed
locator: locator("tr").filter({ hasText: "gemini-pro-orchestrator-argon" })
expected: text containing "$2.40"
observed: text "4 gemini-pro-orchestrator-argon Unpriced 220K" (match count 1)
✅ passed
argon cost breakdown Base b64cbc65f4: argon cost breakdown Head c50756897f: argon cost breakdown
failure Base b64cbc65f4: failure

Base total: $3.00; named Argon and ID 1681 are Unpriced at 220K tokens each. Head total: $5.40; both merge as gemini-pro-orchestrator-argon, $2.40 / 440K tokens. Neon remains $1.80 / 440K and Gemini 4 Argon remains $1.20 / 220K.

Scenario · Synthetic history seed · Before recording · After recording

Run seed.py with an empty output directory argument, set ANTIGRAVITY_DATA_DIR to that directory, and inherit ANTIGRAVITY_DATA_DIR and T3CODE_DEV_SEED into scenarios:prove.

Not shown:

  • History is synthetic, as in triage. No Google-signed-in agy session was available to independently confirm that real history emits model ID 1681 or the exact Orchestrator Argon label; the app's handling and pricing of those inputs is proven. The author's 35 original records and $5.06 total were not available.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Dec 2, 2026
@juliusmarminge
juliusmarminge merged commit 6fce38c into pingdotgg:main Dec 2, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 2, 2026
imetn added a commit to imetn/t4code that referenced this pull request Dec 2, 2026
…ingdotgg#45341

Ported prerequisite pingdotgg#45341 (open-popups) and 27 of 28 upstream commits
from b4b58d2..7538a0f, preserving all locked T4 customizations,
zero telemetry, and T4 branding:
- Bounded command projection reads (pingdotgg#47115)
- Move threads between projects & recover missing workspace folders (pingdotgg#47234)
- Mention menu highlight update (pingdotgg#47210, enabling files mention in test for T4 Lock pingdotgg#18)
- Mobile image-chip-without-text send (pingdotgg#47173)
- Antigravity Argon pricing (pingdotgg#47202), OpenCode 64-char MCP tool names (pingdotgg#43800)
- GitHub HTTPS->SSH clone fallback (pingdotgg#47239), open popup coordination (pingdotgg#47167)
- Plus 19 additional upstream fixes across server, web, mobile, and providers
- Auto-synced all 30 GT v12 i18n catalogs via sync:t4-i18n (0 untranslated)
- Deferred pingdotgg#47163 (depends on unported workflow-subjects) in .t4-upstream-sync.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants