Skip to content

[Bug]: Gemini 4 Argon usage is Unpriced again since LiteLLM added kyma/gemini-4-argon (regression of #24834) #27999

Closed

Description

@Error336070

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
  • User-Required Disclaimer: Report written by Claude Opus 5.5 on behalf of Error336070

Area

apps/server

Steps to reproduce

  1. Run a few turns with Gemini 4 Argon through the Antigravity provider.
  2. Open Usage and select Past 24h and Cost.
  3. Look at the Antigravity provider row and the Breakdown by model.

Expected behavior

Argon rows get the API-equivalent price that LiteLLM lists for gemini/gemini-4-argon and vertex_ai/gemini-4-argon. They did after #24834 merged on 2026-10-25.

Actual behavior

Both Argon rows show "Unpriced", though T3 still counts their tokens:

# Model Cost Tokens
5 gemini-4-argon-a Unpriced 4.34M
6 gemini-4-argon-high Unpriced 2.17M

The Antigravity provider row reads "$0.00 · 0.0% of cost · 6.51M tokens", so the cost total leaves Argon out. Codex and Claude Code rows on the same page are priced.

Cause

LiteLLM has no bare gemini-4-argon key. #24834 priced Argon by setting rateModel to gemini-4-argon and relying on the bare alias that parseRateTable builds from provider-qualified keys.

parseRateTable drops a bare alias when two provider entries disagree on base rates. On 2026-10-25 every */gemini-4-argon entry had the same price, so the alias survived. On 2026-10-29 LiteLLM added the Kyma provider (BerriAI/litellm#48756), and its Argon entry costs 2.7 times as much:

LiteLLM key Input / 1M Output / 1M Cache read / 1M
gemini/gemini-4-argon $2.00 $10.00 $0.10
vertex_ai/gemini-4-argon $2.00 $10.00 $0.10
github_copilot/gemini-4-argon $2.00 $10.00 $0.10
opencode_go/gemini-4-argon $2.00 $10.00 $0.10
kyma/gemini-4-argon $5.40 $27.00 $0.27

mergeAliasRate returns null for that conflict, gemini-4-argon never enters the table, and lookupRate returns null. T3 fetches the rate table from LiteLLM main at runtime, so existing builds broke without any T3 change.

There is a second, separate gap. withRateModel in antigravityUsageReader.ts strips only -low, -medium and -high, so gemini-4-argon-a gets no rateModel. That row would stay unpriced even with the alias restored. I couldn't find what the -a suffix means from local data.

Other models probably affected

I ran the alias step of parseRateTable as a script against today's LiteLLM table, once with the kyma/* entries and once without. These bare aliases exist without Kyma and are gone with it:

claude-fable-5.1, claude-haiku-5.5, claude-opus-5.5, claude-sonnet-5.5, gemini-3.1-pro, gemini-4-argon, gemma-4-31b, grok-4.20, grok-4.20-multi-agent, grok-4.3, grok-4.6, grok-4.7, llama-4-maverick, mimo-v2.6-flash, muse-spark-1.1, muse-spark-1.3, muse-spark-open, sonar-pro, step-5-preview

The script compares base token rates only and skips the fast-tier fill, so treat the list as a lead. I confirmed only Argon in the UI. Claude Code rows stay priced because claude-opus-5-5 has its own bare LiteLLM key. gemini-3.1-pro matters for Antigravity, since MODEL_IDS maps three IDs to it.

Possible fix

  • When a bare alias conflicts, prefer the model owner's entry over dropping the alias. For gemini-*, that means gemini/ or vertex_ai/. The existing "leaves an ambiguous bare name unpriced" test should keep passing for names with no owner entry. fix(usage): canonical LiteLLM keys must win rate-table collisions #8548 dealt with a similar collision rule.
  • Or have the Antigravity reader set rateModel to gemini/gemini-4-argon, so pricing doesn't depend on every reseller agreeing.
  • Decide how to price gemini-4-argon-a, and add it to withRateModel if it shares the base price.
  • Add a test with a marked-up reseller entry next to a first-party entry, so a future LiteLLM addition can't undo this again.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Nightly) 0.1.6-nightly.20261030.3904. Source read at main 961026c.

Environment

Windows 11 Pro 10.0.26200, desktop app, Antigravity provider (ACP 1.4.1), Gemini 4 Argon.

Related, not covered here

The same Argon thread's status card shows only the Claude & GPT (shared) quota and no Gemini or Argon window. #23080 and #27448 already track that, with fixes in #23011 and #21361. My ~/.t3/caches/antigravity.json on this build matches #23080: only 3p-5h and 3p-weekly, checked 2026-10-31T06:19Z.

Workaround

Open each Argon row in the Usage breakdown, choose "Set price", and enter Google's rates ($2.00 input, $10.00 output, $0.10 cache read per 1M tokens). Overrides match the exact model name, so gemini-4-argon-a and gemini-4-argon-high each need one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions