From 24e2d86f7b1eaf05af0ba6aeb88d6a458fc2786b Mon Sep 17 00:00:00 2001 From: jimmyuconn1982 Date: Tue, 14 Oct 2025 02:56:20 -0700 Subject: [PATCH] fix: add max_clarification_rounds parameter passing from frontend to backend (#616) Bug Fix This PR fixes the issue where max_clarification_rounds parameter was not being passed from the frontend to the backend, causing a TypeError: '<' not supported between instances of 'int' and 'NoneType' error. Technical Details The issue was that the frontend was not passing the max_clarification_rounds parameter to the backend API, causing the backend to receive None values and fail during comparison operations. This fix ensures the parameter is properly typed and passed through the entire request chain. --- web/src/core/api/chat.ts | 1 + web/src/core/store/store.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/web/src/core/api/chat.ts b/web/src/core/api/chat.ts index 3309948..10fa5e0 100644 --- a/web/src/core/api/chat.ts +++ b/web/src/core/api/chat.ts @@ -19,6 +19,7 @@ export async function* chatStream( resources?: Array; auto_accepted_plan: boolean; enable_clarification?: boolean; + max_clarification_rounds?: number; max_plan_iterations: number; max_step_num: number; max_search_results?: number; diff --git a/web/src/core/store/store.ts b/web/src/core/store/store.ts index 34af095..521d72d 100644 --- a/web/src/core/store/store.ts +++ b/web/src/core/store/store.ts @@ -105,6 +105,7 @@ export async function sendMessage( resources, auto_accepted_plan: settings.autoAcceptedPlan, enable_clarification: settings.enableClarification ?? false, + max_clarification_rounds: settings.maxClarificationRounds ?? 3, enable_deep_thinking: settings.enableDeepThinking ?? false, enable_background_investigation: settings.enableBackgroundInvestigation ?? true,