Skip to content

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.

Merge pull request #472 from SmythOS/ux/anthropic-comp-settings

Muhammad Hamza Khan8cfa05114eb1
diff --cc packages/app/src/builder-ui/components/GenAILLM.class.ts
index 5524c0b8,a676a905..e63c67cc
--- a/packages/app/src/builder-ui/components/GenAILLM.class.ts
+++ b/packages/app/src/builder-ui/components/GenAILLM.class.ts
@@@ -1645,13 -1660,27 +1661,24 @@@ export class GenAILLM extends Componen
/**
* Get the appropriate default reasoning effort value for a given model
- * Always returns the first option as the default
+ * Uses the defaultValue from REASONING_EFFORTS config if available, otherwise first option
*/
- 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
- // Because with higher reasoning effort, GPT-5 models cannot provide the expected output if the maximum output tokens are insufficient for the reasoning process.
+ // Find matching model configuration to check for a custom defaultValue
+ const modelLower = model.toLowerCase();
+ const modelConfig = REASONING_EFFORTS.find((config) => config.pattern.test(modelLower));
+
+ // Use config's defaultValue if available and valid, otherwise use first option
+ if (modelConfig?.defaultValue) {
+ const isValidDefault = options.some((opt) => opt.value === modelConfig.defaultValue);
+ if (isValidDefault) {
+ return modelConfig.defaultValue;
+ }
+ }
+
+ // Fallback to first option (for GPT-5 models where higher effort may cause issues with max tokens)
return options[0].value;
}