diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index fbd18ab6b3f..c6c33a3a7ac 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -37,6 +37,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -59,6 +60,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -99,6 +101,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -144,6 +147,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -165,6 +169,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined diff --git a/src/exports/types.ts b/src/exports/types.ts index 3a7a96998af..7728d27690a 100644 --- a/src/exports/types.ts +++ b/src/exports/types.ts @@ -38,6 +38,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -60,6 +61,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -100,6 +102,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -145,6 +148,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined @@ -166,6 +170,7 @@ type ProviderSettings = { outputPrice?: number | undefined cacheWritesPrice?: number | undefined cacheReadsPrice?: number | undefined + freeRequestsRpm?: number | undefined description?: string | undefined reasoningEffort?: ("low" | "medium" | "high") | undefined thinking?: boolean | undefined diff --git a/src/schemas/index.ts b/src/schemas/index.ts index a5c060e2d61..16d43010365 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -109,6 +109,7 @@ export const modelInfoSchema = z.object({ outputPrice: z.number().optional(), cacheWritesPrice: z.number().optional(), cacheReadsPrice: z.number().optional(), + freeRequestsRpm: z.number().optional(), description: z.string().optional(), reasoningEffort: z.enum(["low", "medium", "high"]).optional(), thinking: z.boolean().optional(), diff --git a/src/shared/api.ts b/src/shared/api.ts index 44f8f787eeb..ababd0c1e11 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -628,6 +628,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 5, }, "gemini-2.5-pro-preview-03-25": { maxTokens: 65_535, @@ -644,6 +645,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 15, }, "gemini-2.0-flash-lite-preview-02-05": { maxTokens: 8192, @@ -652,6 +654,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 30, }, "gemini-2.0-pro-exp-02-05": { maxTokens: 8192, @@ -660,6 +663,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 5, }, "gemini-2.0-flash-thinking-exp-01-21": { maxTokens: 65_536, @@ -668,6 +672,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 10, }, "gemini-2.0-flash-thinking-exp-1219": { maxTokens: 8192, @@ -676,6 +681,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 10, }, "gemini-2.0-flash-exp": { maxTokens: 8192, @@ -684,6 +690,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 10, }, "gemini-1.5-flash-002": { maxTokens: 8192, @@ -692,6 +699,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 15, }, "gemini-1.5-flash-exp-0827": { maxTokens: 8192, @@ -700,6 +708,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 15, }, "gemini-1.5-flash-8b-exp-0827": { maxTokens: 8192, @@ -708,6 +717,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 15, }, "gemini-1.5-pro-002": { maxTokens: 8192, @@ -716,6 +726,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 2, }, "gemini-1.5-pro-exp-0827": { maxTokens: 8192, @@ -724,6 +735,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 2, }, "gemini-exp-1206": { maxTokens: 8192, @@ -732,6 +744,7 @@ export const geminiModels = { supportsPromptCache: false, inputPrice: 0, outputPrice: 0, + freeRequestsRpm: 5, }, } as const satisfies Record diff --git a/webview-ui/src/components/settings/ModelInfoView.tsx b/webview-ui/src/components/settings/ModelInfoView.tsx index b692903a9b2..31746797652 100644 --- a/webview-ui/src/components/settings/ModelInfoView.tsx +++ b/webview-ui/src/components/settings/ModelInfoView.tsx @@ -77,12 +77,16 @@ export const ModelInfoView = ({ {selectedModelId === "gemini-2.5-pro-preview-03-25" ? t("settings:modelInfo.gemini.billingEstimate") - : t("settings:modelInfo.gemini.freeRequests", { - count: selectedModelId && selectedModelId.includes("flash") ? 15 : 2, - })}{" "} - - {t("settings:modelInfo.gemini.pricingDetails")} - + : modelInfo.freeRequestsRpm && modelInfo.freeRequestsRpm > 0 + ? t("settings:modelInfo.gemini.freeRequests", { + count: modelInfo.freeRequestsRpm, + }) + : null}{" "} + {(selectedModelId === "gemini-2.5-pro-preview-03-25" || (modelInfo.freeRequestsRpm && modelInfo.freeRequestsRpm > 0)) && ( + + {t("settings:modelInfo.gemini.pricingDetails")} + + )} ), ].filter(Boolean)