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
37 changes: 37 additions & 0 deletions front_end/panels/ai_chat/LLM/OpenAIProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
}
}
];
}
Expand Down
2 changes: 1 addition & 1 deletion front_end/panels/ai_chat/core/Version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 16 additions & 2 deletions front_end/panels/ai_chat/ui/AIChatPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down