From 912803ce71d989489660929744a4492da090d478 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Sun, 2 Nov 2025 23:33:42 +0000 Subject: [PATCH] feat: add performance warning for gpt5-codex model - Add performanceWarning field to ModelInfo type schema - Add warning message to gpt-5-codex model definition - Display warning in ApiOptions and ModelPicker components - Warning advises users to use standard GPT-5 models for better tool call performance Fixes #8983 --- packages/types/src/model.ts | 2 ++ packages/types/src/providers/openai.ts | 2 ++ webview-ui/src/components/settings/ApiOptions.tsx | 5 +++++ webview-ui/src/components/settings/ModelPicker.tsx | 3 +++ 4 files changed, 12 insertions(+) diff --git a/packages/types/src/model.ts b/packages/types/src/model.ts index 705f17039e..f7192dd796 100644 --- a/packages/types/src/model.ts +++ b/packages/types/src/model.ts @@ -80,6 +80,8 @@ export const modelInfoSchema = z.object({ cachableFields: z.array(z.string()).optional(), // Flag to indicate if the model is deprecated and should not be used deprecated: z.boolean().optional(), + // Performance warning message to display when this model is selected + performanceWarning: z.string().optional(), // Flag to indicate if the model is free (no cost) isFree: z.boolean().optional(), /** diff --git a/packages/types/src/providers/openai.ts b/packages/types/src/providers/openai.ts index a3eed1b57c..f06f2729b0 100644 --- a/packages/types/src/providers/openai.ts +++ b/packages/types/src/providers/openai.ts @@ -81,6 +81,8 @@ export const openAiNativeModels = { outputPrice: 10.0, cacheReadsPrice: 0.13, description: "GPT-5-Codex: A version of GPT-5 optimized for agentic coding in Codex", + performanceWarning: + "GPT-5-Codex performs poorly with Roo's tool call functionality. Consider using standard GPT-5 models instead for better performance.", supportsVerbosity: true, supportsTemperature: false, }, diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index e2e7ba5615..1deb8ff8d6 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -741,6 +741,11 @@ const ApiOptions = ({ )} + {/* Show performance warning if model has one */} + {selectedModelInfo?.performanceWarning && !selectedModelInfo.deprecated && ( + + )} + {selectedProvider === "bedrock" && selectedModelId === "custom-arn" && ( )} + {selectedModelInfo?.performanceWarning && !selectedModelInfo.deprecated && ( + + )} {selectedModelId && selectedModelInfo && !selectedModelInfo.deprecated && (