diff --git a/ui/litellm-dashboard/next.config.mjs b/ui/litellm-dashboard/next.config.mjs index bd434a0fabb..bdf492de332 100644 --- a/ui/litellm-dashboard/next.config.mjs +++ b/ui/litellm-dashboard/next.config.mjs @@ -5,8 +5,6 @@ import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const DEV_PROXY_TARGET = process.env.LITELLM_BACKEND_URL || "http://localhost:4000"; - const nextConfig = { output: "export", basePath: "", @@ -15,67 +13,6 @@ const nextConfig = { // Must be absolute; "." is no longer allowed root: __dirname, }, - // Dev-only: proxy API calls to the litellm backend to avoid CORS issues - async rewrites() { - return [ - { - source: "/v1/:path*", - destination: `${DEV_PROXY_TARGET}/v1/:path*`, - }, - { - source: "/v2/:path*", - destination: `${DEV_PROXY_TARGET}/v2/:path*`, - }, - { - source: "/key/:path*", - destination: `${DEV_PROXY_TARGET}/key/:path*`, - }, - { - source: "/team/:path*", - destination: `${DEV_PROXY_TARGET}/team/:path*`, - }, - { - source: "/user/:path*", - destination: `${DEV_PROXY_TARGET}/user/:path*`, - }, - { - source: "/model/:path*", - destination: `${DEV_PROXY_TARGET}/model/:path*`, - }, - { - source: "/health/:path*", - destination: `${DEV_PROXY_TARGET}/health/:path*`, - }, - { - source: "/callbacks/:path*", - destination: `${DEV_PROXY_TARGET}/callbacks/:path*`, - }, - { - source: "/config/:path*", - destination: `${DEV_PROXY_TARGET}/config/:path*`, - }, - { - source: "/mcp-rest/:path*", - destination: `${DEV_PROXY_TARGET}/mcp-rest/:path*`, - }, - { - source: "/sso/:path*", - destination: `${DEV_PROXY_TARGET}/sso/:path*`, - }, - { - source: "/.well-known/:path*", - destination: `${DEV_PROXY_TARGET}/.well-known/:path*`, - }, - { - source: "/litellm/.well-known/:path*", - destination: `${DEV_PROXY_TARGET}/litellm/.well-known/:path*`, - }, - { - source: "/in_product_nudges", - destination: `${DEV_PROXY_TARGET}/in_product_nudges`, - }, - ]; - }, }; export default nextConfig; diff --git a/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIFormSection.tsx b/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIFormSection.tsx index 7a78856b3cf..316eacef80c 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIFormSection.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIFormSection.tsx @@ -35,10 +35,8 @@ const OpenAPIFormSection: React.FC = ({ }; if (entry.oauth) { updates.auth_type = AUTH_TYPE.OAUTH2; - updates.credentials = { - authorization_url: entry.oauth.authorization_url, - token_url: entry.oauth.token_url, - }; + updates.authorization_url = entry.oauth.authorization_url; + updates.token_url = entry.oauth.token_url; } form.setFieldsValue(updates); onValuesChange(updates);