mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7536] [MERGED] feat(google): add Gemini 4 Argon to AI Studio and Vertex #7779
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7779
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7536
Author: @SpicyMarinara
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/gemini-4-argon📝 Commits (2)
02884fefeat(google): add Gemini 4 Argon to AI Studio and Vertex58cd38fMerge branch 'staging' into feat/gemini-4-argon📊 Changes
6 files changed (+311 additions, -15 deletions)
View changed files
📝
docs/connections/providers-reference.md(+4 -0)📝
packages/server/src/services/llm/providers/google.provider.ts(+39 -12)📝
packages/shared/src/constants/generation-parameter-relevance.ts(+17 -3)📝
packages/shared/src/constants/model-lists.ts(+15 -0)📝
scripts/regressions/generation-parameter-relevance.regression.ts(+29 -0)📝
scripts/regressions/provider-compat.regression.ts(+207 -0)📄 Description
Linked issue
Closes #7534
Translation follow-up: #7535
Why this change
gemini-4-argon) on 2026-10-13. It is a stable model in AI Studio and generally available on Vertex./gemini-3/, so Argon would have receivedthinkingBudget, which it rejects with HTTP 400.global,usandeulocations.What changed
Nothing that worked before stops working. Gemini 3 request bodies are unchanged byte for byte on both providers, and a regression pins them. One side effect outside AI Studio and Vertex: OpenRouter looks up
google/gemini-4-argonin the same Google list, so on OpenRouter Argon is now a known model. Its sampling controls are shown and sent, as for other Gemini models there. Marinara does not setrequire_parameters, so OpenRouter drops any parameter the model does not support.gemini-4-argonis now in the Google list, which Google Gemini (AI Studio) and Google Vertex AI share. It has a 1,000,000-token context (the repo's value for every 1M Gemini model) and a 65,536-token output limit. Google's window is 1,048,576 tokens and is shared by input, thinking and output. The prompt fitter already reserves the reply budget from the context value, so input plus reply stays under that limit.isGeminiThinkingLevelModel(inpackages/shared), replaces all four/gemini-3/checks. Those are three ingoogle.provider.tsand one in parameter relevance. Gemini 3 and every later generation getthinkingLevel, and later Gemini models need no code change for it. For Argon, Low, Medium and High send its own levels, and Extra high and Maximum sendhigh.thinkingBudgetandminimalare never sent.isGeminiArgonModel, so they cannot strip settings from Gemini 3:shouldSendParametercovers both request builders. Marinara never sendscandidateCountto any model (checked).CONTINUATION. That reason now maps tolength, likeMAX_TOKENS. Before, it passed through raw, so code that checks forlengthtreated a cut reply as finished. That code includes Advanced Memory, Game mode and the storyboard planner.docs/connections/providers-reference.mdnow says Argon runs only inglobal,usandeuand gives the global Base URL. It also says long Argon answers can need a higherCHAT_GENERATION_TIMEOUT_MS.Decisions
CONTINUATION. The reply is the same length with or without a cap. The real fault was that the cut was silent, and theCONTINUATION→lengthmapping fixes that for every request shape.globalwould move where the user's requests are processed, which can break an organisation's location policy. Marinara already passes Google's error through unchanged, asVertex AI Gemini API error <status>: …. The default Base URL in the docs and UI staysus-central1.cachedContents; implicit caching needs nothing), andgemini-4-argon-cyber-permissive(allowlist-only, so it is not in the list). On free-tier keys, Google's error passes through unchanged.Risks
Sources:
Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands the agent ran locally (no request was sent to Google or any provider; every request body was captured by a stubbed
fetchor a local stub server):pnpm check: passed (exit 0). It covers impeccable, localization, format, lint, e2e and token-estimation types, and build. The only lint output is an existing warning inHomeProfessorMariChat.tsx, which this PR does not touch.node ./scripts/run-regressions.mjs --filter <name>: passed for each ofprovider-compat,generation-parameter-relevance,agent-connection-parameters,connection-test-parameters,game-generation-parameters,game-tool-controls,game-mode-dice-tool,past-reasoning-history,provider-caching,codex-reasoning-effort,claude-opus55,claude-sonnet55,gpt-6-astra,mari-completion-frames,context-fit(2/2),agent-activation(2/2),spatial-contextandopen-issues.pnpm localization:checkran only insidepnpm check, where it passed.coderabbit review --agent --committed, baseorigin/staging): 1 finding, not adopted. It asked for a higher Argon-only default formaxOutputTokenswhen a caller sends nomaxTokens. Chats and agents always pass a resolved max tokens (the preset default is 4096), so the provider's?? 4096fallback rarely applies. The 32,768 figure it cites is not in the Google facts this PR was built from. Gemini 3 Pro at High already counts thinking against the same limit. Raising one model's default is a preset-policy decision, so it is listed under Risks instead.New regression proof:
provider-compat: exact request bodies forgemini-4-argonongoogleandgoogle_vertex. It covers a non-streaming chat at every effort (none, low, medium, high, xhigh, max), a streamed chat with a prefill, and a tools round, all with temperature, top-p, top-k and both penalties set. It also checks theCONTINUATION→lengthmapping.gemini-3.5-flashbodies are pinned byte for byte, and family-helper checks cover Gemini 2.x through 10. Run against the staging provider with this list entry, it fails on the first Argon body (penalties sent).generation-parameter-relevance: Argon is probed on bothgoogleand a newgoogle_vertexcase, and the panel must match the request. Argon's effort choices are Default (medium), low, medium and high, and Gemini 3 keeps its Off.Manual verification notes
Manual verification needed (not done by the agent; needs real keys):
gemini-4-argonon a Google Gemini connection. Send a Roleplay message with reasoning effort High and confirm the reply and the thinking appear.https://aiplatform.googleapis.com/v1/projects/<project>/locations/global, selectgemini-4-argonand send a message with effort High. Confirm the reply and thinking appear.us-central1, selectgemini-4-argonand send a message. Confirm Google's error is shown in the chat and nothing hangs.gemini-4-argonand confirm Google's error is shown.gemini-4-argonon both providers, confirm temperature, top-p, top-k and both penalties are hidden. Confirm reasoning effort shows Default, low, medium and high, and that hovering Default shows "Provider default: medium".gemini-3.5-flashand confirm temperature and the penalties are shown again and a reply still works.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs note:
docs/connections/providers-reference.mdgained two paragraphs in the Google Vertex AI section. #7535 lists exactly what the ten translated packs need.CHANGELOG.mdis untouched; this "What changed" section is the release-notes source.UI evidence (if applicable)
No component changes. The panel changes come from shared relevance rules: for Argon, the sampling and penalty controls are hidden and the effort Off button is labelled Default. Screenshots are still needed from manual verification.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.