diff --git a/front_end/panels/ai_chat/LLM/OpenAIProvider.ts b/front_end/panels/ai_chat/LLM/OpenAIProvider.ts index ace7cfac2be..b8c30ad3239 100644 --- a/front_end/panels/ai_chat/LLM/OpenAIProvider.ts +++ b/front_end/panels/ai_chat/LLM/OpenAIProvider.ts @@ -54,6 +54,10 @@ export class OpenAIProvider extends LLMBaseProvider { if (modelName.startsWith('o')) { return ModelFamily.O; } + // GPT-5 models also don't support temperature parameter, treat them like O-series + if (modelName.includes('gpt-5')) { + return ModelFamily.O; // Treat GPT-5 like O-series for parameter compatibility + } // Otherwise, assume it's a GPT model (gpt-3.5-turbo, gpt-4, etc.) return ModelFamily.GPT; } @@ -470,6 +474,39 @@ export class OpenAIProvider extends LLMBaseProvider { vision: false, structured: true } + }, + { + id: 'gpt-5-2025-08-07', + name: 'GPT-5', + provider: 'openai', + capabilities: { + functionCalling: true, + reasoning: true, + vision: true, + structured: true + } + }, + { + id: 'gpt-5-mini-2025-08-07', + name: 'GPT-5 Mini', + provider: 'openai', + capabilities: { + functionCalling: true, + reasoning: true, + vision: true, + structured: true + } + }, + { + id: 'gpt-5-nano-2025-08-07', + name: 'GPT-5 Nano', + provider: 'openai', + capabilities: { + functionCalling: true, + reasoning: true, + vision: true, + structured: true + } } ]; } diff --git a/front_end/panels/ai_chat/core/Version.ts b/front_end/panels/ai_chat/core/Version.ts index fc354cd7101..d2bcc5f2142 100644 --- a/front_end/panels/ai_chat/core/Version.ts +++ b/front_end/panels/ai_chat/core/Version.ts @@ -3,7 +3,7 @@ // found in the LICENSE file. export const VERSION_INFO = { - version: '0.3.0', + version: '0.3.1', buildDate: '2025-08-07', channel: 'stable' } as const; diff --git a/front_end/panels/ai_chat/ui/AIChatPanel.ts b/front_end/panels/ai_chat/ui/AIChatPanel.ts index c5b76e3c2ab..97e412ae9f6 100644 --- a/front_end/panels/ai_chat/ui/AIChatPanel.ts +++ b/front_end/panels/ai_chat/ui/AIChatPanel.ts @@ -100,9 +100,13 @@ export interface ModelOption { // Add model options constant - these are the default OpenAI models const DEFAULT_OPENAI_MODELS: ModelOption[] = [ {value: 'o4-mini-2025-04-16', label: 'O4 Mini', type: 'openai'}, + {value: 'o3-mini-2025-01-31', label: 'O3 Mini', type: 'openai'}, + {value: 'gpt-5-2025-08-07', label: 'GPT-5', type: 'openai'}, + {value: 'gpt-5-mini-2025-08-07', label: 'GPT-5 Mini', type: 'openai'}, + {value: 'gpt-5-nano-2025-08-07', label: 'GPT-5 Nano', type: 'openai'}, + {value: 'gpt-4.1-2025-04-14', label: 'GPT-4.1', type: 'openai'}, {value: 'gpt-4.1-mini-2025-04-14', label: 'GPT-4.1 Mini', type: 'openai'}, {value: 'gpt-4.1-nano-2025-04-14', label: 'GPT-4.1 Nano', type: 'openai'}, - {value: 'gpt-4.1-2025-04-14', label: 'GPT-4.1', type: 'openai'}, ]; // Default model selections for each provider @@ -516,7 +520,8 @@ export class AIChatPanel extends UI.Panel.Panel { const existingOpenRouterModels = existingAllModels.filter((m: ModelOption) => m.type === 'openrouter'); // Update models based on what type of models we're adding - let updatedOpenAIModels = existingOpenAIModels.length > 0 ? existingOpenAIModels : DEFAULT_OPENAI_MODELS; + // Always use DEFAULT_OPENAI_MODELS for OpenAI to ensure we have the latest hardcoded list + let updatedOpenAIModels = DEFAULT_OPENAI_MODELS; let updatedLiteLLMModels = existingLiteLLMModels; let updatedGroqModels = existingGroqModels; let updatedOpenRouterModels = existingOpenRouterModels; @@ -651,6 +656,15 @@ export class AIChatPanel extends UI.Panel.Panel { return updatedOptions; } + /** + * Clears cached model data to force refresh from defaults + */ + static clearModelCache(): void { + localStorage.removeItem('ai_chat_all_model_options'); + localStorage.removeItem('ai_chat_model_options'); + logger.info('Cleared model cache - will use DEFAULT_OPENAI_MODELS on next refresh'); + } + /** * Removes a custom model from the options * @param modelName Name of the model to remove