Repository navigation
[Fix] Clamp Gemini 4 Argon limits to Google's values on Vercel AI Gateway - #2073
zoomote[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review statusThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging. Current step: Required CI passed. Waiting for automated review of the latest commit. If automated review does not start, a maintainer must restart it. Review-state labels are managed by this workflow; do not edit them manually. |
49792c6 to
565714a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Related GitHub Issue
No linked issue. Follow-up to the merged #2043, requested by a maintainer (Toray Altas) via Discord: re-audit provider catalogs for Gemini 4 Argon and fix any wrong metadata.
Description
The Vercel AI Gateway catalog now lists
google/gemini-4-argon, but reportscontext_window: 1,000,000andmax_tokens: 1,000,000. Google's authoritative limits are a shared 1,048,576-token window (input + thinking + output) and a 65,536-token single-request output cap, with longer decodes handled through continuation tokens.This PR adds a per-model override in
parseVercelAiGatewayModel(src/api/providers/fetchers/vercel-ai-gateway.ts) forgoogle/gemini-4-argon, following the existing per-model override pattern used foropenai/gpt-6-astraand others:contextWindow: 1,048,576 andmaxTokens: 65,536 (Google's documented values, not the gateway's).supportsReasoningEffort: low, medium, high, with default medium.supportsTemperature: false(the Google backend ignores temperature/top_p/top_k on this model).Zoo Gateway inherits the same override because it reuses
parseVercelAiGatewayModel.Provider re-audit results (all checked live):
google/gemini-4-argon); wrong context/max_tokens (1,000,000 each)google/gemini-4-argon); metadata matches Google's valuesvertex/gemini-4-argon(and@eu)No metadata deltas found for the entries merged in #2043; the registry values still match Google's documentation.
Test Procedure
parseVercelAiGatewayModeltest insrc/api/providers/fetchers/__tests__/vercel-ai-gateway.spec.tsasserting the clamped context window and max tokens, thinking levels, default effort, andsupportsTemperature: falseforgoogle/gemini-4-argon.vercel-ai-gateway.spec.ts,zoo-gateway.spec.ts): 30/30 passed.pnpm run check-typesinsrc: passed. ESLint clean on the touched files.pnpm testfrom the repository root, re-run after rebasing onto current main: 13/13 tasks green; thesrcsuite alone is 539 test files, 10,819 tests passed. (zoo-code#testis intermittently flaky under the parallel turbo run in this environment; standalone and rerun results are green.)Pre-Submission Checklist
Visual Snapshots
Not applicable: no layout, theme, or rendered-state change.
Videos (interaction / animation only)
Not applicable: no new interaction flow or animation.
Documentation Updates
Additional Notes
Sources: https://cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon and the live Vercel AI Gateway, OpenRouter, and Requesty model catalogs.
Get in Touch
Toray Altas (taltas) on Discord.