-
+ (value === "form" || value === "json") && setView(value)}
@@ -272,7 +272,7 @@ export default function SystemOneUI({ accessToken, disabledPersonalKeyCreation =
-
+
After you add it,{" "}
- test it in the System One playground
+ test it in the Decisions playground
diff --git a/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.integration.test.tsx b/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.integration.test.tsx
index b7d81a09f4e..cb62b9a34a9 100644
--- a/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.integration.test.tsx
+++ b/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.integration.test.tsx
@@ -1,5 +1,5 @@
import { fireEvent, render, screen } from "@testing-library/react";
-import { beforeEach, describe, expect, it, vi } from "vitest";
+import { beforeEach, describe, expect, it } from "vitest";
import DecisionModelsBanner from "./DecisionModelsBanner";
const STORAGE_KEY = "hideDecisionModelsBanner";
@@ -10,7 +10,7 @@ describe("DecisionModelsBanner", () => {
localStorage.removeItem("hideCostOptimizationFeedbackBanner");
});
- it("links directly to the System One playground", () => {
+ it("links directly to the Decisions playground", () => {
render();
const link = screen.getByRole("link", { name: "Try decision models" });
expect(link).toHaveAttribute("href", "/ui/playground?tab=system-one");
@@ -24,27 +24,14 @@ describe("DecisionModelsBanner", () => {
);
});
- it("offers Add a decision model only when the page can add models, and calls back on click", () => {
- const onAddModel = vi.fn();
- const { rerender } = render();
- expect(screen.queryByRole("button", { name: "Add a decision model" })).not.toBeInTheDocument();
-
- rerender();
- fireEvent.click(screen.getByRole("button", { name: "Add a decision model" }));
-
- expect(onAddModel).toHaveBeenCalledTimes(1);
- });
-
- it("points only users who can add models at Add Model", () => {
- const { rerender } = render();
+ it("links Supported providers to the provider table in the docs", () => {
+ render();
+ expect(screen.getByRole("link", { name: "Supported providers" })).toHaveAttribute(
+ "href",
+ "https://docs.litellm.ai/docs/decisions#supported-providers",
+ );
expect(screen.getByRole("paragraph")).not.toHaveTextContent("Add Model");
expect(screen.getByRole("paragraph")).toHaveTextContent("Call them at /v1/decisions or /v1/systemone");
-
- rerender();
-
- expect(screen.getByRole("paragraph")).toHaveTextContent(
- "Search decision in Add Model to find them. Call them at /v1/decisions",
- );
});
it("shows the announcement even if the old feedback banner was dismissed", () => {
diff --git a/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.tsx b/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.tsx
index 5dbf5191198..b1d81a18588 100644
--- a/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.tsx
+++ b/ui/litellm-dashboard/src/components/molecules/DecisionModelsBanner.tsx
@@ -1,18 +1,14 @@
import React, { useState } from "react";
import { ArrowRight, Sparkles, X } from "lucide-react";
-import { DECISIONS_DOCS_URL, SYSTEM_ONE_PLAYGROUND_ROUTE } from "@/lib/decisionModels";
+import { DECISIONS_DOCS_URL, DECISIONS_PROVIDERS_DOCS_URL, SYSTEM_ONE_PLAYGROUND_ROUTE } from "@/lib/decisionModels";
import { uiHref } from "@/utils/uiHref";
import { Button } from "@/components/ui/button";
const STORAGE_KEY = "hideDecisionModelsBanner";
-interface DecisionModelsBannerProps {
- onAddModel?: () => void;
-}
-
-const DecisionModelsBanner: React.FC = ({ onAddModel }) => {
+const DecisionModelsBanner: React.FC = () => {
const [dismissed, setDismissed] = useState(() => {
if (typeof window !== "undefined") {
return localStorage.getItem(STORAGE_KEY) === "true";
@@ -32,23 +28,22 @@ const DecisionModelsBanner: React.FC = ({ onAddModel
Decision models are now supported
- {onAddModel && (
- <>
- Search decision in Add Model to find them.{" "}
- >
- )}
- Call them at /v1/decisions or /v1/systemone, or try them in the System One
+ Call them at /v1/decisions or /v1/systemone, or try them in the Decisions
playground.{" "}
How to call them