⚡ feat: Add Gemini 3.5 Flash Support#13231
Conversation
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Adds first-class support for the gemini-3.5-flash model across LibreChat’s Google/Vertex integration, including token limits, request shaping (thinking defaults + legacy param removal), and pricing.
Changes:
- Registers
gemini-3.5-flashin default Google model lists and token-limit metadata (1,048,576 context; Google max output up to 65,536). - Applies Gemini 3.5 Flash–specific request overrides: default
thinkingLevel=MEDIUM(when thinking enabled) and strips legacy sampling/thinking-budget params. - Extends token + cache pricing tables and adds targeted regression tests for pricing, model matching, and config shaping.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/data-schemas/src/methods/tx.ts | Adds Gemini 3.5 Flash token + cache pricing entries. |
| packages/data-schemas/src/methods/tx.spec.ts | Verifies Gemini 3.5 Flash pricing and model-key mapping behavior. |
| packages/data-provider/src/schemas.ts | Raises Google maxOutputTokens.max to 65,536 for UI/validation alignment. |
| packages/data-provider/src/config.ts | Adds gemini-3.5-flash to default Google model list. |
| packages/api/src/utils/tokens.ts | Adds max-context token metadata for Gemini 3.5 Flash (1,048,576). |
| packages/api/src/endpoints/google/llm.ts | Implements Gemini 3.5 Flash overrides (default thinking level + legacy param stripping). |
| packages/api/src/endpoints/google/llm.spec.ts | Adds tests for default/preserved thinking level and legacy param removal. |
| api/utils/tokens.spec.js | Adds max-token lookup assertion for gemini-3.5-flash. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 875556dc35
ℹ️ 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".
GitNexus: 🚀 deployedThe |
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2dee4c2fdd
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
GitNexus: 🚀 deployedThe |
* feat: add Gemini 3.5 Flash support * fix: refine Gemini 3.5 Flash overrides * fix: satisfy Gemini thinking config types * fix: drop empty Gemini thinking config
Range: 8310e9a..190cdee Highlights: - Security: MCP OAuth hardening (danny-avila#13264, danny-avila#13274, danny-avila#13276, danny-avila#13254, danny-avila#13256), SSRF guards, system tenant rejection (danny-avila#13278), data retention semantics (danny-avila#13049) - LLM: Gemini 3.5 Flash (danny-avila#13231), Gemini Tool Combinations (danny-avila#13273), AWS Bedrock API key support (danny-avila#8690) [pending removal in stage-1] - Streaming/UI: cache preservation, race fixes, optimistic sidebar (danny-avila#13298) - Observability: Prometheus metrics (danny-avila#13265), OTel SSE tracing (danny-avila#13266), build metadata (danny-avila#12756) - Infra: graceful shutdown (danny-avila#13211), readiness endpoints (danny-avila#13212), Redis cluster safe delete (danny-avila#13275) - CI/format: prettier --write all workspaces (danny-avila#13281), ESLint enforcement (danny-avila#13280) - Deps: @librechat/agents -> v3.1.96
Summary
I added native Google/Vertex support for Gemini 3.5 Flash and wired its model metadata, request defaults, and pricing behavior.
gemini-3.5-flashto the default Google model list.MEDIUMthinking level while preserving explicit thinking levels.Closes #13199
Change Type
Testing
npm run build:data-providernpm run build:data-schemasnpm run build:apicd packages/api && npx jest src/endpoints/google/llm.spec.ts --runInBand --coverage=falsecd packages/data-schemas && npx jest src/methods/tx.spec.ts --runInBand --coverage=falsecd api && npx jest utils/tokens.spec.js --runInBand --coverage=falsenpx prettier --check packages/api/src/endpoints/google/llm.ts packages/api/src/endpoints/google/llm.spec.ts packages/api/src/utils/tokens.ts api/utils/tokens.spec.js packages/data-provider/src/config.ts packages/data-provider/src/schemas.ts packages/data-schemas/src/methods/tx.ts packages/data-schemas/src/methods/tx.spec.tsTest Configuration:
Checklist