Skip to content

feat: Add Gemini 3 models and remove deprecated legacy models#11583

Open
KarthiDreamr wants to merge 4 commits intodanny-avila:devfrom
KarthiDreamr:feat/gemini3
Open

feat: Add Gemini 3 models and remove deprecated legacy models#11583
KarthiDreamr wants to merge 4 commits intodanny-avila:devfrom
KarthiDreamr:feat/gemini3

Conversation

@KarthiDreamr
Copy link
Contributor

@KarthiDreamr KarthiDreamr commented Jan 31, 2026

This PR adds support for the new Gemini 3 models and cleans up deprecated legacy Gemini models (1.5, 1.0, pro-vision).

Model Values Source

https://ai.google.dev/gemini-api/docs/pricing
https://ai.google.dev/gemini-api/docs/models#gemini-3-pro-image-preview

Changes

New Models Added

  • gemini-3-flash-preview
  • gemini-3-pro-preview
  • gemini-3-pro-image-preview

Deprecated Models Removed

  • gemini-1.5 family (flash, flash-8b, pro, etc.)
  • gemini-1.0 / gemini-pro
  • gemini-pro-vision

Configuration Updates

  • Updated defaultModels in config to include Gemini 3.
  • Updated googleModels token limits in tokens.ts.
  • Updated pricing in tx.js.
  • Updated .env.example.
  • Updated tests to use gemini-2.5 models instead of deprecated gemini-1.5/gemini-pro.

- Add Moonshot provider to BedrockProviders enum
- Add Moonshot-specific parameter settings with 16384 default max tokens
- Add conditional for anthropic_beta to only apply to Anthropic models
- Kimi K2 Thinking model: moonshot.kimi-k2-thinking (256K context)
Adds Gemini 3 flash/pro/image preview models, updates configuration and pricing, and removes deprecated Gemini 1.5/1.0/Vision models and updates tests.
@KarthiDreamr KarthiDreamr changed the base branch from main to dev January 31, 2026 13:09
@KarthiDreamr
Copy link
Contributor Author

KarthiDreamr commented Jan 31, 2026

Test code might need slight tweak as 1.x models are removed, thanks

Summary of all failing tests
FAIL src/endpoints/google/llm.spec.ts
● getSafetySettings › should map OFF to BLOCK_NONE for Gemini 1.x models

expect(received).toContainEqual(expected) // deep equality

Expected value: {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE"}
Received array: [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "OFF"}, {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "HARM_BLOCK_THRESHOLD_UNSPECIFIED"}, {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "HARM_BLOCK_THRESHOLD_UNSPECIFIED"}, {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "HARM_BLOCK_THRESHOLD_UNSPECIFIED"}, {"category": "HARM_CATEGORY_CIVIC_INTEGRITY", "threshold": "BLOCK_NONE"}]

  743 |     const settings = getSafetySettings('gemini-2.5-flash');
  744 |
> 745 |     expect(settings).toContainEqual({
      |                      ^
  746 |       category: 'HARM_CATEGORY_SEXUALLY_EXPLICIT',
  747 |       threshold: 'BLOCK_NONE',
  748 |     });

  at Object.toContainEqual (src/endpoints/google/llm.spec.ts:745:22)

Test Suites: 1 failed, 78 passed, 79 total
Tests: 1 failed, 1 skipped, 2053 passed, 2055 total
Snapshots: 0 total
Time: 101.748 s
Ran all test suites.
npm error Lifecycle script test:ci failed with error:
npm error code 1
npm error path /home/runner/work/LibreChat/LibreChat/packages/api
npm error workspace @librechat/api@1.7.22
npm error location /home/runner/work/LibreChat/LibreChat/packages/api
npm error command failed
npm error command sh -c jest --coverage --ci --testPathIgnorePatterns=".*integration.|.*helper."
Error: Process completed with exit code 1.

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