SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
hide models config properly for gpt 5, o4 and o3
Forhad Hosain34809b700f35
diff --git a/packages/app/src/builder-ui/components/GenAILLM.class.ts b/packages/app/src/builder-ui/components/GenAILLM.class.tsindex 769a34b1..699c6755 100644--- a/packages/app/src/builder-ui/components/GenAILLM.class.ts+++ b/packages/app/src/builder-ui/components/GenAILLM.class.ts@@ -32,6 +32,9 @@ export class GenAILLM extends Component {private groqReasoningModels: string[];private searchModels: string[];private gpt5ReasoningModels: string[];+ private gpt5Models: string[];+ private gptO3andO4Models: string[];+ private gptSearchModels: string[];protected async prepare() {const modelOptions = LLMFormController.prepareModelSelectOptionsByFeatures([@@ -62,6 +65,12 @@ export class GenAILLM extends Component {// Why getGpt5ReasoningModels instead of gptReasoningModels, some field like reasoning effort, verbosity etc only supported by gpt 5 models right now.this.gpt5ReasoningModels = LLMRegistry.getGpt5ReasoningModels();+ this.gpt5Models = LLMRegistry.getGpt5Models();+ this.gptO3andO4Models = LLMRegistry.getO3andO4Models();+ this.gptSearchModels = LLMRegistry.getModelsByFeatures('search', 'openai').map(+ (m) => m.entryId,+ );+modelOptions.unshift('Echo');const model = this.data.model || this.defaultModel;@@ -545,7 +554,12 @@ export class GenAILLM extends Component {attributes: {'data-supported-models':'OpenAI,Anthropic,GoogleAI,Groq,xAI,TogetherAI,VertexAI,Bedrock,Perplexity,cohere',- 'data-excluded-models': this.anthropicThinkingModels.join(','),+ 'data-excluded-models': [+ ...this.anthropicThinkingModels,+ ...this.gpt5Models,+ ...this.gptO3andO4Models,+ ...this.gptSearchModels,+ ].join(','),},section: 'Advanced',help: hint.temperature,@@ -579,6 +593,11 @@ export class GenAILLM extends Component {attributes: {'data-supported-models':'OpenAI,Anthropic,GoogleAI,Groq,TogetherAI,VertexAI,Bedrock,cohere',+ 'data-excluded-models': [+ ...this.gpt5Models,+ ...this.gptO3andO4Models,+ ...this.gptSearchModels,+ ].join(','),},section: 'Advanced',help: hint.stopSequences,@@ -600,8 +619,11 @@ export class GenAILLM extends Component {'data-supported-models':'OpenAI,Anthropic,GoogleAI,Groq,xAI,TogetherAI,VertexAI,Bedrock,Perplexity,cohere','data-excluded-models': [- ...this.anthropicThinkingModels,...this.openaiReasoningModels,+ ...this.gpt5Models,+ ...this.gptO3andO4Models,+ ...this.gptSearchModels,+ ...this.anthropicThinkingModels,...this.groqReasoningModels,].join(','),},@@ -637,7 +659,14 @@ export class GenAILLM extends Component {step: 0.01,validate: `min=0 max=${maxFrequencyPenalty}`,validateMessage: `Allowed range 0 to ${maxFrequencyPenalty}`,- attributes: { 'data-supported-models': 'OpenAI,TogetherAI,Perplexity,cohere' },+ attributes: {+ 'data-supported-models': 'OpenAI,TogetherAI,Perplexity,cohere',+ 'data-excluded-models': [+ ...this.gpt5Models,+ ...this.gptO3andO4Models,+ ...this.gptSearchModels,+ ].join(','),+ },section: 'Advanced',help: hint.frequencyPenalty,tooltipClasses: 'w-56 ',@@ -652,7 +681,14 @@ export class GenAILLM extends Component {step: 0.01,validate: `min=0 max=${maxPresencePenalty}`,validateMessage: `Allowed range 0 to ${maxPresencePenalty}`,- attributes: { 'data-supported-models': 'OpenAI,Perplexity,cohere' },+ attributes: {+ 'data-supported-models': 'OpenAI,Perplexity,cohere',+ 'data-excluded-models': [+ ...this.gpt5Models,+ ...this.gptO3andO4Models,+ ...this.gptSearchModels,+ ].join(','),+ },section: 'Advanced',help: hint.presencePenalty,tooltipClasses: 'w-56 ',@@ -668,7 +704,7 @@ export class GenAILLM extends Component {{ text: 'High', value: 'high' },],attributes: {- 'data-supported-models': this.gpt5ReasoningModels.join(','),+ 'data-supported-models': this.gpt5Models.join(','),},help: "Controls the verbosity of the model's response. Lower values result in more concise responses, while higher values result in more verbose responses. Currently supported by GPT-5 models.",tooltipClasses: 'w-56 ',diff --git a/packages/app/src/shared/services/LLMRegistry.service.ts b/packages/app/src/shared/services/LLMRegistry.service.tsindex f1a3ec11..be129ffe 100644--- a/packages/app/src/shared/services/LLMRegistry.service.ts+++ b/packages/app/src/shared/services/LLMRegistry.service.ts@@ -26,6 +26,7 @@ export class LLMRegistry {// Single source of truth for determining GPT5 models (verbosity + reasoning effort support)private static readonly GPT5_MODEL_PATTERN = /gpt-5/i;+ private static readonly O3_AND_O4_MODELS_PATTERN = /o3|o4/i;public static getModels(): Record<string, LLMModel> {const models = llmModelsStore.getState()?.models || {};@@ -243,4 +244,44 @@ export class LLMRegistry {models?.[modelId]?.features?.includes('reasoning'),);}++ /**+ * Get all GPT5 models based on model name pattern matching+ *+ * @returns Array of model IDs that match the GPT5 pattern (case-insensitive)+ */+ public static getGpt5Models(): string[] {+ const models = this.getModels();+ return Object.keys(models).filter((modelId) => this.isGpt5Models(modelId));+ }++ /**+ * Check if a model is a GPT5 model based on its name pattern+ *+ * @param modelId - The model ID to check+ * @returns True if the model ID matches the GPT5 pattern (case-insensitive), false otherwise+ */+ public static isGpt5Models(modelId: string): boolean {+ return Boolean(modelId && this.GPT5_MODEL_PATTERN.test(modelId));+ }++ /**+ * Get all O3 and O4 models based on model name pattern matching+ *+ * @returns Array of model IDs that match the O3 and O4 pattern (case-insensitive)+ */+ public static getO3andO4Models(): string[] {+ const models = this.getModels();+ return Object.keys(models).filter((modelId) => this.isO3andO4Models(modelId));+ }++ /**+ * Check if a model is an O3 or O4 model based on its name pattern+ *+ * @param modelId - The model ID to check+ * @returns True if the model ID matches the O3 or O4 pattern (case-insensitive), false otherwise+ */+ public static isO3andO4Models(modelId: string): boolean {+ return Boolean(modelId && this.O3_AND_O4_MODELS_PATTERN.test(modelId));+ }}