From 99c0d7e4457b3f055b6dc42a1b0d4e091bab9cf2 Mon Sep 17 00:00:00 2001 From: viettranx Date: Fri, 27 Feb 2026 12:31:13 +0700 Subject: [PATCH] fix: send empty objects instead of null for `tools_config` and `other_config` when disabled or empty. --- ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx b/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx index 941ea332..06465d96 100644 --- a/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx +++ b/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx @@ -73,7 +73,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) { try { const updates: Record = { subagents_config: subEnabled ? sub : null, - tools_config: toolsEnabled ? tools : null, + tools_config: toolsEnabled ? tools : {}, compaction_config: compEnabled ? comp : null, context_pruning: pruneEnabled ? prune : null, sandbox_config: sbEnabled ? sb : null, @@ -87,7 +87,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) { if (qgEnabled && qualityGates.length > 0) { otherBase.quality_gates = qualityGates; } - updates.other_config = Object.keys(otherBase).length > 0 ? otherBase : null; + updates.other_config = Object.keys(otherBase).length > 0 ? otherBase : {}; await onUpdate(updates); setSaved(true); setTimeout(() => setSaved(false), 3000);