Skip to content

Commit 0df161a

Browse files
committed
feat: update Gemini models with latest 09-2025 versions
- Add gemini-flash-latest and gemini-flash-lite-latest models - Add gemini-2.5-flash-preview-09-2025 and gemini-2.5-flash-lite-preview-09-2025 - Reorganize models list with most recent versions at the top - Maintain all existing models for backward compatibility Fixes #8485
1 parent 7ba8e33 commit 0df161a

File tree

1 file changed

+124
-53
lines changed

1 file changed

+124
-53
lines changed

packages/types/src/providers/gemini.ts

Lines changed: 124 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,73 @@ export type GeminiModelId = keyof typeof geminiModels
66
export const geminiDefaultModelId: GeminiModelId = "gemini-2.0-flash-001"
77

88
export const geminiModels = {
9-
"gemini-2.5-flash-preview-04-17:thinking": {
10-
maxTokens: 65_535,
9+
// Latest models (pointing to the most recent stable versions)
10+
"gemini-flash-latest": {
11+
maxTokens: 65_536,
1112
contextWindow: 1_048_576,
1213
supportsImages: true,
13-
supportsPromptCache: false,
14-
inputPrice: 0.15,
15-
outputPrice: 3.5,
14+
supportsPromptCache: true,
15+
inputPrice: 0.3,
16+
outputPrice: 2.5,
17+
cacheReadsPrice: 0.075,
18+
cacheWritesPrice: 1.0,
1619
maxThinkingTokens: 24_576,
1720
supportsReasoningBudget: true,
18-
requiredReasoningBudget: true,
1921
},
20-
"gemini-2.5-flash-preview-04-17": {
21-
maxTokens: 65_535,
22+
"gemini-flash-lite-latest": {
23+
maxTokens: 65_536,
2224
contextWindow: 1_048_576,
2325
supportsImages: true,
24-
supportsPromptCache: false,
25-
inputPrice: 0.15,
26-
outputPrice: 0.6,
26+
supportsPromptCache: true,
27+
inputPrice: 0.1,
28+
outputPrice: 0.4,
29+
cacheReadsPrice: 0.025,
30+
cacheWritesPrice: 1.0,
31+
supportsReasoningBudget: true,
32+
maxThinkingTokens: 24_576,
33+
},
34+
35+
// 2.5 Flash models (09-2025 versions - most recent)
36+
"gemini-2.5-flash-preview-09-2025": {
37+
maxTokens: 65_536,
38+
contextWindow: 1_048_576,
39+
supportsImages: true,
40+
supportsPromptCache: true,
41+
inputPrice: 0.3,
42+
outputPrice: 2.5,
43+
cacheReadsPrice: 0.075,
44+
cacheWritesPrice: 1.0,
45+
maxThinkingTokens: 24_576,
46+
supportsReasoningBudget: true,
2747
},
48+
"gemini-2.5-flash-lite-preview-09-2025": {
49+
maxTokens: 65_536,
50+
contextWindow: 1_048_576,
51+
supportsImages: true,
52+
supportsPromptCache: true,
53+
inputPrice: 0.1,
54+
outputPrice: 0.4,
55+
cacheReadsPrice: 0.025,
56+
cacheWritesPrice: 1.0,
57+
supportsReasoningBudget: true,
58+
maxThinkingTokens: 24_576,
59+
},
60+
61+
// 2.5 Flash models (06-17 version)
62+
"gemini-2.5-flash-lite-preview-06-17": {
63+
maxTokens: 64_000,
64+
contextWindow: 1_048_576,
65+
supportsImages: true,
66+
supportsPromptCache: true,
67+
inputPrice: 0.1,
68+
outputPrice: 0.4,
69+
cacheReadsPrice: 0.025,
70+
cacheWritesPrice: 1.0,
71+
supportsReasoningBudget: true,
72+
maxThinkingTokens: 24_576,
73+
},
74+
75+
// 2.5 Flash models (05-20 versions)
2876
"gemini-2.5-flash-preview-05-20:thinking": {
2977
maxTokens: 65_535,
3078
contextWindow: 1_048_576,
@@ -48,6 +96,29 @@ export const geminiModels = {
4896
cacheReadsPrice: 0.0375,
4997
cacheWritesPrice: 1.0,
5098
},
99+
100+
// 2.5 Flash models (04-17 versions)
101+
"gemini-2.5-flash-preview-04-17:thinking": {
102+
maxTokens: 65_535,
103+
contextWindow: 1_048_576,
104+
supportsImages: true,
105+
supportsPromptCache: false,
106+
inputPrice: 0.15,
107+
outputPrice: 3.5,
108+
maxThinkingTokens: 24_576,
109+
supportsReasoningBudget: true,
110+
requiredReasoningBudget: true,
111+
},
112+
"gemini-2.5-flash-preview-04-17": {
113+
maxTokens: 65_535,
114+
contextWindow: 1_048_576,
115+
supportsImages: true,
116+
supportsPromptCache: false,
117+
inputPrice: 0.15,
118+
outputPrice: 0.6,
119+
},
120+
121+
// 2.5 Flash stable
51122
"gemini-2.5-flash": {
52123
maxTokens: 64_000,
53124
contextWindow: 1_048_576,
@@ -60,15 +131,9 @@ export const geminiModels = {
60131
maxThinkingTokens: 24_576,
61132
supportsReasoningBudget: true,
62133
},
63-
"gemini-2.5-pro-exp-03-25": {
64-
maxTokens: 65_535,
65-
contextWindow: 1_048_576,
66-
supportsImages: true,
67-
supportsPromptCache: false,
68-
inputPrice: 0,
69-
outputPrice: 0,
70-
},
71-
"gemini-2.5-pro-preview-03-25": {
134+
135+
// 2.5 Pro models
136+
"gemini-2.5-pro-preview-06-05": {
72137
maxTokens: 65_535,
73138
contextWindow: 1_048_576,
74139
supportsImages: true,
@@ -77,6 +142,8 @@ export const geminiModels = {
77142
outputPrice: 15,
78143
cacheReadsPrice: 0.625,
79144
cacheWritesPrice: 4.5,
145+
maxThinkingTokens: 32_768,
146+
supportsReasoningBudget: true,
80147
tiers: [
81148
{
82149
contextWindow: 200_000,
@@ -116,7 +183,7 @@ export const geminiModels = {
116183
},
117184
],
118185
},
119-
"gemini-2.5-pro-preview-06-05": {
186+
"gemini-2.5-pro-preview-03-25": {
120187
maxTokens: 65_535,
121188
contextWindow: 1_048_576,
122189
supportsImages: true,
@@ -125,8 +192,6 @@ export const geminiModels = {
125192
outputPrice: 15,
126193
cacheReadsPrice: 0.625,
127194
cacheWritesPrice: 4.5,
128-
maxThinkingTokens: 32_768,
129-
supportsReasoningBudget: true,
130195
tiers: [
131196
{
132197
contextWindow: 200_000,
@@ -142,6 +207,14 @@ export const geminiModels = {
142207
},
143208
],
144209
},
210+
"gemini-2.5-pro-exp-03-25": {
211+
maxTokens: 65_535,
212+
contextWindow: 1_048_576,
213+
supportsImages: true,
214+
supportsPromptCache: false,
215+
inputPrice: 0,
216+
outputPrice: 0,
217+
},
145218
"gemini-2.5-pro": {
146219
maxTokens: 64_000,
147220
contextWindow: 1_048_576,
@@ -169,16 +242,8 @@ export const geminiModels = {
169242
},
170243
],
171244
},
172-
"gemini-2.0-flash-001": {
173-
maxTokens: 8192,
174-
contextWindow: 1_048_576,
175-
supportsImages: true,
176-
supportsPromptCache: true,
177-
inputPrice: 0.1,
178-
outputPrice: 0.4,
179-
cacheReadsPrice: 0.025,
180-
cacheWritesPrice: 1.0,
181-
},
245+
246+
// 2.0 Flash models
182247
"gemini-2.0-flash-lite-preview-02-05": {
183248
maxTokens: 8192,
184249
contextWindow: 1_048_576,
@@ -187,14 +252,6 @@ export const geminiModels = {
187252
inputPrice: 0,
188253
outputPrice: 0,
189254
},
190-
"gemini-2.0-pro-exp-02-05": {
191-
maxTokens: 8192,
192-
contextWindow: 2_097_152,
193-
supportsImages: true,
194-
supportsPromptCache: false,
195-
inputPrice: 0,
196-
outputPrice: 0,
197-
},
198255
"gemini-2.0-flash-thinking-exp-01-21": {
199256
maxTokens: 65_536,
200257
contextWindow: 1_048_576,
@@ -219,6 +276,28 @@ export const geminiModels = {
219276
inputPrice: 0,
220277
outputPrice: 0,
221278
},
279+
"gemini-2.0-flash-001": {
280+
maxTokens: 8192,
281+
contextWindow: 1_048_576,
282+
supportsImages: true,
283+
supportsPromptCache: true,
284+
inputPrice: 0.1,
285+
outputPrice: 0.4,
286+
cacheReadsPrice: 0.025,
287+
cacheWritesPrice: 1.0,
288+
},
289+
290+
// 2.0 Pro models
291+
"gemini-2.0-pro-exp-02-05": {
292+
maxTokens: 8192,
293+
contextWindow: 2_097_152,
294+
supportsImages: true,
295+
supportsPromptCache: false,
296+
inputPrice: 0,
297+
outputPrice: 0,
298+
},
299+
300+
// 1.5 Flash models
222301
"gemini-1.5-flash-002": {
223302
maxTokens: 8192,
224303
contextWindow: 1_048_576,
@@ -259,6 +338,8 @@ export const geminiModels = {
259338
inputPrice: 0,
260339
outputPrice: 0,
261340
},
341+
342+
// 1.5 Pro models
262343
"gemini-1.5-pro-002": {
263344
maxTokens: 8192,
264345
contextWindow: 2_097_152,
@@ -275,6 +356,8 @@ export const geminiModels = {
275356
inputPrice: 0,
276357
outputPrice: 0,
277358
},
359+
360+
// Experimental models
278361
"gemini-exp-1206": {
279362
maxTokens: 8192,
280363
contextWindow: 2_097_152,
@@ -283,16 +366,4 @@ export const geminiModels = {
283366
inputPrice: 0,
284367
outputPrice: 0,
285368
},
286-
"gemini-2.5-flash-lite-preview-06-17": {
287-
maxTokens: 64_000,
288-
contextWindow: 1_048_576,
289-
supportsImages: true,
290-
supportsPromptCache: true,
291-
inputPrice: 0.1,
292-
outputPrice: 0.4,
293-
cacheReadsPrice: 0.025,
294-
cacheWritesPrice: 1.0,
295-
supportsReasoningBudget: true,
296-
maxThinkingTokens: 24_576,
297-
},
298369
} as const satisfies Record<string, ModelInfo>

0 commit comments

Comments
 (0)