Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2816191
fix: creating a list of legacy Gemini models in both gemini.ts and ve…
HahaBill Jul 20, 2025
5f326c4
fix: progressive migration to new Gemini naming conventions on both f…
HahaBill Jul 20, 2025
6dab2cd
fix: gemini-1.5 and gemini-exp to be migrated to geminiDefaultModelId
HahaBill Jul 20, 2025
3122b41
fix: making changes based on the AI code reviewer
HahaBill Jul 20, 2025
642507e
fix: updating unit tests
HahaBill Jul 20, 2025
6c7f188
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Jul 21, 2025
c45802b
fix: adding more migration changes and unit tests
HahaBill Jul 24, 2025
136ff00
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Jul 24, 2025
43f10e3
fix: adding mapping on the frontend-side
HahaBill Jul 24, 2025
7f81d79
Merge branch 'i/update-gemini-and-vertex-models' of https://github.co…
HahaBill Jul 24, 2025
1a4a7a5
fix: updaing model id for existing unit tests and handling gemini-2.5…
HahaBill Jul 24, 2025
2f2df3f
fix: updating existing unit tests
HahaBill Jul 24, 2025
832d298
fix: updating the existing test to adapt to from
HahaBill Jul 25, 2025
a4f25a2
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Jul 27, 2025
9975e3e
Merge branch 'main' into i/update-gemini-and-vertex-models
HahaBill Jul 27, 2025
6530965
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Jul 31, 2025
9a1bc43
fix: remove duplicated function and tested the functionality in debug…
HahaBill Jul 31, 2025
ffb42ca
fix: preventing dirty state for Gemini naming convention migration
HahaBill Aug 1, 2025
fa7cd5d
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Aug 1, 2025
2d11ee3
fix: persistently storing new Gemini migrations
HahaBill Aug 1, 2025
f5c5590
Merge branch 'main' into i/update-gemini-and-vertex-models
HahaBill Aug 4, 2025
02874b5
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Aug 7, 2025
e053aad
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Aug 9, 2025
bf7a637
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Aug 12, 2025
07179ba
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Aug 19, 2025
432abe3
Merge branch 'RooCodeInc:main' into i/update-gemini-and-vertex-models
HahaBill Aug 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 82 additions & 79 deletions packages/types/src/providers/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,18 @@ export const geminiModels = {
maxThinkingTokens: 24_576,
supportsReasoningBudget: true,
},
"gemini-2.5-pro-exp-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.5-pro-preview-03-25": {
maxTokens: 65_535,
"gemini-2.5-pro": {
maxTokens: 64_000,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
requiredReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
Expand All @@ -92,7 +87,80 @@ export const geminiModels = {
},
],
},
"gemini-2.5-pro-preview-05-06": {
"gemini-2.0-flash-001": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
cacheWritesPrice: 1.0,
},
"gemini-2.0-flash-lite-preview-02-05": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-pro-exp-02-05": {
maxTokens: 8192,
contextWindow: 2_097_152,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-flash-thinking-exp-01-21": {
maxTokens: 65_536,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-flash-thinking-exp-1219": {
maxTokens: 8192,
contextWindow: 32_767,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-flash-exp": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.5-flash-lite-preview-06-17": {
maxTokens: 64_000,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
cacheWritesPrice: 1.0,
supportsReasoningBudget: true,
maxThinkingTokens: 24_576,
},
} as const satisfies Record<string, ModelInfo>

export const legacyGeminiModels = {
"gemini-2.5-pro-exp-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.5-pro-preview-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
Expand All @@ -116,7 +184,7 @@ export const geminiModels = {
},
],
},
"gemini-2.5-pro-preview-06-05": {
"gemini-2.5-pro-preview-05-06": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
Expand All @@ -125,8 +193,6 @@ export const geminiModels = {
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
Expand All @@ -142,8 +208,8 @@ export const geminiModels = {
},
],
},
"gemini-2.5-pro": {
maxTokens: 64_000,
"gemini-2.5-pro-preview-06-05": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
Expand All @@ -153,7 +219,6 @@ export const geminiModels = {
cacheWritesPrice: 4.5,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
requiredReasoningBudget: true,
tiers: [
{
contextWindow: 200_000,
Expand All @@ -169,56 +234,6 @@ export const geminiModels = {
},
],
},
"gemini-2.0-flash-001": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
cacheWritesPrice: 1.0,
},
"gemini-2.0-flash-lite-preview-02-05": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-pro-exp-02-05": {
maxTokens: 8192,
contextWindow: 2_097_152,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-flash-thinking-exp-01-21": {
maxTokens: 65_536,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-flash-thinking-exp-1219": {
maxTokens: 8192,
contextWindow: 32_767,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-flash-exp": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-1.5-flash-002": {
maxTokens: 8192,
contextWindow: 1_048_576,
Expand Down Expand Up @@ -283,16 +298,4 @@ export const geminiModels = {
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.5-flash-lite-preview-06-17": {
maxTokens: 64_000,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
cacheWritesPrice: 1.0,
supportsReasoningBudget: true,
maxThinkingTokens: 24_576,
},
} as const satisfies Record<string, ModelInfo>
103 changes: 53 additions & 50 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,6 @@ export const vertexModels = {
inputPrice: 0.15,
outputPrice: 0.6,
},
"gemini-2.5-pro-preview-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
},
"gemini-2.5-pro-preview-05-06": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
},
"gemini-2.5-pro-preview-06-05": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
},
"gemini-2.5-pro": {
maxTokens: 64_000,
contextWindow: 1_048_576,
Expand All @@ -107,14 +81,6 @@ export const vertexModels = {
},
],
},
"gemini-2.5-pro-exp-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.0-pro-exp-02-05": {
maxTokens: 8192,
contextWindow: 2_097_152,
Expand Down Expand Up @@ -147,22 +113,6 @@ export const vertexModels = {
inputPrice: 0,
outputPrice: 0,
},
"gemini-1.5-flash-002": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.075,
outputPrice: 0.3,
},
"gemini-1.5-pro-002": {
maxTokens: 8192,
contextWindow: 2_097_152,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 1.25,
outputPrice: 5,
},
"claude-sonnet-4@20250514": {
maxTokens: 8192,
contextWindow: 200_000,
Expand Down Expand Up @@ -309,3 +259,56 @@ export const VERTEX_REGIONS = [
{ value: "me-central1", label: "me-central1" },
{ value: "africa-south1", label: "africa-south1" },
]

export const legacyVertexModels = {
"gemini-1.5-flash-002": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.075,
outputPrice: 0.3,
},
"gemini-1.5-pro-002": {
maxTokens: 8192,
contextWindow: 2_097_152,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 1.25,
outputPrice: 5,
},
"gemini-2.5-pro-exp-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
"gemini-2.5-pro-preview-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
},
"gemini-2.5-pro-preview-05-06": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
},
"gemini-2.5-pro-preview-06-05": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 2.5,
outputPrice: 15,
maxThinkingTokens: 32_768,
supportsReasoningBudget: true,
},
} as const satisfies Record<string, ModelInfo>
Loading
Loading