Skip to content

Commit 1fa71fb

Browse files
committed
fix: remove non-existent gemini-25-pro model check
- Remove gemini-25-pro check from model-params.ts - Remove gemini-25-pro check from ThinkingBudget.tsx - Remove test case for gemini-25-pro alternative naming The gemini-25-pro model identifier does not exist. Only gemini-2.5-pro is valid.
1 parent 2c6ccd0 commit 1fa71fb

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

src/api/transform/model-params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export function getModelParams({
9292

9393
if (shouldUseReasoningBudget({ model, settings })) {
9494
// Check if this is a Gemini 2.5 Pro model
95-
const isGemini25Pro = modelId.includes("gemini-2.5-pro") || modelId.includes("gemini-25-pro")
95+
const isGemini25Pro = modelId.includes("gemini-2.5-pro")
9696

9797
// If `customMaxThinkingTokens` is not specified use the default.
9898
// For Gemini 2.5 Pro, default to 128 instead of 8192

webview-ui/src/components/settings/ThinkingBudget.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export const ThinkingBudget = ({ apiConfiguration, setApiConfigurationField, mod
2424
const { id: selectedModelId } = useSelectedModel(apiConfiguration)
2525

2626
// Check if this is a Gemini 2.5 Pro model
27-
const isGemini25Pro =
28-
selectedModelId && (selectedModelId.includes("gemini-2.5-pro") || selectedModelId.includes("gemini-25-pro"))
27+
const isGemini25Pro = selectedModelId && selectedModelId.includes("gemini-2.5-pro")
2928
const minThinkingTokens = isGemini25Pro ? GEMINI_25_PRO_MIN_THINKING_TOKENS : 1024
3029

3130
const isReasoningBudgetSupported = !!modelInfo && modelInfo.supportsReasoningBudget

webview-ui/src/components/settings/__tests__/ThinkingBudget.spec.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,6 @@ describe("ThinkingBudget", () => {
146146
expect(sliders[1].getAttribute("min")).toBe("128")
147147
})
148148

149-
it("should use min thinking tokens of 128 for Gemini 25 Pro models (alternative naming)", () => {
150-
render(
151-
<ThinkingBudget
152-
{...defaultProps}
153-
apiConfiguration={{
154-
modelMaxTokens: 10000,
155-
apiProvider: "gemini",
156-
apiModelId: "gemini-25-pro-latest",
157-
}}
158-
/>,
159-
)
160-
161-
const sliders = screen.getAllByTestId("slider")
162-
expect(sliders[1].getAttribute("min")).toBe("128")
163-
})
164-
165149
it("should use step of 128 for Gemini 2.5 Pro models", () => {
166150
render(
167151
<ThinkingBudget

0 commit comments

Comments
 (0)