Skip to content

[vertex-ai][google] Add Gemini 4 Argon, fix Argon region/tier pricing - #987

Open
naresh4dev wants to merge 2 commits into
mainfrom
feat/gemini-4-argon
Open

naresh4dev wants to merge 2 commits into
mainfrom
feat/gemini-4-argon

Conversation

@naresh4dev

Copy link
Copy Markdown
Member

What

Adds Gemini 4 Argon (gemini-4-argon, GA 2026-10-13) to the Gemini Developer API provider, and completes/corrects the Vertex AI entry that landed in 05ce0d7.

general/ pricing/
vertex-ai fixed params completed region × mode matrix
google added added

Why

Two bugs in the existing Vertex entry:

  1. Non-global regions and priority/flex/batch were all billed at the global standard rate. The entry had a single flat pay_as_you_go block with no custom_pricing.regions, unlike every other Gemini model in the file. Priority traffic was undercharged 44%, batch/flex overcharged 100%.
  2. gemini-4-argon-cyber-permissive was given the promotional rate. The pricing page footnote says "Promotional pricing does not apply to Gemini 4 Argon Cyber Permissive" — it was undercharged by 50%.

Params were also wrong for this model family: Argon returns HTTP 400 if thinking_budget is set and only accepts thinking levels, but the entry exposed thinking.budget_tokens.

Pricing

Promotional rate (in effect through 2026-11-30), $/1M ÷ 10000 → cents/token:

Mode Global (in / cached / out) Non-global
standard $2 / $0.10 / $10 $2.2 / $0.11 / $11
batch, flex $1 / $0.05 / $5 $1.1 / $0.055 / $5.5
priority $3.6 / $0.18 / $18 $3.96 / $0.198 / $19.8

Cyber Permissive takes the list rate (exactly 2× the above). Grounding is $14/1k queries → 1.4.

Note

On 2026-12-01 the promo lapses and all Argon rates double. A follow-up is needed then; this PR deliberately matches the existing gemini-3.8-flash convention of carrying the currently-effective rate.

Config notes

  • max_tokens: 65536 — the per-request synchronous cap. The docs' "Maximum output tokens: 1,048,576" is only reachable via long-decode continuation_token across multiple requests, so 65536 is the right per-call ceiling.
  • reasoning_effort (low/medium/high, default medium) replaces thinking.budget_tokens. The gateway already maps this to thinkingConfig.thinkingLevel for non-2.5 Gemini models, so no gateway change is needed.
  • removeParams: temperature, top_p (+top_k on google) — Argon ignores custom sampling values.
  • cache_read_input_token only, no cache_write — implicit caching only (6,144-token min); explicit caching is unsupported.
  • google keys are -lte-128k/-gt-128k because that provider's handler unconditionally appends a context-tier suffix. Argon isn't context-tiered, so both tiers are identical — same as gemini-3.8-flash.

Testing

  • jq empty on all 4 files
  • python3 scripts/check_duplicate_keys.py → no duplicates
  • npm run format / npx prettier --check → clean
  • npm run lint → 2653 errors, all pre-existing in general/scenario-ai.json; identical count on clean origin/main, none in these 4 files
  • Script-verified all 48 price values round-trip against the official $/1M tables

Sources

Gemini 4 Argon is available on the Gemini Developer API (generativelanguage),
so add it alongside the existing Vertex entry.

Config:
- 65,536 max output tokens (per-request synchronous cap; 1M is only reachable
  via long-decode continuation tokens across multiple requests)
- reasoning_effort low/medium/high instead of thinking.budget_tokens: Argon
  returns HTTP 400 for thinking_budget and only accepts thinking levels
- removeParams temperature/top_p/top_k: Argon ignores sampling parameters
- cache_read only, no cache_write: implicit context caching only

Pricing (promotional rate in effect through 2026-11-30), $/1M -> cents/token:
- input $2 -> 0.0002, output $10 -> 0.001, cached input $0.10 -> 0.00001
- batch input $1 -> 0.0001, batch output $5 -> 0.0005
- grounding $14/1k queries -> 1.4

Keyed as -lte-128k/-gt-128k because the google pricing handler always appends
a context-tier suffix; Argon is not context-tiered so both are identical.

Source: https://ai.google.dev/gemini-api/docs/pricing
        https://ai.google.dev/gemini-api/docs/models/gemini-4-argon
The initial gemini-4-argon entry only carried a single flat rate, so
non-global regions and the priority/flex/batch execution modes were all
billed at the global standard rate. Fill in the region x execution-mode
matrix that every other Gemini model in this file already has.

Rates (promotional, in effect through 2026-11-30), $/1M -> cents/token:
                   global                        non-global (default)
  standard    $2 / $0.10 / $10                  $2.2 / $0.11 / $11
  batch/flex  $1 / $0.05 / $5                   $1.1 / $0.055 / $5.5
  priority    $3.6 / $0.18 / $18                $3.96 / $0.198 / $19.8

Also corrects gemini-4-argon-cyber-permissive, which had been given the
promotional rate. The pricing page footnote states the promotion does not
apply to Cyber Permissive, so it takes the list rate ($4 in / $20 out /
$0.20 cached, +10% non-global) - previously undercharged by 50%.

Params: Argon returns HTTP 400 when thinking_budget is set and only accepts
thinking levels, so thinking.budget_tokens is replaced with reasoning_effort
(low/medium/high, default medium), which the gateway already maps to
thinkingConfig.thinkingLevel. temperature/top_p are removed since Argon
ignores sampling parameters.

Source: https://cloud.google.com/vertex-ai/generative-ai/pricing
        https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/4-argon
Copilot AI balanced review requested due to automatic review settings October 13, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The configurations consistently implement the documented parameters and pricing calculations.

0 open findings

What changed in this PR

Adds Gemini 4 Argon support for Google and corrects Vertex AI configuration and pricing.

Changes:

  • Adds Google model metadata and pricing.
  • Corrects Argon parameters and Cyber Permissive rates.
  • Adds Vertex AI regional and execution-mode pricing matrices.
File Description
general/​google.json Adds Gemini 4 Argon capabilities and parameters.
general/​vertex-ai.json Corrects supported Argon parameters.
pricing/​google.json Adds standard and batch pricing tiers.
pricing/​vertex-ai.json Corrects rates and adds regional mode pricing.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants