Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 36 additions & 0 deletions src/shared/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,15 @@ export const vertexModels = {
inputPrice: 2.5,
outputPrice: 15,
},
"gemini-2.5-pro-preview-05-06": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
isPromptCacheOptional: true,
inputPrice: 2.5,
outputPrice: 15,
},
"gemini-2.5-pro-exp-03-25": {
maxTokens: 65_535,
contextWindow: 1_048_576,
Expand Down Expand Up @@ -703,6 +712,31 @@ export const geminiModels = {
},
],
},
"gemini-2.5-pro-preview-05-06": {
maxTokens: 65_535,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
isPromptCacheOptional: true,
inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
cacheWritesPrice: 4.5,
tiers: [
{
contextWindow: 200_000,
inputPrice: 1.25,
outputPrice: 10,
cacheReadsPrice: 0.31,
},
{
contextWindow: Infinity,
inputPrice: 2.5,
outputPrice: 15,
cacheReadsPrice: 0.625,
},
],
},
"gemini-2.0-flash-001": {
maxTokens: 8192,
contextWindow: 1_048_576,
Expand Down Expand Up @@ -1672,6 +1706,7 @@ export const PROMPT_CACHING_MODELS = new Set([
"anthropic/claude-3.7-sonnet:beta",
"anthropic/claude-3.7-sonnet:thinking",
"google/gemini-2.5-pro-preview-03-25",
"google/gemini-2.5-pro-preview-05-06",
"google/gemini-2.0-flash-001",
"google/gemini-flash-1.5",
"google/gemini-flash-1.5-8b",
Expand All @@ -1681,6 +1716,7 @@ export const PROMPT_CACHING_MODELS = new Set([
// in settings).
export const OPTIONAL_PROMPT_CACHING_MODELS = new Set([
"google/gemini-2.5-pro-preview-03-25",
"google/gemini-2.5-pro-preview-05-06",
"google/gemini-2.0-flash-001",
"google/gemini-flash-1.5",
"google/gemini-flash-1.5-8b",
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/settings/ModelInfoView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const ModelInfoView = ({
),
apiProvider === "gemini" && (
<span className="italic">
{selectedModelId === "gemini-2.5-pro-preview-03-25"
{(selectedModelId === "gemini-2.5-pro-preview-03-25" || selectedModelId === "gemini-2.5-pro-preview-05-06")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider extracting the hardcoded Gemini model IDs ('gemini-2.5-pro-preview-03-25' and 'gemini-2.5-pro-preview-05-06') into constants or a helper function. This will improve maintainability and reduce duplication, in line with our modular code standards.

This comment was generated because it violated the following rules: mrule_htmKIslKUiIk1Afo and mrule_fYE6mUdYYxZL58YF.

? t("settings:modelInfo.gemini.billingEstimate")
: t("settings:modelInfo.gemini.freeRequests", {
count: selectedModelId && selectedModelId.includes("flash") ? 15 : 2,
Expand Down
Loading