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
33 changes: 11 additions & 22 deletions packages/types/src/providers/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export const geminiModels = {
supportsPromptCache: true,
supportsReasoningEffort: ["low", "high"],
reasoningEffort: "low",
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

supportsTemperature: true,
defaultTemperature: 1,
inputPrice: 4.0,
Expand All @@ -43,8 +42,7 @@ export const geminiModels = {
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
reasoningEffort: "medium",
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

supportsTemperature: true,
defaultTemperature: 1,
inputPrice: 0.3,
Expand All @@ -60,8 +58,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand Down Expand Up @@ -91,8 +88,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand Down Expand Up @@ -121,8 +117,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand All @@ -149,8 +144,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 2.5, // This is the pricing for prompts above 200k tokens.
outputPrice: 15,
cacheReadsPrice: 0.625,
Expand Down Expand Up @@ -181,8 +175,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -197,8 +190,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -213,8 +205,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -231,8 +222,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
Expand All @@ -247,8 +237,7 @@ export const geminiModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
// includedTools: ["write_file", "edit_file"],
// excludedTools: ["apply_diff"],

inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
Expand Down
57 changes: 19 additions & 38 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export const vertexModels = {
supportsPromptCache: true,
supportsReasoningEffort: ["low", "high"],
reasoningEffort: "low",
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

supportsTemperature: true,
defaultTemperature: 1,
inputPrice: 4.0,
Expand All @@ -43,8 +42,7 @@ export const vertexModels = {
supportsPromptCache: true,
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
reasoningEffort: "medium",
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

supportsTemperature: true,
defaultTemperature: 1,
inputPrice: 0.3,
Expand All @@ -59,8 +57,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.15,
outputPrice: 3.5,
maxThinkingTokens: 24_576,
Expand All @@ -74,8 +71,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.15,
outputPrice: 0.6,
},
Expand All @@ -86,8 +82,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.075,
Expand All @@ -102,8 +97,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.15,
outputPrice: 3.5,
maxThinkingTokens: 24_576,
Expand All @@ -117,8 +111,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.15,
outputPrice: 0.6,
},
Expand All @@ -129,8 +122,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 2.5,
outputPrice: 15,
},
Expand All @@ -141,8 +133,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 2.5,
outputPrice: 15,
},
Expand All @@ -153,8 +144,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 2.5,
outputPrice: 15,
maxThinkingTokens: 32_768,
Expand All @@ -167,8 +157,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 2.5,
outputPrice: 15,
maxThinkingTokens: 32_768,
Expand Down Expand Up @@ -196,8 +185,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0,
outputPrice: 0,
},
Expand All @@ -208,8 +196,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0,
outputPrice: 0,
},
Expand All @@ -220,8 +207,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.15,
outputPrice: 0.6,
},
Expand All @@ -232,8 +218,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.075,
outputPrice: 0.3,
},
Expand All @@ -244,8 +229,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0,
outputPrice: 0,
},
Expand All @@ -256,8 +240,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.075,
outputPrice: 0.3,
},
Expand All @@ -268,8 +251,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: false,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 1.25,
outputPrice: 5,
},
Expand Down Expand Up @@ -463,8 +445,7 @@ export const vertexModels = {
supportsNativeTools: true,
defaultToolProtocol: "native",
supportsPromptCache: true,
includedTools: ["write_file", "edit_file"],
excludedTools: ["apply_diff"],

inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
Expand Down
11 changes: 0 additions & 11 deletions src/api/providers/utils/router-tool-preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type { ModelInfo } from "@roo-code/types"
*
* Different model families perform better with specific tools:
* - OpenAI models: Better results with apply_patch instead of apply_diff/write_to_file
* - Gemini models: Higher quality results with write_file and edit_file
*
* This function modifies the model info to apply these preferences consistently
* across all dynamic router providers.
Expand All @@ -27,15 +26,5 @@ export function applyRouterToolPreferences(modelId: string, info: ModelInfo): Mo
}
}

// For Gemini models via routers, include write_file and edit_file
// This matches the behavior of the native Gemini provider
if (modelId.includes("gemini")) {
result = {
...result,
excludedTools: [...new Set([...(result.excludedTools || []), "apply_diff"])],
includedTools: [...new Set([...(result.includedTools || []), "write_file", "edit_file"])],
}
}

return result
}
Loading