🤖 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

@ -106,6 +106,7 @@ const googleModels = {
'gemini-exp': 2000000,
'gemini-3': 1000000, // 1M input tokens, 64k output tokens
'gemini-3-pro-image': 1000000,
'gemini-3.1': 1000000, // 1M input tokens, 64k output tokens
'gemini-2.5': 1000000, // 1M input tokens, 64k output tokens
'gemini-2.5-pro': 1000000,
'gemini-2.5-flash': 1000000,