diff --git a/ui/litellm-dashboard/src/components/admins.tsx b/ui/litellm-dashboard/src/components/admins.tsx index 94211868f4..af4a3bdd65 100644 --- a/ui/litellm-dashboard/src/components/admins.tsx +++ b/ui/litellm-dashboard/src/components/admins.tsx @@ -91,6 +91,9 @@ const AdminPanel: React.FC = ({ >>(null); const isLocal = process.env.NODE_ENV === "development"; + if (isLocal === true) { + console.log = function() {}; + } const [baseUrl, setBaseUrl] = useState( isLocal ? "http://localhost:4000" : "" ); diff --git a/ui/litellm-dashboard/src/components/chat_ui.tsx b/ui/litellm-dashboard/src/components/chat_ui.tsx index d96db60c48..e38c005c4b 100644 --- a/ui/litellm-dashboard/src/components/chat_ui.tsx +++ b/ui/litellm-dashboard/src/components/chat_ui.tsx @@ -45,6 +45,9 @@ async function generateModelResponse( ) { // base url should be the current base_url const isLocal = process.env.NODE_ENV === "development"; + if (isLocal === true) { + console.log = function() {}; + } console.log("isLocal:", isLocal); const proxyBaseUrl = isLocal ? "http://localhost:4000" diff --git a/ui/litellm-dashboard/src/components/create_user_button.tsx b/ui/litellm-dashboard/src/components/create_user_button.tsx index 75908ac27d..498d032f57 100644 --- a/ui/litellm-dashboard/src/components/create_user_button.tsx +++ b/ui/litellm-dashboard/src/components/create_user_button.tsx @@ -43,6 +43,9 @@ const Createuser: React.FC = ({ useState(null); const router = useRouter(); const isLocal = process.env.NODE_ENV === "development"; + if (isLocal === true) { + console.log = function() {}; + } const [baseUrl, setBaseUrl] = useState( isLocal ? "http://localhost:4000" : "" ); diff --git a/ui/litellm-dashboard/src/components/general_settings.tsx b/ui/litellm-dashboard/src/components/general_settings.tsx index 183236e223..1f7037b498 100644 --- a/ui/litellm-dashboard/src/components/general_settings.tsx +++ b/ui/litellm-dashboard/src/components/general_settings.tsx @@ -76,6 +76,9 @@ async function testFallbackModelResponse( ) { // base url should be the current base_url const isLocal = process.env.NODE_ENV === "development"; + if (isLocal === true) { + console.log = function() {}; + } console.log("isLocal:", isLocal); const proxyBaseUrl = isLocal ? "http://localhost:4000" diff --git a/ui/litellm-dashboard/src/components/navbar.tsx b/ui/litellm-dashboard/src/components/navbar.tsx index 66d4c703ee..eba5cad78c 100644 --- a/ui/litellm-dashboard/src/components/navbar.tsx +++ b/ui/litellm-dashboard/src/components/navbar.tsx @@ -43,6 +43,9 @@ const Navbar: React.FC = ({ // const userColors = require('./ui_colors.json') || {}; const isLocal = process.env.NODE_ENV === "development"; + if (isLocal === true) { + console.log = function() {}; + } const proxyBaseUrl = isLocal ? "http://localhost:4000" : null; const imageUrl = isLocal ? "http://localhost:4000/get_image" : "/get_image"; let logoutUrl = ""; diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index ee9ab07bb7..7d68e7a9de 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -5,6 +5,9 @@ import { message } from "antd"; const isLocal = process.env.NODE_ENV === "development"; const proxyBaseUrl = isLocal ? "http://localhost:4000" : null; +if (isLocal === true) { + console.log = function() {}; +} export interface Model { model_name: string; diff --git a/ui/litellm-dashboard/src/components/user_dashboard.tsx b/ui/litellm-dashboard/src/components/user_dashboard.tsx index 386ad613a7..f8326054c1 100644 --- a/ui/litellm-dashboard/src/components/user_dashboard.tsx +++ b/ui/litellm-dashboard/src/components/user_dashboard.tsx @@ -17,6 +17,9 @@ import { useSearchParams, useRouter } from "next/navigation"; import { jwtDecode } from "jwt-decode"; import { Typography } from "antd"; const isLocal = process.env.NODE_ENV === "development"; +if (isLocal === true) { + console.log = function() {}; +} console.log("isLocal:", isLocal); const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;