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
tiny refactoring for reasoning effort field in GenAI LLM
Forhad Hosain5884755ca0ea
diff --git a/packages/app/src/builder-ui/components/GenAILLM.class.ts b/packages/app/src/builder-ui/components/GenAILLM.class.tsindex 5ed6cef0..394acf96 100644--- a/packages/app/src/builder-ui/components/GenAILLM.class.ts+++ b/packages/app/src/builder-ui/components/GenAILLM.class.ts@@ -346,6 +346,10 @@ export class GenAILLM extends Component {const defaultPromptValue = `Summarize {{Input}} in one paragraph.`;+ const reasoningEffortOptions = this.getReasoningEffortOptions(+ this.data.model || this.defaultModel,+ );+return {model: {type: 'select',@@ -833,11 +837,8 @@ export class GenAILLM extends Component {reasoningEffort: {type: 'select',label: 'Reasoning Effort',- value: this.getDefaultReasoningEffortForModel(- this.data.model || this.defaultModel,- this.getReasoningEffortOptions(this.data.model || this.defaultModel),- ),- options: this.getReasoningEffortOptions(this.data.model || this.defaultModel),+ value: this.getDefaultReasoningEffortForModel(reasoningEffortOptions),+ options: reasoningEffortOptions,help: 'Set how deeply the model reasons; higher is slower but more accurate.',tooltipClasses: 'w-56 ',arrowClasses: '-ml-11',@@ -1571,7 +1572,7 @@ export class GenAILLM extends Component {const valueToSet = isValidOption? existingValue- : this.getDefaultReasoningEffortForModel(model, options);+ : this.getDefaultReasoningEffortForModel(options);selectElem.val(valueToSet);}@@ -1580,10 +1581,7 @@ export class GenAILLM extends Component {* Get the appropriate default reasoning effort value for a given model* Always returns the first option as the default*/- private getDefaultReasoningEffortForModel(- model: string,- options: { text: string; value: string }[],- ): string {+ private getDefaultReasoningEffortForModel(options: { text: string; value: string }[]): string {if (options.length === 0) return '';// Always use the first available option as the default