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
add verbosity field for GPT 5 model
Forhad Hosain411c9314faa6
diff --git a/packages/app/src/builder-ui/components/GenAILLM.class.ts b/packages/app/src/builder-ui/components/GenAILLM.class.tsindex 047444d8..187ef669 100644--- a/packages/app/src/builder-ui/components/GenAILLM.class.ts+++ b/packages/app/src/builder-ui/components/GenAILLM.class.ts@@ -30,6 +30,7 @@ export class GenAILLM extends Component {private openaiReasoningModels: string[];private groqReasoningModels: string[];private searchModels: string[];+ private verbositySupportedModels: string[];protected async prepare() {const modelOptions = LLMFormController.prepareModelSelectOptionsByFeatures([@@ -57,6 +58,9 @@ export class GenAILLM extends Component {);this.searchModels = LLMRegistry.getModelsByFeatures('search').map((m) => m.entryId);+ // Initialize verbosity supported models by checking for GPT-5/o3 models+ this.verbositySupportedModels = LLMRegistry.getVerbositySupportedModels();+modelOptions.unshift('Echo');const model = this.data.model || this.defaultModel;@@ -126,6 +130,7 @@ export class GenAILLM extends Component {'useReasoning','maxThinkingTokens','reasoningEffort',+ 'verbosity',];for (let item of dataEntries) {// Check if the field needs default value initialization@@ -391,6 +396,10 @@ export class GenAILLM extends Component {this.updateReasoningEffortOptions(currentElement.value);}// #endregion++ // #region Update verbosity field visibility based on model+ this.updateVerbosityFieldVisibility(currentElement.value, form);+ // #endregion},},@@ -653,6 +662,23 @@ export class GenAILLM extends Component {tooltipClasses: 'w-56 ',arrowClasses: '-ml-11',},+ verbosity: {+ type: 'select',+ label: 'Verbosity',+ value: 'medium',+ options: [+ { text: 'Low', value: 'low' },+ { text: 'Medium', value: 'medium' },+ { text: 'High', value: 'high' },+ ],+ attributes: {+ 'data-supported-models': this.verbositySupportedModels.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 ',+ arrowClasses: '-ml-11',+ section: 'Advanced',+ },passthrough: {type: 'checkbox',label: 'Passthrough',@@ -784,6 +810,22 @@ export class GenAILLM extends Component {};}+ /**+ * Update verbosity field visibility based on the selected model+ */+ private updateVerbosityFieldVisibility(modelId: string, form: HTMLFormElement) {+ if (!form) return;++ const verbosityField = form.querySelector('[data-field-name="verbosity"]') as HTMLElement;+ if (!verbosityField) return;++ if (LLMRegistry.isVerbositySupportedModel(modelId)) {+ verbosityField.classList.remove('hidden');+ } else {+ verbosityField.classList.add('hidden');+ }+ }+private async getWebSearchFields() {const countryOptions = [{ text: 'Select a Country', value: '' }, ...isoCountryCodes];const timezoneOptions = [{ text: 'Select a Timezone', value: '' }, ...ianaTimezones];diff --git a/packages/app/src/shared/services/LLMRegistry.service.ts b/packages/app/src/shared/services/LLMRegistry.service.tsindex 4309194c..fbaa65c0 100644--- a/packages/app/src/shared/services/LLMRegistry.service.ts+++ b/packages/app/src/shared/services/LLMRegistry.service.ts@@ -24,6 +24,9 @@ export class LLMRegistry {'others',];+ // Single source of truth for determining verbosity support+ private static readonly VERBOSITY_SUPPORTED_MODEL_PATTERN = /gpt-5/i;+public static getModels(): Record<string, LLMModel> {const models = llmModelsStore.getState()?.models || {};return models;@@ -215,4 +218,25 @@ export class LLMRegistry {return a.label.localeCompare(b.label);});}++ /**+ * Get all models that support verbosity parameter+ *+ * @returns Array of model IDs that support verbosity+ */+ public static getVerbositySupportedModels(): string[] {+ const models = this.getModels();+ return Object.keys(models).filter((modelId) => this.isVerbositySupportedModel(modelId));+ }++ /**+ * Check if a model supports verbosity parameter.+ * Delegates to getVerbositySupportedModels for a single source of truth.+ *+ * @param modelId - The model ID to check+ * @returns True if the model supports verbosity parameter+ */+ public static isVerbositySupportedModel(modelId: string): boolean {+ return Boolean(modelId && this.VERBOSITY_SUPPORTED_MODEL_PATTERN.test(modelId));+ }}