mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-05 07:40:19 +01:00
🤖 feat: gemini-3.1-flash-lite-preview Window & Pricing (#12043)
* 🤖 feat: `gemini-3.1-flash-lite-preview` Window & Pricing
- Updated `.env.example` to include `gemini-3.1-flash-lite-preview` in the list of available models.
- Enhanced `tx.js` to define token values for `gemini-3.1-flash-lite`.
- Adjusted `tokens.ts` to allocate input tokens for `gemini-3.1-flash-lite`.
- Modified `config.ts` to include `gemini-3.1-flash-lite-preview` in the default models list.
* chore: testing for `gemini-3.1-flash-lite` model, comments
- Updated `tx.js` to include cache token values for `gemini-3.1-flash-lite` with specific write and read rates.
- Enhanced `tx.spec.js` to include tests for the new `gemini-3.1-flash-lite-preview` model, ensuring correct rate retrieval for both prompt and completion token types.
This commit is contained in:
parent
3e487df193
commit
a2a09b556a
5 changed files with 26 additions and 3 deletions
|
|
@ -1347,6 +1347,7 @@ describe('Google Model Tests', () => {
|
|||
'gemini-3',
|
||||
'gemini-3.1-pro-preview',
|
||||
'gemini-3.1-pro-preview-customtools',
|
||||
'gemini-3.1-flash-lite-preview',
|
||||
'gemini-2.5-pro',
|
||||
'gemini-2.5-flash',
|
||||
'gemini-2.5-flash-lite',
|
||||
|
|
@ -1393,6 +1394,7 @@ describe('Google Model Tests', () => {
|
|||
'gemini-3': 'gemini-3',
|
||||
'gemini-3.1-pro-preview': 'gemini-3.1',
|
||||
'gemini-3.1-pro-preview-customtools': 'gemini-3.1',
|
||||
'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite',
|
||||
'gemini-2.5-pro': 'gemini-2.5-pro',
|
||||
'gemini-2.5-flash': 'gemini-2.5-flash',
|
||||
'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite',
|
||||
|
|
@ -1478,6 +1480,22 @@ describe('Google Model Tests', () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
it('should return correct rates for Gemini 3.1 Flash-Lite', () => {
|
||||
const model = 'gemini-3.1-flash-lite-preview';
|
||||
expect(getMultiplier({ model, tokenType: 'prompt', endpoint: EModelEndpoint.google })).toBe(
|
||||
tokenValues['gemini-3.1-flash-lite'].prompt,
|
||||
);
|
||||
expect(getMultiplier({ model, tokenType: 'completion', endpoint: EModelEndpoint.google })).toBe(
|
||||
tokenValues['gemini-3.1-flash-lite'].completion,
|
||||
);
|
||||
expect(getCacheMultiplier({ model, cacheType: 'write' })).toBe(
|
||||
cacheTokenValues['gemini-3.1-flash-lite'].write,
|
||||
);
|
||||
expect(getCacheMultiplier({ model, cacheType: 'read' })).toBe(
|
||||
cacheTokenValues['gemini-3.1-flash-lite'].read,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Gemini 3.1 Premium Token Pricing', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue