🤖 feat: Gemini 3.1 Pricing and Context Window (#11884)

- Added support for the new Gemini 3.1 models, including 'gemini-3.1-pro-preview' and 'gemini-3.1-pro-preview-customtools'.
- Updated pricing logic to apply standard and premium rates based on token usage thresholds for the new models.
- Enhanced tests to validate pricing behavior for both standard and premium scenarios.
- Modified configuration files to include Gemini 3.1 models in the default model lists and token value mappings.
- Updated environment example file to reflect the new model options.
This commit is contained in:
Danny Avila 2026-02-20 16:21:32 -05:00 committed by GitHub
parent a103ce72b4
commit 7a1d2969b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 450 additions and 2 deletions

View file

@ -279,6 +279,12 @@ describe('getModelMaxTokens', () => {
expect(getModelMaxTokens('gemini-3', EModelEndpoint.google)).toBe(
maxTokensMap[EModelEndpoint.google]['gemini-3'],
);
expect(getModelMaxTokens('gemini-3.1-pro-preview', EModelEndpoint.google)).toBe(
maxTokensMap[EModelEndpoint.google]['gemini-3.1'],
);
expect(getModelMaxTokens('gemini-3.1-pro-preview-customtools', EModelEndpoint.google)).toBe(
maxTokensMap[EModelEndpoint.google]['gemini-3.1'],
);
expect(getModelMaxTokens('gemini-2.5-pro', EModelEndpoint.google)).toBe(
maxTokensMap[EModelEndpoint.google]['gemini-2.5-pro'],
);