From c949843157f890ea253b51af4fa825e78543feb8 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 12:24:04 -0700 Subject: [PATCH] fix(ui): send empty vector_stores when the last team vector store is removed (#40144) Co-authored-by: yassin Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../src/components/team/TeamInfo.test.tsx | 13 +++++++++++++ .../src/components/team/TeamInfo.tsx | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx index 041ba4b548d..b286c8c1303 100644 --- a/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx @@ -2052,6 +2052,19 @@ describe("TeamInfoView - the exact bytes the update call sends", () => { expect(objectPermission.agent_access_groups).toStrictEqual([]); }); + it("sends an empty vector_stores array after the last vector store chip is removed", async () => { + const user = userEvent.setup({ delay: null }); + await openEditor(user); + + await user.click(within(screen.getByLabelText("vs-1")).getByRole("button")); + expect(screen.queryByLabelText("vs-1")).not.toBeInTheDocument(); + + const payload = await save(user); + + const objectPermission = wireBody(payload).object_permission as Record; + expect(objectPermission.vector_stores).toStrictEqual([]); + }); + it("resends every stored value once both sections are opened", async () => { const user = userEvent.setup({ delay: null }); await openEditor(user); diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx index efd69a79fc0..4947cec1441 100644 --- a/ui/litellm-dashboard/src/components/team/TeamInfo.tsx +++ b/ui/litellm-dashboard/src/components/team/TeamInfo.tsx @@ -1039,7 +1039,7 @@ const TeamInfoView: React.FC = ({ delete values.agents_and_groups; // Handle vector stores permissions - if (values.vector_stores && values.vector_stores.length > 0) { + if (values.vector_stores) { updateData.object_permission.vector_stores = values.vector_stores; }