Skip to content

Commit a6f062e

Browse files
authored
🚀 feat: Add Gemini 2.5 Token/Context Values, Increase Max Possible Output to 64k (#6563)
* feat: Add Gemini 2.5 token values, increase max output param, context window * 🔧 fix: Update Gemini API model names in .env.example * 🔧 fix: Add button type attribute to AttachFile component
1 parent 7ca5650 commit a6f062e

File tree

7 files changed

+7
-4
lines changed

7 files changed

+7
-4
lines changed

‎.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ GOOGLE_KEY=user_provided
142142
# GOOGLE_AUTH_HEADER=true
143143

144144
# Gemini API (AI Studio)
145-
# GOOGLE_MODELS=gemini-2.0-flash-exp,gemini-2.0-flash-thinking-exp-1219,gemini-exp-1121,gemini-exp-1114,gemini-1.5-flash-latest,gemini-1.0-pro,gemini-1.0-pro-001,gemini-1.0-pro-latest,gemini-1.0-pro-vision-latest,gemini-1.5-pro-latest,gemini-pro,gemini-pro-vision
145+
# GOOGLE_MODELS=gemini-2.5-pro-exp-03-25,gemini-2.0-flash-exp,gemini-2.0-flash-thinking-exp-1219,gemini-exp-1121,gemini-exp-1114,gemini-1.5-flash-latest,gemini-1.0-pro,gemini-1.0-pro-001,gemini-1.0-pro-latest,gemini-1.0-pro-vision-latest,gemini-1.5-pro-latest,gemini-pro,gemini-pro-vision
146146

147147
# Vertex AI
148148
# GOOGLE_MODELS=gemini-1.5-flash-preview-0514,gemini-1.5-pro-preview-0514,gemini-1.0-pro-vision-001,gemini-1.0-pro-002,gemini-1.0-pro-001,gemini-pro-vision,gemini-1.0-pro

‎api/models/tx.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ const tokenValues = Object.assign(
109109
'gemini-2.0-flash-lite': { prompt: 0.075, completion: 0.3 },
110110
'gemini-2.0-flash': { prompt: 0.1, completion: 0.7 },
111111
'gemini-2.0': { prompt: 0, completion: 0 }, // https://ai.google.dev/pricing
112+
'gemini-2.5': { prompt: 0, completion: 0 }, // Free for a period of time
112113
'gemini-1.5-flash-8b': { prompt: 0.075, completion: 0.3 },
113114
'gemini-1.5-flash': { prompt: 0.15, completion: 0.6 },
114115
'gemini-1.5': { prompt: 2.5, completion: 10 },

‎api/utils/tokens.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const googleModels = {
5858
gemini: 30720, // -2048 from max
5959
'gemini-pro-vision': 12288,
6060
'gemini-exp': 2000000,
61+
'gemini-2.5': 1000000, // 1M input tokens, 64k output tokens
6162
'gemini-2.0': 2000000,
6263
'gemini-2.0-flash': 1000000,
6364
'gemini-2.0-flash-lite': 1000000,

‎client/src/components/Chat/Input/Files/AttachFile.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const AttachFile = ({ disabled }: { disabled?: boolean | null }) => {
1818
disabled={isUploadDisabled}
1919
render={
2020
<button
21+
type="button"
2122
aria-label={localize('com_sidepanel_attach_files')}
2223
disabled={isUploadDisabled}
2324
className={cn(

‎package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/data-provider/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "librechat-data-provider",
3-
"version": "0.7.75",
3+
"version": "0.7.76",
44
"description": "data services for librechat apps",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",

‎packages/data-provider/src/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export const googleSettings = {
230230
},
231231
maxOutputTokens: {
232232
min: 1 as const,
233-
max: 8192 as const,
233+
max: 64000 as const,
234234
step: 1 as const,
235235
default: 8192 as const,
236236
},

0 commit comments

Comments
 (0)