@@ -100,9 +100,13 @@ export interface ModelOption {
100100// Add model options constant - these are the default OpenAI models
101101const DEFAULT_OPENAI_MODELS : ModelOption [ ] = [
102102 { value : 'o4-mini-2025-04-16' , label : 'O4 Mini' , type : 'openai' } ,
103+ { value : 'o3-mini-2025-01-31' , label : 'O3 Mini' , type : 'openai' } ,
104+ { value : 'gpt-5-2025-08-07' , label : 'GPT-5' , type : 'openai' } ,
105+ { value : 'gpt-5-mini-2025-08-07' , label : 'GPT-5 Mini' , type : 'openai' } ,
106+ { value : 'gpt-5-nano-2025-08-07' , label : 'GPT-5 Nano' , type : 'openai' } ,
107+ { value : 'gpt-4.1-2025-04-14' , label : 'GPT-4.1' , type : 'openai' } ,
103108 { value : 'gpt-4.1-mini-2025-04-14' , label : 'GPT-4.1 Mini' , type : 'openai' } ,
104109 { value : 'gpt-4.1-nano-2025-04-14' , label : 'GPT-4.1 Nano' , type : 'openai' } ,
105- { value : 'gpt-4.1-2025-04-14' , label : 'GPT-4.1' , type : 'openai' } ,
106110] ;
107111
108112// Default model selections for each provider
@@ -516,7 +520,8 @@ export class AIChatPanel extends UI.Panel.Panel {
516520 const existingOpenRouterModels = existingAllModels . filter ( ( m : ModelOption ) => m . type === 'openrouter' ) ;
517521
518522 // Update models based on what type of models we're adding
519- let updatedOpenAIModels = existingOpenAIModels . length > 0 ? existingOpenAIModels : DEFAULT_OPENAI_MODELS ;
523+ // Always use DEFAULT_OPENAI_MODELS for OpenAI to ensure we have the latest hardcoded list
524+ let updatedOpenAIModels = DEFAULT_OPENAI_MODELS ;
520525 let updatedLiteLLMModels = existingLiteLLMModels ;
521526 let updatedGroqModels = existingGroqModels ;
522527 let updatedOpenRouterModels = existingOpenRouterModels ;
@@ -651,6 +656,15 @@ export class AIChatPanel extends UI.Panel.Panel {
651656 return updatedOptions ;
652657 }
653658
659+ /**
660+ * Clears cached model data to force refresh from defaults
661+ */
662+ static clearModelCache ( ) : void {
663+ localStorage . removeItem ( 'ai_chat_all_model_options' ) ;
664+ localStorage . removeItem ( 'ai_chat_model_options' ) ;
665+ logger . info ( 'Cleared model cache - will use DEFAULT_OPENAI_MODELS on next refresh' ) ;
666+ }
667+
654668 /**
655669 * Removes a custom model from the options
656670 * @param modelName Name of the model to remove
0 commit comments