Skip to content

🔭 feat: Support Gemini 4 Argon Input and History Rules - #620

Merged
berry-13 merged 2 commits into
mainfrom
berry-13/feat-gemini-4-argon
Oct 17, 2026
Merged

berry-13 merged 2 commits into
mainfrom
berry-13/feat-gemini-4-argon

Conversation

@berry-13

Copy link
Copy Markdown
Collaborator

Summary

Gemini 4 Argon (gemini-4-argon, GA 2026-10-13) hits two predicates in the Google GenAI client that only knew earlier models. _isMultimodalModel matched Gemini 1.5, 2 and 3 only, so an image or PDF attached to an Argon turn was rejected locally with "This model does not support images", although Argon accepts image, audio, video and PDF input. And Argon histories cannot end in a model turn, but rejectsModelTurnPrefill covered only Flash 3.6+ and 3.5 Flash-Lite, so a resubmitted assistant turn reached Google and failed with HTTP 400.

The multimodal check now matches Gemini 3 and any later major version, and gemini-4-argon (with prefixed ids and the cyber-permissive variant) joins the no-prefill list. Needed by LibreChat-AI/LibreChat#17200, which adds first-class Argon support.

Change Type

  • Feature

Testing

  • npx jest src/llm/google/utils/common.test.ts src/llm/google/multimodal.test.ts: 18 passed; with the source change reverted, the two new Argon tests fail
  • npx jest src/llm/google (offline suites, excluding the live llm.spec.ts): 31 passed
  • npx tsc --noEmit and ESLint on the touched files: clean

Checklist

  • I reviewed my own changes
  • Tests added for the new behavior
  • Existing Google tests pass

Gemini 4 Argon accepts image, audio, video and PDF input, but the
multimodal check only recognized Gemini 1.5, 2 and 3, so the content
converter rejected attachments with "This model does not support
images". The check now matches Gemini 3 and any later major version.

Argon histories cannot end in a model turn, so gemini-4-argon (and its
variants) joins the no-prefill list and a trailing model turn is dropped
before the request, as it already is for Flash 3.6+.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T12:10:08.352408Z 9d3b26b New commits
🔒 Security Review ✅ Completed 2026-10-17T09:52:17.029794Z aa47f08 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa47f08f9c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/llm/google/index.ts Outdated
@berry-13
berry-13 merged commit e536bdf into main Oct 17, 2026
13 checks passed
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.

1 participant