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; }