diff --git a/litellm/proxy/_experimental/out/404/index.html b/litellm/proxy/_experimental/out/404/index.html
index 0f45eb1aa33..b14dfa6c348 100644
--- a/litellm/proxy/_experimental/out/404/index.html
+++ b/litellm/proxy/_experimental/out/404/index.html
@@ -1 +1 @@
-
404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
+404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/__next.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.__PAGE__.txt
index 5d8197ff593..4a8fb134473 100644
--- a/litellm/proxy/_experimental/out/__next.__PAGE__.txt
+++ b/litellm/proxy/_experimental/out/__next.__PAGE__.txt
@@ -1,32 +1,32 @@
1:"$Sreact.fragment"
-2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
-3:I[952683,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/61f59596bf7f0628.js","/litellm-asset-prefix/_next/static/chunks/9f5ccd929375c1d6.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/8b4fd43197a5dfc8.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/c979f252fa5ee77c.js","/litellm-asset-prefix/_next/static/chunks/50febaabfb896c46.js","/litellm-asset-prefix/_next/static/chunks/c4cc89d1b0a147d5.js","/litellm-asset-prefix/_next/static/chunks/fe5201571c777f09.js","/litellm-asset-prefix/_next/static/chunks/c748f222de4766db.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/fe750aa0bf04912c.js","/litellm-asset-prefix/_next/static/chunks/7d4cded1a1238581.js","/litellm-asset-prefix/_next/static/chunks/d64d74932cb225a3.js","/litellm-asset-prefix/_next/static/chunks/9ffb8ddd0c9a7c31.js","/litellm-asset-prefix/_next/static/chunks/c4fe728e74b52958.js","/litellm-asset-prefix/_next/static/chunks/1532edb438ed84bb.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/25c5a08661ac2ec3.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/9d6e5aad99b19216.js","/litellm-asset-prefix/_next/static/chunks/e8718f949e42598e.js","/litellm-asset-prefix/_next/static/chunks/6a51328383335d1e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/6a4eede876bb5c8f.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/c7b74067c01ee971.js","/litellm-asset-prefix/_next/static/chunks/a85adee4198d5478.js","/litellm-asset-prefix/_next/static/chunks/bff4459534c52f16.js","/litellm-asset-prefix/_next/static/chunks/39eb5927f56ccc0e.js","/litellm-asset-prefix/_next/static/chunks/ebb2b2d8175d3d2f.js","/litellm-asset-prefix/_next/static/chunks/5a5488ab3db0c3de.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/82dbdb17d57c6737.js","/litellm-asset-prefix/_next/static/chunks/b31a08272a82b84e.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/eba9ac65320061b1.js","/litellm-asset-prefix/_next/static/chunks/0eda6dc5d5f35d92.js","/litellm-asset-prefix/_next/static/chunks/96aed36e606e8582.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/06ebe9b0e9cdf241.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/165d00848f04c4c9.js","/litellm-asset-prefix/_next/static/chunks/bb0a6e4a3a18721a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/8ab6e2ca95000c8e.js","/litellm-asset-prefix/_next/static/chunks/06cdd9bb80c63794.js","/litellm-asset-prefix/_next/static/chunks/66a190706fc6c35a.js","/litellm-asset-prefix/_next/static/chunks/54e29148cb2f2582.js","/litellm-asset-prefix/_next/static/chunks/fd9de419c8c0222e.js"],"default"]
-1c:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+2:I[347257,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
+3:I[952683,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/61f59596bf7f0628.js","/my-custom-path/_next/static/chunks/9f5ccd929375c1d6.js","/my-custom-path/_next/static/chunks/30539b80ac15aad2.js","/my-custom-path/_next/static/chunks/142704439974f6b3.js","/my-custom-path/_next/static/chunks/8b4fd43197a5dfc8.js","/my-custom-path/_next/static/chunks/1fe0596a309ad6cf.js","/my-custom-path/_next/static/chunks/7b788dd93ad868b3.js","/my-custom-path/_next/static/chunks/c979f252fa5ee77c.js","/my-custom-path/_next/static/chunks/50febaabfb896c46.js","/my-custom-path/_next/static/chunks/c4cc89d1b0a147d5.js","/my-custom-path/_next/static/chunks/fe5201571c777f09.js","/my-custom-path/_next/static/chunks/c748f222de4766db.js","/my-custom-path/_next/static/chunks/5f9c3b92a016f382.js","/my-custom-path/_next/static/chunks/fe750aa0bf04912c.js","/my-custom-path/_next/static/chunks/7d4cded1a1238581.js","/my-custom-path/_next/static/chunks/d64d74932cb225a3.js","/my-custom-path/_next/static/chunks/9ffb8ddd0c9a7c31.js","/my-custom-path/_next/static/chunks/c4fe728e74b52958.js","/my-custom-path/_next/static/chunks/1532edb438ed84bb.js","/my-custom-path/_next/static/chunks/d0d828f9a0668699.js","/my-custom-path/_next/static/chunks/88c74f8b4b20d25a.js","/my-custom-path/_next/static/chunks/25c5a08661ac2ec3.js","/my-custom-path/_next/static/chunks/134f728fa7099e3e.js","/my-custom-path/_next/static/chunks/9d6e5aad99b19216.js","/my-custom-path/_next/static/chunks/e8718f949e42598e.js","/my-custom-path/_next/static/chunks/6a51328383335d1e.js","/my-custom-path/_next/static/chunks/3b30ab8eaa03bc21.js","/my-custom-path/_next/static/chunks/99cf9cf99df5ccfc.js","/my-custom-path/_next/static/chunks/6a4eede876bb5c8f.js","/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","/my-custom-path/_next/static/chunks/c7b74067c01ee971.js","/my-custom-path/_next/static/chunks/a85adee4198d5478.js","/my-custom-path/_next/static/chunks/bff4459534c52f16.js","/my-custom-path/_next/static/chunks/39eb5927f56ccc0e.js","/my-custom-path/_next/static/chunks/ebb2b2d8175d3d2f.js","/my-custom-path/_next/static/chunks/5a5488ab3db0c3de.js","/my-custom-path/_next/static/chunks/0a65da2cd24e2ab6.js","/my-custom-path/_next/static/chunks/82dbdb17d57c6737.js","/my-custom-path/_next/static/chunks/b31a08272a82b84e.js","/my-custom-path/_next/static/chunks/496b84010c33cf69.js","/my-custom-path/_next/static/chunks/eba9ac65320061b1.js","/my-custom-path/_next/static/chunks/0eda6dc5d5f35d92.js","/my-custom-path/_next/static/chunks/96aed36e606e8582.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/2971c4658f1bcd7d.js","/my-custom-path/_next/static/chunks/06ebe9b0e9cdf241.js","/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","/my-custom-path/_next/static/chunks/165d00848f04c4c9.js","/my-custom-path/_next/static/chunks/bb0a6e4a3a18721a.js","/my-custom-path/_next/static/chunks/4980372eaa37b78b.js","/my-custom-path/_next/static/chunks/8ab6e2ca95000c8e.js","/my-custom-path/_next/static/chunks/06cdd9bb80c63794.js","/my-custom-path/_next/static/chunks/66a190706fc6c35a.js","/my-custom-path/_next/static/chunks/54e29148cb2f2582.js","/my-custom-path/_next/static/chunks/fd9de419c8c0222e.js"],"default"]
+1c:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
1d:"$Sreact.suspense"
-:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"]
-0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/61f59596bf7f0628.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9f5ccd929375c1d6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/8b4fd43197a5dfc8.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c979f252fa5ee77c.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/50febaabfb896c46.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c4cc89d1b0a147d5.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fe5201571c777f09.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c748f222de4766db.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/fe750aa0bf04912c.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7d4cded1a1238581.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/d64d74932cb225a3.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/9ffb8ddd0c9a7c31.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c4fe728e74b52958.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/1532edb438ed84bb.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/25c5a08661ac2ec3.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/9d6e5aad99b19216.js","async":true}],["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/e8718f949e42598e.js","async":true}],["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/6a51328383335d1e.js","async":true}],["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/6a4eede876bb5c8f.js","async":true}],["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/c7b74067c01ee971.js","async":true}],["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/a85adee4198d5478.js","async":true}],["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/bff4459534c52f16.js","async":true}],["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/39eb5927f56ccc0e.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a"],"$L1b"]}],"loading":null,"isPartial":false}
+:HL["/my-custom-path/_next/static/chunks/3f3fa56b5786d58c.css","style"]
+0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/61f59596bf7f0628.js","async":true}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/9f5ccd929375c1d6.js","async":true}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/30539b80ac15aad2.js","async":true}],["$","script","script-3",{"src":"/my-custom-path/_next/static/chunks/142704439974f6b3.js","async":true}],["$","script","script-4",{"src":"/my-custom-path/_next/static/chunks/8b4fd43197a5dfc8.js","async":true}],["$","script","script-5",{"src":"/my-custom-path/_next/static/chunks/1fe0596a309ad6cf.js","async":true}],["$","script","script-6",{"src":"/my-custom-path/_next/static/chunks/7b788dd93ad868b3.js","async":true}],["$","script","script-7",{"src":"/my-custom-path/_next/static/chunks/c979f252fa5ee77c.js","async":true}],["$","script","script-8",{"src":"/my-custom-path/_next/static/chunks/50febaabfb896c46.js","async":true}],["$","script","script-9",{"src":"/my-custom-path/_next/static/chunks/c4cc89d1b0a147d5.js","async":true}],["$","script","script-10",{"src":"/my-custom-path/_next/static/chunks/fe5201571c777f09.js","async":true}],["$","script","script-11",{"src":"/my-custom-path/_next/static/chunks/c748f222de4766db.js","async":true}],["$","script","script-12",{"src":"/my-custom-path/_next/static/chunks/5f9c3b92a016f382.js","async":true}],["$","script","script-13",{"src":"/my-custom-path/_next/static/chunks/fe750aa0bf04912c.js","async":true}],["$","script","script-14",{"src":"/my-custom-path/_next/static/chunks/7d4cded1a1238581.js","async":true}],["$","script","script-15",{"src":"/my-custom-path/_next/static/chunks/d64d74932cb225a3.js","async":true}],["$","script","script-16",{"src":"/my-custom-path/_next/static/chunks/9ffb8ddd0c9a7c31.js","async":true}],["$","script","script-17",{"src":"/my-custom-path/_next/static/chunks/c4fe728e74b52958.js","async":true}],["$","script","script-18",{"src":"/my-custom-path/_next/static/chunks/1532edb438ed84bb.js","async":true}],["$","script","script-19",{"src":"/my-custom-path/_next/static/chunks/d0d828f9a0668699.js","async":true}],["$","script","script-20",{"src":"/my-custom-path/_next/static/chunks/88c74f8b4b20d25a.js","async":true}],["$","script","script-21",{"src":"/my-custom-path/_next/static/chunks/25c5a08661ac2ec3.js","async":true}],["$","script","script-22",{"src":"/my-custom-path/_next/static/chunks/134f728fa7099e3e.js","async":true}],["$","script","script-23",{"src":"/my-custom-path/_next/static/chunks/9d6e5aad99b19216.js","async":true}],["$","script","script-24",{"src":"/my-custom-path/_next/static/chunks/e8718f949e42598e.js","async":true}],["$","script","script-25",{"src":"/my-custom-path/_next/static/chunks/6a51328383335d1e.js","async":true}],["$","script","script-26",{"src":"/my-custom-path/_next/static/chunks/3b30ab8eaa03bc21.js","async":true}],["$","script","script-27",{"src":"/my-custom-path/_next/static/chunks/99cf9cf99df5ccfc.js","async":true}],["$","script","script-28",{"src":"/my-custom-path/_next/static/chunks/6a4eede876bb5c8f.js","async":true}],["$","script","script-29",{"src":"/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-30",{"src":"/my-custom-path/_next/static/chunks/c7b74067c01ee971.js","async":true}],["$","script","script-31",{"src":"/my-custom-path/_next/static/chunks/a85adee4198d5478.js","async":true}],["$","script","script-32",{"src":"/my-custom-path/_next/static/chunks/bff4459534c52f16.js","async":true}],["$","script","script-33",{"src":"/my-custom-path/_next/static/chunks/39eb5927f56ccc0e.js","async":true}],"$L6","$L7","$L8","$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a"],"$L1b"]}],"loading":null,"isPartial":false}
4:{}
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
-6:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/ebb2b2d8175d3d2f.js","async":true}]
-7:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/5a5488ab3db0c3de.js","async":true}]
-8:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}]
-9:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/82dbdb17d57c6737.js","async":true}]
-a:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/b31a08272a82b84e.js","async":true}]
-b:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true}]
-c:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/eba9ac65320061b1.js","async":true}]
-d:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/0eda6dc5d5f35d92.js","async":true}]
-e:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/96aed36e606e8582.js","async":true}]
-f:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","async":true}]
-10:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true}]
-11:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/06ebe9b0e9cdf241.js","async":true}]
-12:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]
-13:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/165d00848f04c4c9.js","async":true}]
-14:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/bb0a6e4a3a18721a.js","async":true}]
-15:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true}]
-16:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/8ab6e2ca95000c8e.js","async":true}]
-17:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/06cdd9bb80c63794.js","async":true}]
-18:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/66a190706fc6c35a.js","async":true}]
-19:["$","script","script-53",{"src":"/litellm-asset-prefix/_next/static/chunks/54e29148cb2f2582.js","async":true}]
-1a:["$","script","script-54",{"src":"/litellm-asset-prefix/_next/static/chunks/fd9de419c8c0222e.js","async":true}]
+6:["$","script","script-34",{"src":"/my-custom-path/_next/static/chunks/ebb2b2d8175d3d2f.js","async":true}]
+7:["$","script","script-35",{"src":"/my-custom-path/_next/static/chunks/5a5488ab3db0c3de.js","async":true}]
+8:["$","script","script-36",{"src":"/my-custom-path/_next/static/chunks/0a65da2cd24e2ab6.js","async":true}]
+9:["$","script","script-37",{"src":"/my-custom-path/_next/static/chunks/82dbdb17d57c6737.js","async":true}]
+a:["$","script","script-38",{"src":"/my-custom-path/_next/static/chunks/b31a08272a82b84e.js","async":true}]
+b:["$","script","script-39",{"src":"/my-custom-path/_next/static/chunks/496b84010c33cf69.js","async":true}]
+c:["$","script","script-40",{"src":"/my-custom-path/_next/static/chunks/eba9ac65320061b1.js","async":true}]
+d:["$","script","script-41",{"src":"/my-custom-path/_next/static/chunks/0eda6dc5d5f35d92.js","async":true}]
+e:["$","script","script-42",{"src":"/my-custom-path/_next/static/chunks/96aed36e606e8582.js","async":true}]
+f:["$","script","script-43",{"src":"/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","async":true}]
+10:["$","script","script-44",{"src":"/my-custom-path/_next/static/chunks/2971c4658f1bcd7d.js","async":true}]
+11:["$","script","script-45",{"src":"/my-custom-path/_next/static/chunks/06ebe9b0e9cdf241.js","async":true}]
+12:["$","script","script-46",{"src":"/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]
+13:["$","script","script-47",{"src":"/my-custom-path/_next/static/chunks/165d00848f04c4c9.js","async":true}]
+14:["$","script","script-48",{"src":"/my-custom-path/_next/static/chunks/bb0a6e4a3a18721a.js","async":true}]
+15:["$","script","script-49",{"src":"/my-custom-path/_next/static/chunks/4980372eaa37b78b.js","async":true}]
+16:["$","script","script-50",{"src":"/my-custom-path/_next/static/chunks/8ab6e2ca95000c8e.js","async":true}]
+17:["$","script","script-51",{"src":"/my-custom-path/_next/static/chunks/06cdd9bb80c63794.js","async":true}]
+18:["$","script","script-52",{"src":"/my-custom-path/_next/static/chunks/66a190706fc6c35a.js","async":true}]
+19:["$","script","script-53",{"src":"/my-custom-path/_next/static/chunks/54e29148cb2f2582.js","async":true}]
+1a:["$","script","script-54",{"src":"/my-custom-path/_next/static/chunks/fd9de419c8c0222e.js","async":true}]
1b:["$","$L1c",null,{"children":["$","$1d",null,{"name":"Next.MetadataOutlet","children":"$@1e"}]}]
1e:null
diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt
index 137514a802b..b923f11e521 100644
--- a/litellm/proxy/_experimental/out/__next._full.txt
+++ b/litellm/proxy/_experimental/out/__next._full.txt
@@ -1,63 +1,63 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-5:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
-6:I[952683,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/61f59596bf7f0628.js","/litellm-asset-prefix/_next/static/chunks/9f5ccd929375c1d6.js","/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","/litellm-asset-prefix/_next/static/chunks/8b4fd43197a5dfc8.js","/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","/litellm-asset-prefix/_next/static/chunks/c979f252fa5ee77c.js","/litellm-asset-prefix/_next/static/chunks/50febaabfb896c46.js","/litellm-asset-prefix/_next/static/chunks/c4cc89d1b0a147d5.js","/litellm-asset-prefix/_next/static/chunks/fe5201571c777f09.js","/litellm-asset-prefix/_next/static/chunks/c748f222de4766db.js","/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","/litellm-asset-prefix/_next/static/chunks/fe750aa0bf04912c.js","/litellm-asset-prefix/_next/static/chunks/7d4cded1a1238581.js","/litellm-asset-prefix/_next/static/chunks/d64d74932cb225a3.js","/litellm-asset-prefix/_next/static/chunks/9ffb8ddd0c9a7c31.js","/litellm-asset-prefix/_next/static/chunks/c4fe728e74b52958.js","/litellm-asset-prefix/_next/static/chunks/1532edb438ed84bb.js","/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","/litellm-asset-prefix/_next/static/chunks/25c5a08661ac2ec3.js","/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","/litellm-asset-prefix/_next/static/chunks/9d6e5aad99b19216.js","/litellm-asset-prefix/_next/static/chunks/e8718f949e42598e.js","/litellm-asset-prefix/_next/static/chunks/6a51328383335d1e.js","/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","/litellm-asset-prefix/_next/static/chunks/6a4eede876bb5c8f.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/c7b74067c01ee971.js","/litellm-asset-prefix/_next/static/chunks/a85adee4198d5478.js","/litellm-asset-prefix/_next/static/chunks/bff4459534c52f16.js","/litellm-asset-prefix/_next/static/chunks/39eb5927f56ccc0e.js","/litellm-asset-prefix/_next/static/chunks/ebb2b2d8175d3d2f.js","/litellm-asset-prefix/_next/static/chunks/5a5488ab3db0c3de.js","/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","/litellm-asset-prefix/_next/static/chunks/82dbdb17d57c6737.js","/litellm-asset-prefix/_next/static/chunks/b31a08272a82b84e.js","/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","/litellm-asset-prefix/_next/static/chunks/eba9ac65320061b1.js","/litellm-asset-prefix/_next/static/chunks/0eda6dc5d5f35d92.js","/litellm-asset-prefix/_next/static/chunks/96aed36e606e8582.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","/litellm-asset-prefix/_next/static/chunks/06ebe9b0e9cdf241.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","/litellm-asset-prefix/_next/static/chunks/165d00848f04c4c9.js","/litellm-asset-prefix/_next/static/chunks/bb0a6e4a3a18721a.js","/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","/litellm-asset-prefix/_next/static/chunks/8ab6e2ca95000c8e.js","/litellm-asset-prefix/_next/static/chunks/06cdd9bb80c63794.js","/litellm-asset-prefix/_next/static/chunks/66a190706fc6c35a.js","/litellm-asset-prefix/_next/static/chunks/54e29148cb2f2582.js","/litellm-asset-prefix/_next/static/chunks/fd9de419c8c0222e.js"],"default"]
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+5:I[347257,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
+6:I[952683,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/61f59596bf7f0628.js","/my-custom-path/_next/static/chunks/9f5ccd929375c1d6.js","/my-custom-path/_next/static/chunks/30539b80ac15aad2.js","/my-custom-path/_next/static/chunks/142704439974f6b3.js","/my-custom-path/_next/static/chunks/8b4fd43197a5dfc8.js","/my-custom-path/_next/static/chunks/1fe0596a309ad6cf.js","/my-custom-path/_next/static/chunks/7b788dd93ad868b3.js","/my-custom-path/_next/static/chunks/c979f252fa5ee77c.js","/my-custom-path/_next/static/chunks/50febaabfb896c46.js","/my-custom-path/_next/static/chunks/c4cc89d1b0a147d5.js","/my-custom-path/_next/static/chunks/fe5201571c777f09.js","/my-custom-path/_next/static/chunks/c748f222de4766db.js","/my-custom-path/_next/static/chunks/5f9c3b92a016f382.js","/my-custom-path/_next/static/chunks/fe750aa0bf04912c.js","/my-custom-path/_next/static/chunks/7d4cded1a1238581.js","/my-custom-path/_next/static/chunks/d64d74932cb225a3.js","/my-custom-path/_next/static/chunks/9ffb8ddd0c9a7c31.js","/my-custom-path/_next/static/chunks/c4fe728e74b52958.js","/my-custom-path/_next/static/chunks/1532edb438ed84bb.js","/my-custom-path/_next/static/chunks/d0d828f9a0668699.js","/my-custom-path/_next/static/chunks/88c74f8b4b20d25a.js","/my-custom-path/_next/static/chunks/25c5a08661ac2ec3.js","/my-custom-path/_next/static/chunks/134f728fa7099e3e.js","/my-custom-path/_next/static/chunks/9d6e5aad99b19216.js","/my-custom-path/_next/static/chunks/e8718f949e42598e.js","/my-custom-path/_next/static/chunks/6a51328383335d1e.js","/my-custom-path/_next/static/chunks/3b30ab8eaa03bc21.js","/my-custom-path/_next/static/chunks/99cf9cf99df5ccfc.js","/my-custom-path/_next/static/chunks/6a4eede876bb5c8f.js","/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","/my-custom-path/_next/static/chunks/c7b74067c01ee971.js","/my-custom-path/_next/static/chunks/a85adee4198d5478.js","/my-custom-path/_next/static/chunks/bff4459534c52f16.js","/my-custom-path/_next/static/chunks/39eb5927f56ccc0e.js","/my-custom-path/_next/static/chunks/ebb2b2d8175d3d2f.js","/my-custom-path/_next/static/chunks/5a5488ab3db0c3de.js","/my-custom-path/_next/static/chunks/0a65da2cd24e2ab6.js","/my-custom-path/_next/static/chunks/82dbdb17d57c6737.js","/my-custom-path/_next/static/chunks/b31a08272a82b84e.js","/my-custom-path/_next/static/chunks/496b84010c33cf69.js","/my-custom-path/_next/static/chunks/eba9ac65320061b1.js","/my-custom-path/_next/static/chunks/0eda6dc5d5f35d92.js","/my-custom-path/_next/static/chunks/96aed36e606e8582.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/2971c4658f1bcd7d.js","/my-custom-path/_next/static/chunks/06ebe9b0e9cdf241.js","/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","/my-custom-path/_next/static/chunks/165d00848f04c4c9.js","/my-custom-path/_next/static/chunks/bb0a6e4a3a18721a.js","/my-custom-path/_next/static/chunks/4980372eaa37b78b.js","/my-custom-path/_next/static/chunks/8ab6e2ca95000c8e.js","/my-custom-path/_next/static/chunks/06cdd9bb80c63794.js","/my-custom-path/_next/static/chunks/66a190706fc6c35a.js","/my-custom-path/_next/static/chunks/54e29148cb2f2582.js","/my-custom-path/_next/static/chunks/fd9de419c8c0222e.js"],"default"]
32:I[168027,[],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
-:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"]
-0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/61f59596bf7f0628.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/9f5ccd929375c1d6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/30539b80ac15aad2.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/142704439974f6b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/8b4fd43197a5dfc8.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/c979f252fa5ee77c.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/50febaabfb896c46.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/c4cc89d1b0a147d5.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/fe5201571c777f09.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/c748f222de4766db.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/fe750aa0bf04912c.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/7d4cded1a1238581.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/d64d74932cb225a3.js","async":true,"nonce":"$undefined"}],"$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c","$L2d","$L2e","$L2f"],"$L30"]}],{},null,false,false]},null,false,false],"$L31",false]],"m":"$undefined","G":["$32",[]],"S":true}
-33:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+:HL["/my-custom-path/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
+:HL["/my-custom-path/_next/static/chunks/3f3fa56b5786d58c.css","style"]
+0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L5",null,{"Component":"$6","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@7","$@8"]}}],[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/3f3fa56b5786d58c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/61f59596bf7f0628.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/9f5ccd929375c1d6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/30539b80ac15aad2.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/my-custom-path/_next/static/chunks/142704439974f6b3.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/my-custom-path/_next/static/chunks/8b4fd43197a5dfc8.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/my-custom-path/_next/static/chunks/1fe0596a309ad6cf.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/my-custom-path/_next/static/chunks/7b788dd93ad868b3.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/my-custom-path/_next/static/chunks/c979f252fa5ee77c.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/my-custom-path/_next/static/chunks/50febaabfb896c46.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/my-custom-path/_next/static/chunks/c4cc89d1b0a147d5.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/my-custom-path/_next/static/chunks/fe5201571c777f09.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/my-custom-path/_next/static/chunks/c748f222de4766db.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/my-custom-path/_next/static/chunks/5f9c3b92a016f382.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/my-custom-path/_next/static/chunks/fe750aa0bf04912c.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/my-custom-path/_next/static/chunks/7d4cded1a1238581.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/my-custom-path/_next/static/chunks/d64d74932cb225a3.js","async":true,"nonce":"$undefined"}],"$L9","$La","$Lb","$Lc","$Ld","$Le","$Lf","$L10","$L11","$L12","$L13","$L14","$L15","$L16","$L17","$L18","$L19","$L1a","$L1b","$L1c","$L1d","$L1e","$L1f","$L20","$L21","$L22","$L23","$L24","$L25","$L26","$L27","$L28","$L29","$L2a","$L2b","$L2c","$L2d","$L2e","$L2f"],"$L30"]}],{},null,false,false]},null,false,false],"$L31",false]],"m":"$undefined","G":["$32",[]],"S":true}
+33:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
34:"$Sreact.suspense"
-36:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-38:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
-9:["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/9ffb8ddd0c9a7c31.js","async":true,"nonce":"$undefined"}]
-a:["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/c4fe728e74b52958.js","async":true,"nonce":"$undefined"}]
-b:["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/1532edb438ed84bb.js","async":true,"nonce":"$undefined"}]
-c:["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/d0d828f9a0668699.js","async":true,"nonce":"$undefined"}]
-d:["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}]
-e:["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/25c5a08661ac2ec3.js","async":true,"nonce":"$undefined"}]
-f:["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}]
-10:["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/9d6e5aad99b19216.js","async":true,"nonce":"$undefined"}]
-11:["$","script","script-24",{"src":"/litellm-asset-prefix/_next/static/chunks/e8718f949e42598e.js","async":true,"nonce":"$undefined"}]
-12:["$","script","script-25",{"src":"/litellm-asset-prefix/_next/static/chunks/6a51328383335d1e.js","async":true,"nonce":"$undefined"}]
-13:["$","script","script-26",{"src":"/litellm-asset-prefix/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]
-14:["$","script","script-27",{"src":"/litellm-asset-prefix/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}]
-15:["$","script","script-28",{"src":"/litellm-asset-prefix/_next/static/chunks/6a4eede876bb5c8f.js","async":true,"nonce":"$undefined"}]
-16:["$","script","script-29",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]
-17:["$","script","script-30",{"src":"/litellm-asset-prefix/_next/static/chunks/c7b74067c01ee971.js","async":true,"nonce":"$undefined"}]
-18:["$","script","script-31",{"src":"/litellm-asset-prefix/_next/static/chunks/a85adee4198d5478.js","async":true,"nonce":"$undefined"}]
-19:["$","script","script-32",{"src":"/litellm-asset-prefix/_next/static/chunks/bff4459534c52f16.js","async":true,"nonce":"$undefined"}]
-1a:["$","script","script-33",{"src":"/litellm-asset-prefix/_next/static/chunks/39eb5927f56ccc0e.js","async":true,"nonce":"$undefined"}]
-1b:["$","script","script-34",{"src":"/litellm-asset-prefix/_next/static/chunks/ebb2b2d8175d3d2f.js","async":true,"nonce":"$undefined"}]
-1c:["$","script","script-35",{"src":"/litellm-asset-prefix/_next/static/chunks/5a5488ab3db0c3de.js","async":true,"nonce":"$undefined"}]
-1d:["$","script","script-36",{"src":"/litellm-asset-prefix/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}]
-1e:["$","script","script-37",{"src":"/litellm-asset-prefix/_next/static/chunks/82dbdb17d57c6737.js","async":true,"nonce":"$undefined"}]
-1f:["$","script","script-38",{"src":"/litellm-asset-prefix/_next/static/chunks/b31a08272a82b84e.js","async":true,"nonce":"$undefined"}]
-20:["$","script","script-39",{"src":"/litellm-asset-prefix/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}]
-21:["$","script","script-40",{"src":"/litellm-asset-prefix/_next/static/chunks/eba9ac65320061b1.js","async":true,"nonce":"$undefined"}]
-22:["$","script","script-41",{"src":"/litellm-asset-prefix/_next/static/chunks/0eda6dc5d5f35d92.js","async":true,"nonce":"$undefined"}]
-23:["$","script","script-42",{"src":"/litellm-asset-prefix/_next/static/chunks/96aed36e606e8582.js","async":true,"nonce":"$undefined"}]
-24:["$","script","script-43",{"src":"/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","async":true,"nonce":"$undefined"}]
-25:["$","script","script-44",{"src":"/litellm-asset-prefix/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}]
-26:["$","script","script-45",{"src":"/litellm-asset-prefix/_next/static/chunks/06ebe9b0e9cdf241.js","async":true,"nonce":"$undefined"}]
-27:["$","script","script-46",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]
-28:["$","script","script-47",{"src":"/litellm-asset-prefix/_next/static/chunks/165d00848f04c4c9.js","async":true,"nonce":"$undefined"}]
-29:["$","script","script-48",{"src":"/litellm-asset-prefix/_next/static/chunks/bb0a6e4a3a18721a.js","async":true,"nonce":"$undefined"}]
-2a:["$","script","script-49",{"src":"/litellm-asset-prefix/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}]
-2b:["$","script","script-50",{"src":"/litellm-asset-prefix/_next/static/chunks/8ab6e2ca95000c8e.js","async":true,"nonce":"$undefined"}]
-2c:["$","script","script-51",{"src":"/litellm-asset-prefix/_next/static/chunks/06cdd9bb80c63794.js","async":true,"nonce":"$undefined"}]
-2d:["$","script","script-52",{"src":"/litellm-asset-prefix/_next/static/chunks/66a190706fc6c35a.js","async":true,"nonce":"$undefined"}]
-2e:["$","script","script-53",{"src":"/litellm-asset-prefix/_next/static/chunks/54e29148cb2f2582.js","async":true,"nonce":"$undefined"}]
-2f:["$","script","script-54",{"src":"/litellm-asset-prefix/_next/static/chunks/fd9de419c8c0222e.js","async":true,"nonce":"$undefined"}]
+36:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+38:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+9:["$","script","script-16",{"src":"/my-custom-path/_next/static/chunks/9ffb8ddd0c9a7c31.js","async":true,"nonce":"$undefined"}]
+a:["$","script","script-17",{"src":"/my-custom-path/_next/static/chunks/c4fe728e74b52958.js","async":true,"nonce":"$undefined"}]
+b:["$","script","script-18",{"src":"/my-custom-path/_next/static/chunks/1532edb438ed84bb.js","async":true,"nonce":"$undefined"}]
+c:["$","script","script-19",{"src":"/my-custom-path/_next/static/chunks/d0d828f9a0668699.js","async":true,"nonce":"$undefined"}]
+d:["$","script","script-20",{"src":"/my-custom-path/_next/static/chunks/88c74f8b4b20d25a.js","async":true,"nonce":"$undefined"}]
+e:["$","script","script-21",{"src":"/my-custom-path/_next/static/chunks/25c5a08661ac2ec3.js","async":true,"nonce":"$undefined"}]
+f:["$","script","script-22",{"src":"/my-custom-path/_next/static/chunks/134f728fa7099e3e.js","async":true,"nonce":"$undefined"}]
+10:["$","script","script-23",{"src":"/my-custom-path/_next/static/chunks/9d6e5aad99b19216.js","async":true,"nonce":"$undefined"}]
+11:["$","script","script-24",{"src":"/my-custom-path/_next/static/chunks/e8718f949e42598e.js","async":true,"nonce":"$undefined"}]
+12:["$","script","script-25",{"src":"/my-custom-path/_next/static/chunks/6a51328383335d1e.js","async":true,"nonce":"$undefined"}]
+13:["$","script","script-26",{"src":"/my-custom-path/_next/static/chunks/3b30ab8eaa03bc21.js","async":true,"nonce":"$undefined"}]
+14:["$","script","script-27",{"src":"/my-custom-path/_next/static/chunks/99cf9cf99df5ccfc.js","async":true,"nonce":"$undefined"}]
+15:["$","script","script-28",{"src":"/my-custom-path/_next/static/chunks/6a4eede876bb5c8f.js","async":true,"nonce":"$undefined"}]
+16:["$","script","script-29",{"src":"/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}]
+17:["$","script","script-30",{"src":"/my-custom-path/_next/static/chunks/c7b74067c01ee971.js","async":true,"nonce":"$undefined"}]
+18:["$","script","script-31",{"src":"/my-custom-path/_next/static/chunks/a85adee4198d5478.js","async":true,"nonce":"$undefined"}]
+19:["$","script","script-32",{"src":"/my-custom-path/_next/static/chunks/bff4459534c52f16.js","async":true,"nonce":"$undefined"}]
+1a:["$","script","script-33",{"src":"/my-custom-path/_next/static/chunks/39eb5927f56ccc0e.js","async":true,"nonce":"$undefined"}]
+1b:["$","script","script-34",{"src":"/my-custom-path/_next/static/chunks/ebb2b2d8175d3d2f.js","async":true,"nonce":"$undefined"}]
+1c:["$","script","script-35",{"src":"/my-custom-path/_next/static/chunks/5a5488ab3db0c3de.js","async":true,"nonce":"$undefined"}]
+1d:["$","script","script-36",{"src":"/my-custom-path/_next/static/chunks/0a65da2cd24e2ab6.js","async":true,"nonce":"$undefined"}]
+1e:["$","script","script-37",{"src":"/my-custom-path/_next/static/chunks/82dbdb17d57c6737.js","async":true,"nonce":"$undefined"}]
+1f:["$","script","script-38",{"src":"/my-custom-path/_next/static/chunks/b31a08272a82b84e.js","async":true,"nonce":"$undefined"}]
+20:["$","script","script-39",{"src":"/my-custom-path/_next/static/chunks/496b84010c33cf69.js","async":true,"nonce":"$undefined"}]
+21:["$","script","script-40",{"src":"/my-custom-path/_next/static/chunks/eba9ac65320061b1.js","async":true,"nonce":"$undefined"}]
+22:["$","script","script-41",{"src":"/my-custom-path/_next/static/chunks/0eda6dc5d5f35d92.js","async":true,"nonce":"$undefined"}]
+23:["$","script","script-42",{"src":"/my-custom-path/_next/static/chunks/96aed36e606e8582.js","async":true,"nonce":"$undefined"}]
+24:["$","script","script-43",{"src":"/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","async":true,"nonce":"$undefined"}]
+25:["$","script","script-44",{"src":"/my-custom-path/_next/static/chunks/2971c4658f1bcd7d.js","async":true,"nonce":"$undefined"}]
+26:["$","script","script-45",{"src":"/my-custom-path/_next/static/chunks/06ebe9b0e9cdf241.js","async":true,"nonce":"$undefined"}]
+27:["$","script","script-46",{"src":"/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]
+28:["$","script","script-47",{"src":"/my-custom-path/_next/static/chunks/165d00848f04c4c9.js","async":true,"nonce":"$undefined"}]
+29:["$","script","script-48",{"src":"/my-custom-path/_next/static/chunks/bb0a6e4a3a18721a.js","async":true,"nonce":"$undefined"}]
+2a:["$","script","script-49",{"src":"/my-custom-path/_next/static/chunks/4980372eaa37b78b.js","async":true,"nonce":"$undefined"}]
+2b:["$","script","script-50",{"src":"/my-custom-path/_next/static/chunks/8ab6e2ca95000c8e.js","async":true,"nonce":"$undefined"}]
+2c:["$","script","script-51",{"src":"/my-custom-path/_next/static/chunks/06cdd9bb80c63794.js","async":true,"nonce":"$undefined"}]
+2d:["$","script","script-52",{"src":"/my-custom-path/_next/static/chunks/66a190706fc6c35a.js","async":true,"nonce":"$undefined"}]
+2e:["$","script","script-53",{"src":"/my-custom-path/_next/static/chunks/54e29148cb2f2582.js","async":true,"nonce":"$undefined"}]
+2f:["$","script","script-54",{"src":"/my-custom-path/_next/static/chunks/fd9de419c8c0222e.js","async":true,"nonce":"$undefined"}]
30:["$","$L33",null,{"children":["$","$34",null,{"name":"Next.MetadataOutlet","children":"$@35"}]}]
31:["$","$1","h",{"children":[null,["$","$L36",null,{"children":"$L37"}],["$","div",null,{"hidden":true,"children":["$","$L38",null,{"children":["$","$34",null,{"name":"Next.Metadata","children":"$L39"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]
7:{}
8:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
37:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
-3a:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+3a:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
35:null
39:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L3a","4",{}]]
diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt
index c38954c59a7..a56d6459359 100644
--- a/litellm/proxy/_experimental/out/__next._head.txt
+++ b/litellm/proxy/_experimental/out/__next._head.txt
@@ -1,6 +1,6 @@
1:"$Sreact.fragment"
-2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+2:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+3:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
-5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+5:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt
index 6eba887c4de..4658e20bb47 100644
--- a/litellm/proxy/_experimental/out/__next._index.txt
+++ b/litellm/proxy/_experimental/out/__next._index.txt
@@ -1,7 +1,7 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt
index c8f37f85225..5ab13701846 100644
--- a/litellm/proxy/_experimental/out/__next._tree.txt
+++ b/litellm/proxy/_experimental/out/__next._tree.txt
@@ -1,5 +1,5 @@
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
-:HL["/litellm-asset-prefix/_next/static/chunks/3f3fa56b5786d58c.css","style"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+:HL["/my-custom-path/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
+:HL["/my-custom-path/_next/static/chunks/3f3fa56b5786d58c.css","style"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
diff --git a/litellm/proxy/_experimental/out/_next/static/U_YrOOnSehrpkdU42KJ-W/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/U_YrOOnSehrpkdU42KJ-W/_buildManifest.js
index d74e1661bbe..843dac8bbc8 100644
--- a/litellm/proxy/_experimental/out/_next/static/U_YrOOnSehrpkdU42KJ-W/_buildManifest.js
+++ b/litellm/proxy/_experimental/out/_next/static/U_YrOOnSehrpkdU42KJ-W/_buildManifest.js
@@ -3,7 +3,7 @@ self.__BUILD_MANIFEST = {
"afterFiles": [],
"beforeFiles": [
{
- "source": "/litellm-asset-prefix/_next/:path+",
+ "source": "/my-custom-path/_next/:path+",
"destination": "/_next/:path+"
}
],
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3c2ca15676e24eab.js b/litellm/proxy/_experimental/out/_next/static/chunks/3c2ca15676e24eab.js
index 118408d2ad3..41ebcac0cd8 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3c2ca15676e24eab.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/3c2ca15676e24eab.js
@@ -102,4 +102,4 @@
${u}${d}topRight
`]:{animationName:i.slideDownOut},"&-hidden":{display:"none"},[o]:Object.assign(Object.assign({},l(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},t.textEllipsis),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${o}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},l(e)),{color:e.colorTextDisabled})}),[`${f}:has(+ ${f})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${f}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,i.initSlideMotion)(e,"slide-up"),(0,i.initSlideMotion)(e,"slide-down"),(0,a.initMoveMotion)(e,"move-up"),(0,a.initMoveMotion)(e,"move-down")]})(e),{[`${n}-rtl`]:{direction:"rtl"}},(0,r.genCompactItemStyle)(e,{borderElCls:`${n}-selector`,focusElCls:`${n}-focused`})]})(v),{[v.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},{"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},d(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),f(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),f(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})}),{"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},p(v,{bg:v.colorFillTertiary,hoverBg:v.colorFillSecondary,activeBorderColor:v.activeBorderColor,color:v.colorText})),m(v,{status:"error",bg:v.colorErrorBg,hoverBg:v.colorErrorBgHover,activeBorderColor:v.colorError,color:v.colorError})),m(v,{status:"warning",bg:v.colorWarningBg,hoverBg:v.colorWarningBgHover,activeBorderColor:v.colorWarning,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{borderColor:v.colorBorder,background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.colorBgContainer,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.colorSplit}`}})}),{"&-borderless":{[`${v.componentCls}-selector`]:{background:"transparent",border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} transparent`},[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`},[`&${v.componentCls}-status-error`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorError}},[`&${v.componentCls}-status-warning`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorWarning}}}}),{"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},h(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),g(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),g(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})})}]},e=>{let{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:s,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:y,colorPrimary:b,controlOutline:w}=e,$=2*l,C=2*n,E=Math.min(o-$,o-C),S=Math.min(a-$,a-C),x=Math.min(i-$,i-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(o-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:i,multipleItemBg:h,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:S,multipleItemHeightLG:x,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:y,activeBorderColor:b,activeOutlineColor:w,selectAffixPadding:l}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});e.s(["default",0,v],950302)},729151,e=>{"use strict";var t=e.i(271645),r=e.i(121229),n=e.i(726289),o=e.i(864517),a=e.i(247153),i=e.i(739295),l=e.i(38953);function s({suffixIcon:e,clearIcon:s,menuItemSelectedIcon:c,removeIcon:u,loading:d,multiple:f,hasFeedback:p,prefixCls:m,showSuffixIcon:h,feedbackIcon:g,showArrow:v,componentName:y}){let b=null!=s?s:t.createElement(n.default,null),w=r=>null!==e||p||v?t.createElement(t.Fragment,null,!1!==h&&r,p&&g):null,$=null;if(void 0!==e)$=w(e);else if(d)$=w(t.createElement(i.default,{spin:!0}));else{let e=`${m}-suffix`;$=({open:r,showSearch:n})=>r&&n?w(t.createElement(l.default,{className:e})):w(t.createElement(a.default,{className:e}))}let C=null;C=void 0!==c?c:f?t.createElement(r.default,null):null;return{clearIcon:b,suffixIcon:$,itemIcon:C,removeIcon:void 0!==u?u:t.createElement(o.default,null)}}e.s(["default",()=>s])},327494,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(123829),o=e.i(955492),a=e.i(869301),i=e.i(529681),l=e.i(122767),s=e.i(613541),c=e.i(805484),u=e.i(52956),d=e.i(242064),f=e.i(721132),p=e.i(937328),m=e.i(321883),h=e.i(517455),g=e.i(62139),v=e.i(792812),y=e.i(249616),b=e.i(104458),w=e.i(85566),$=e.i(950302),C=e.i(729151),E=e.i(617206),S=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let x="SECRET_COMBOBOX_MODE_DO_NOT_USE",j=t.forwardRef((e,o)=>{var a,c,j,k,O,T,F,_;let I,{prefixCls:P,bordered:N,className:R,rootClassName:M,getPopupContainer:B,popupClassName:A,dropdownClassName:z,listHeight:L=256,placement:H,listItemHeight:D,size:V,disabled:W,notFoundContent:G,status:U,builtinPlacements:q,dropdownMatchSelectWidth:J,popupMatchSelectWidth:K,direction:X,style:Y,allowClear:Z,variant:Q,dropdownStyle:ee,transitionName:et,tagRender:er,maxCount:en,prefix:eo,dropdownRender:ea,popupRender:ei,onDropdownVisibleChange:el,onOpenChange:es,styles:ec,classNames:eu}=e,ed=S(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:ef,getPrefixCls:ep,renderEmpty:em,direction:eh,virtual:eg,popupMatchSelectWidth:ev,popupOverflow:ey}=t.useContext(d.ConfigContext),{showSearch:eb,style:ew,styles:e$,className:eC,classNames:eE}=(0,d.useComponentConfig)("select"),[,eS]=(0,b.useToken)(),ex=null!=D?D:null==eS?void 0:eS.controlHeight,ej=ep("select",P),ek=ep(),eO=null!=X?X:eh,{compactSize:eT,compactItemClassnames:eF}=(0,y.useCompactItemContext)(ej,eO),[e_,eI]=(0,v.default)("select",Q,N),eP=(0,m.default)(ej),[eN,eR,eM]=(0,$.default)(ej,eP),eB=t.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===x?"combobox":t},[e.mode]),eA="multiple"===eB||"tags"===eB,ez=(T=e.suffixIcon,void 0!==(F=e.showArrow)?F:null!==T),eL=null!=(a=null!=K?K:J)?a:ev,eH=(null==(c=null==ec?void 0:ec.popup)?void 0:c.root)||(null==(j=e$.popup)?void 0:j.root)||ee,eD=(_=ei||ea,t.default.useMemo(()=>{if(_)return(...e)=>t.default.createElement(E.default,{space:!0},_.apply(void 0,e))},[_])),{status:eV,hasFeedback:eW,isFormItemInput:eG,feedbackIcon:eU}=t.useContext(g.FormItemInputContext),eq=(0,u.getMergedStatus)(eV,U);I=void 0!==G?G:"combobox"===eB?null:(null==em?void 0:em("Select"))||t.createElement(f.default,{componentName:"Select"});let{suffixIcon:eJ,itemIcon:eK,removeIcon:eX,clearIcon:eY}=(0,C.default)(Object.assign(Object.assign({},ed),{multiple:eA,hasFeedback:eW,feedbackIcon:eU,showSuffixIcon:ez,prefixCls:ej,componentName:"Select"})),eZ=(0,i.default)(ed,["suffixIcon","itemIcon"]),eQ=(0,r.default)((null==(k=null==eu?void 0:eu.popup)?void 0:k.root)||(null==(O=null==eE?void 0:eE.popup)?void 0:O.root)||A||z,{[`${ej}-dropdown-${eO}`]:"rtl"===eO},M,eE.root,null==eu?void 0:eu.root,eM,eP,eR),e0=(0,h.default)(e=>{var t;return null!=(t=null!=V?V:eT)?t:e}),e1=t.useContext(p.default),e2=(0,r.default)({[`${ej}-lg`]:"large"===e0,[`${ej}-sm`]:"small"===e0,[`${ej}-rtl`]:"rtl"===eO,[`${ej}-${e_}`]:eI,[`${ej}-in-form-item`]:eG},(0,u.getStatusClassNames)(ej,eq,eW),eF,eC,R,eE.root,null==eu?void 0:eu.root,M,eM,eP,eR),e4=t.useMemo(()=>void 0!==H?H:"rtl"===eO?"bottomRight":"bottomLeft",[H,eO]),[e6]=(0,l.useZIndex)("SelectLike",null==eH?void 0:eH.zIndex);return eN(t.createElement(n.default,Object.assign({ref:o,virtual:eg,showSearch:eb},eZ,{style:Object.assign(Object.assign(Object.assign(Object.assign({},e$.root),null==ec?void 0:ec.root),ew),Y),dropdownMatchSelectWidth:eL,transitionName:(0,s.getTransitionName)(ek,"slide-up",et),builtinPlacements:(0,w.default)(q,ey),listHeight:L,listItemHeight:ex,mode:eB,prefixCls:ej,placement:e4,direction:eO,prefix:eo,suffixIcon:eJ,menuItemSelectedIcon:eK,removeIcon:eX,allowClear:!0===Z?{clearIcon:eY}:Z,notFoundContent:I,className:e2,getPopupContainer:B||ef,dropdownClassName:eQ,disabled:null!=W?W:e1,dropdownStyle:Object.assign(Object.assign({},eH),{zIndex:e6}),maxCount:eA?en:void 0,tagRender:eA?er:void 0,dropdownRender:eD,onDropdownVisibleChange:es||el})))}),k=(0,c.default)(j,"dropdownAlign");j.SECRET_COMBOBOX_MODE_DO_NOT_USE=x,j.Option=a.Option,j.OptGroup=o.OptGroup,j._InternalPanelDoNotUseOrYouWillBeFired=k,e.s(["default",0,j],327494)},199133,e=>{"use strict";var t=e.i(327494);e.s(["Select",()=>t.default])},689074,21243,98801,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let n=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"}))};e.s(["default",()=>n],689074);let o=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z"}))};e.s(["default",()=>o],21243);let a=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457ZM14.7577 16.1718L13.2937 14.7078C12.902 14.8952 12.4634 15.0002 12.0003 15.0002C10.3434 15.0002 9.00026 13.657 9.00026 12.0002C9.00026 11.537 9.10522 11.0984 9.29263 10.7067L7.82866 9.24277C7.30514 10.0332 7.00026 10.9811 7.00026 12.0002C7.00026 14.7616 9.23884 17.0002 12.0003 17.0002C13.0193 17.0002 13.9672 16.6953 14.7577 16.1718ZM7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925L16.947 12.7327C16.9821 12.4936 17.0003 12.249 17.0003 12.0002C17.0003 9.23873 14.7617 7.00016 12.0003 7.00016C11.7514 7.00016 11.5068 7.01833 11.2677 7.05343L7.97446 3.76015Z"}))};e.s(["default",()=>a],98801)},103471,e=>{"use strict";var t=e.i(444755),r=e.i(271645);let n=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(n).join(""):"object"==typeof e&&e?n(e.props.children):void 0;function o(e){let t=new Map;return r.default.Children.map(e,e=>{var r;t.set(e.props.value,null!=(r=n(e))?r:e.props.value)}),t}function a(e,t){return r.default.Children.map(t,t=>{var r;if((null!=(r=n(t))?r:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=(e,r,n=!1)=>(0,t.tremorTwMerge)(r?"bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle":"bg-tremor-background dark:bg-dark-tremor-background",!r&&"hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted",e?"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis":"text-tremor-content dark:text-dark-tremor-content",r&&"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",n&&"text-red-500 placeholder:text-red-500 dark:text-red-500 dark:placeholder:text-red-500",n?"border-red-500 dark:border-red-500":"border-tremor-border dark:border-dark-tremor-border");function l(e){return null!=e&&""!==e}e.s(["constructValueToNameMapping",()=>o,"getFilteredOptions",()=>a,"getNodeText",()=>n,"getSelectButtonColors",()=>i,"hasValue",()=>l])},779241,677955,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(673706),o=e.i(689074),a=e.i(21243),i=e.i(98801),l=e.i(103471),s=e.i(444755);let c=r.default.forwardRef((e,c)=>{let{value:u,defaultValue:d,type:f,placeholder:p="Type...",icon:m,error:h=!1,errorMessage:g,disabled:v=!1,stepper:y,makeInputClassName:b,className:w,onChange:$,onValueChange:C,autoFocus:E,pattern:S}=e,x=(0,t.__rest)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus","pattern"]),[j,k]=(0,r.useState)(E||!1),[O,T]=(0,r.useState)(!1),F=(0,r.useCallback)(()=>T(!O),[O,T]),_=(0,r.useRef)(null),I=(0,l.hasValue)(u||d);return r.default.useEffect(()=>{let e=()=>k(!0),t=()=>k(!1),r=_.current;return r&&(r.addEventListener("focus",e),r.addEventListener("blur",t),E&&r.focus()),()=>{r&&(r.removeEventListener("focus",e),r.removeEventListener("blur",t))}},[E]),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:(0,s.tremorTwMerge)(b("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100 border","shadow-tremor-input","dark:shadow-dark-tremor-input",(0,l.getSelectButtonColors)(I,v,h),j&&(0,s.tremorTwMerge)("ring-2","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),w)},m?r.default.createElement(m,{className:(0,s.tremorTwMerge)(b("icon"),"shrink-0 h-5 w-5 mx-2.5 absolute left-0 flex items-center","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}):null,r.default.createElement("input",Object.assign({ref:(0,n.mergeRefs)([_,c]),defaultValue:d,value:u,type:O?"text":f,className:(0,s.tremorTwMerge)(b("input"),"w-full bg-transparent focus:outline-none focus:ring-0 border-none text-tremor-default rounded-tremor-default transition duration-100 py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","password"===f?h?"pr-16":"pr-12":h?"pr-8":"pr-3",m?"pl-10":"pl-3",v?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content"),placeholder:p,disabled:v,"data-testid":"base-input",onChange:e=>{null==$||$(e),null==C||C(e.target.value)},pattern:S},x)),"password"!==f||v?null:r.default.createElement("button",{className:(0,s.tremorTwMerge)(b("toggleButton"),"absolute inset-y-0 right-0 flex items-center px-2.5 rounded-lg"),type:"button",onClick:()=>F(),"aria-label":O?"Hide password":"Show Password"},O?r.default.createElement(i.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0}):r.default.createElement(a.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0})),h?r.default.createElement(o.default,{className:(0,s.tremorTwMerge)(b("errorIcon"),"text-red-500 shrink-0 h-5 w-5 absolute right-0 flex items-center","password"===f?"mr-10":"number"===f?y?"mr-20":"mr-3":"mx-2.5")}):null,null!=y?y:null),h&&g?r.default.createElement("p",{className:(0,s.tremorTwMerge)(b("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});c.displayName="BaseInput",e.s(["default",()=>c],677955);let u=(0,n.makeClassName)("TextInput"),d=r.default.forwardRef((e,n)=>{let{type:o="text"}=e,a=(0,t.__rest)(e,["type"]);return r.default.createElement(c,Object.assign({ref:n,type:o,makeInputClassName:u},a))});d.displayName="TextInput",e.s(["TextInput",()=>d],779241)},122550,e=>{"use strict";function t(e,t){return e.length>t?e.substring(0,t)+"...":e}e.s(["formItemValidateJSON",0,(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}},"formatLabel",0,e=>e?e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):e,"truncateString",()=>t])},764205,82946,e=>{"use strict";e.s(["PredictedSpendLogsCall",()=>tS,"addAllowedIP",()=>eM,"adminGlobalActivity",()=>eZ,"adminGlobalActivityExceptions",()=>e1,"adminGlobalActivityExceptionsPerDeployment",()=>e2,"adminGlobalActivityPerModel",()=>e0,"adminGlobalCacheActivity",()=>eQ,"adminSpendLogsCall",()=>eJ,"adminTopEndUsersCall",()=>eX,"adminTopKeysCall",()=>eK,"adminTopModelsCall",()=>e4,"adminspendByProvider",()=>eY,"agentDailyActivityCall",()=>eC,"agentHubPublicModelsCall",()=>eI,"alertingSettingsCall",()=>X,"allEndUsersCall",()=>eW,"allTagNamesCall",()=>eV,"applyGuardrail",()=>nv,"availableTeamListCall",()=>ec,"budgetCreateCall",()=>U,"budgetDeleteCall",()=>G,"budgetUpdateCall",()=>q,"buildMcpOAuthAuthorizeUrl",()=>nP,"cacheTemporaryMcpServer",()=>n_,"cachingHealthCheckCall",()=>tG,"callMCPTool",()=>rq,"cancelModelCostMapReload",()=>L,"checkEuAiActCompliance",()=>n1,"checkGdprCompliance",()=>n2,"claimOnboardingToken",()=>ex,"convertPromptFileToJson",()=>rS,"createAgentCall",()=>rj,"createGuardrailCall",()=>rk,"createMCPServer",()=>rM,"createPassThroughEndpoint",()=>tA,"createPolicyAttachmentCall",()=>rf,"createPolicyCall",()=>ro,"createPolicyVersion",()=>rl,"createPromptCall",()=>r$,"createSearchTool",()=>rH,"credentialCreateCall",()=>ti,"credentialDeleteCall",()=>tc,"credentialGetCall",()=>ts,"credentialListCall",()=>tl,"credentialUpdateCall",()=>tu,"customerDailyActivityCall",()=>e$,"defaultProxyBaseUrl",()=>w,"deleteAgentCall",()=>nn,"deleteAllowedIP",()=>eB,"deleteCallback",()=>nk,"deleteClaudeCodePlugin",()=>n0,"deleteConfigFieldSetting",()=>tL,"deleteGuardrailCall",()=>nl,"deleteMCPServer",()=>rA,"deletePassThroughEndpointsCall",()=>tH,"deletePolicyAttachmentCall",()=>rp,"deletePolicyCall",()=>rc,"deletePromptCall",()=>rE,"deleteSearchTool",()=>rV,"deriveErrorMessage",()=>nW,"disableClaudeCodePlugin",()=>nQ,"enableClaudeCodePlugin",()=>nZ,"enrichPolicyTemplate",()=>t8,"enrichPolicyTemplateStream",()=>rr,"estimateAttachmentImpactCall",()=>rv,"exchangeMcpOAuthToken",()=>nN,"fetchAvailableSearchProviders",()=>rW,"fetchDiscoverableMCPServers",()=>r_,"fetchMCPAccessGroups",()=>rN,"fetchMCPClientIp",()=>rR,"fetchMCPServerHealth",()=>rP,"fetchMCPServers",()=>rI,"fetchSearchToolById",()=>rL,"fetchSearchTools",()=>rz,"fetchToolsList",()=>n4,"formatDate",()=>v,"getAgentCreateMetadata",()=>T,"getAgentInfo",()=>np,"getAgentsList",()=>nf,"getAllowedIPs",()=>eR,"getBudgetList",()=>tk,"getBudgetSettings",()=>tO,"getCacheSettingsCall",()=>tI,"getCallbackConfigsCall",()=>y,"getCallbacksCall",()=>tT,"getCategoryYaml",()=>nu,"getClaudeCodeMarketplace",()=>nJ,"getClaudeCodePluginDetails",()=>nX,"getClaudeCodePluginsList",()=>nK,"getConfigFieldSetting",()=>tM,"getDefaultTeamSettings",()=>rQ,"getEmailEventSettings",()=>ne,"getGeneralSettingsCall",()=>tF,"getGlobalLitellmHeaderName",()=>I,"getGuardrailInfo",()=>nm,"getGuardrailProviderSpecificParams",()=>nc,"getGuardrailUISettings",()=>ns,"getGuardrailsList",()=>t0,"getGuardrailsUsageDetail",()=>t2,"getGuardrailsUsageLogs",()=>t4,"getGuardrailsUsageOverview",()=>t1,"getInProductNudgesCall",()=>b,"getInternalUserSettings",()=>rT,"getLicenseInfo",()=>nS,"getMCPSemanticFilterSettings",()=>tY,"getMajorAirlines",()=>nd,"getModelCostMapReloadStatus",()=>D,"getModelCostMapSource",()=>H,"getOnboardingCredentials",()=>eS,"getOpenAPISchema",()=>M,"getPassThroughEndpointInfo",()=>nj,"getPassThroughEndpointsCall",()=>tR,"getPoliciesList",()=>t3,"getPoliciesUsageOverview",()=>t6,"getPolicyAttachmentsList",()=>rd,"getPolicyInfo",()=>ru,"getPolicyInfoWithGuardrails",()=>t5,"getPolicyTemplates",()=>t9,"getPossibleUserRoles",()=>to,"getPromptInfo",()=>rb,"getPromptVersions",()=>rw,"getPromptsList",()=>ry,"getProviderCreateMetadata",()=>O,"getProxyBaseUrl",()=>E,"getProxyUISettings",()=>tJ,"getPublicModelHubInfo",()=>R,"getRemainingUsers",()=>nE,"getResolvedGuardrails",()=>rh,"getRouterSettingsCall",()=>t_,"getSSOSettings",()=>nw,"getTeamPermissionsCall",()=>r1,"getTotalSpendCall",()=>eE,"getUISettings",()=>tK,"getUiConfig",()=>N,"getUiSettings",()=>nU,"handleError",()=>k,"healthCheckCall",()=>tV,"healthCheckHistoryCall",()=>tU,"individualModelHealthCheckCall",()=>tW,"invitationClaimCall",()=>K,"invitationCreateCall",()=>J,"keyAliasesCall",()=>e9,"keyCreateCall",()=>Z,"keyCreateForAgentCall",()=>Q,"keyCreateServiceAccountCall",()=>Y,"keyDeleteCall",()=>et,"keyInfoCall",()=>e6,"keyInfoV1Call",()=>e7,"keyListCall",()=>e5,"keySpendLogsCall",()=>eL,"keyUpdateCall",()=>td,"latestHealthChecksCall",()=>tq,"listMCPTools",()=>rU,"listPolicyVersions",()=>ri,"loginCall",()=>nG,"makeAgentPublicCall",()=>no,"makeAgentsPublicCall",()=>na,"makeMCPPublicCall",()=>ni,"makeModelGroupPublic",()=>P,"mcpHubPublicServersCall",()=>eP,"mcpToolsCall",()=>nO,"modelAvailableCall",()=>ez,"modelCostMap",()=>B,"modelCreateCall",()=>V,"modelDeleteCall",()=>W,"modelHubCall",()=>eN,"modelHubPublicModelsCall",()=>e_,"modelInfoCall",()=>eT,"modelInfoV1Call",()=>eF,"modelPatchUpdateCall",()=>tp,"modelUpdateCall",()=>tm,"organizationCreateCall",()=>ef,"organizationDailyActivityCall",()=>ew,"organizationDeleteCall",()=>em,"organizationInfoCall",()=>ed,"organizationListCall",()=>eu,"organizationMemberAddCall",()=>tb,"organizationMemberDeleteCall",()=>tw,"organizationMemberUpdateCall",()=>t$,"organizationUpdateCall",()=>ep,"patchAgentCall",()=>nh,"patchPromptCall",()=>rx,"perUserAnalyticsCall",()=>nV,"proxyBaseUrl",()=>C,"ragIngestCall",()=>r8,"regenerateKeyCall",()=>ej,"registerClaudeCodePlugin",()=>nY,"registerMcpOAuthClient",()=>nI,"reloadModelCostMap",()=>A,"resetEmailEventSettings",()=>nr,"resolvePoliciesCall",()=>rg,"scheduleModelCostMapReload",()=>z,"searchToolQueryCall",()=>nM,"serverRootPath",()=>$,"serviceHealthCheck",()=>tj,"sessionSpendLogsCall",()=>r4,"setCallbacksCall",()=>tD,"setGlobalLitellmHeaderName",()=>_,"slackBudgetAlertsHealthCheck",()=>tx,"spendUsersCall",()=>e8,"suggestPolicyTemplates",()=>re,"tagCreateCall",()=>rJ,"tagDailyActivityCall",()=>ey,"tagDauCall",()=>nA,"tagDeleteCall",()=>rZ,"tagDistinctCall",()=>nH,"tagInfoCall",()=>rX,"tagListCall",()=>rY,"tagMauCall",()=>nL,"tagUpdateCall",()=>rK,"tagWauCall",()=>nz,"tagsSpendLogsCall",()=>eD,"teamBulkMemberAddCall",()=>tg,"teamCreateCall",()=>ta,"teamDailyActivityCall",()=>eb,"teamDeleteCall",()=>en,"teamInfoCall",()=>ei,"teamListCall",()=>es,"teamMemberAddCall",()=>th,"teamMemberDeleteCall",()=>ty,"teamMemberUpdateCall",()=>tv,"teamPermissionsUpdateCall",()=>r2,"teamSpendLogsCall",()=>eH,"teamUpdateCall",()=>tf,"testCacheConnectionCall",()=>tP,"testConnectionRequest",()=>e3,"testCustomCodeGuardrail",()=>ny,"testMCPConnectionRequest",()=>nT,"testMCPSemanticFilter",()=>tQ,"testMCPToolsListRequest",()=>nF,"testPipelineCall",()=>rm,"testPoliciesAndGuardrails",()=>t7,"testPolicyTemplate",()=>rt,"testSearchToolConnection",()=>rG,"transformRequestCall",()=>eh,"uiAuditLogsCall",()=>nC,"uiSpendLogDetailsCall",()=>rO,"uiSpendLogsCall",()=>eq,"updateCacheSettingsCall",()=>tN,"updateConfigFieldSetting",()=>tz,"updateDefaultTeamSettings",()=>r0,"updateEmailEventSettings",()=>nt,"updateGuardrailCall",()=>ng,"updateInternalUserSettings",()=>rF,"updateMCPSemanticFilterSettings",()=>tZ,"updateMCPServer",()=>rB,"updatePassThroughEndpoint",()=>nx,"updatePassThroughFieldSetting",()=>tB,"updatePolicyCall",()=>ra,"updatePolicyVersionStatus",()=>rs,"updatePromptCall",()=>rC,"updateSSOSettings",()=>n$,"updateSearchTool",()=>rD,"updateToolPolicy",()=>n6,"updateUISettings",()=>tX,"updateUiSettings",()=>nq,"updateUsefulLinksCall",()=>eA,"usageAiChatStream",()=>rn,"userAgentAnalyticsCall",()=>nB,"userAgentSummaryCall",()=>nD,"userBulkUpdateUserCall",()=>tE,"userCreateCall",()=>ee,"userDailyActivityAggregatedCall",()=>tr,"userDailyActivityCall",()=>ev,"userDeleteCall",()=>er,"userFilterUICall",()=>eG,"userGetAllUsersCall",()=>tn,"userGetRequesedtModelsCall",()=>tt,"userInfoCall",()=>ea,"userListCall",()=>eo,"userRequestModelCall",()=>te,"userSpendLogsCall",()=>eU,"userUpdateUserCall",()=>tC,"v2TeamListCall",()=>el,"validateBlockedWordsFile",()=>nb,"vectorStoreCreateCall",()=>r6,"vectorStoreDeleteCall",()=>r7,"vectorStoreInfoCall",()=>r5,"vectorStoreListCall",()=>r3,"vectorStoreSearchCall",()=>nR,"vectorStoreUpdateCall",()=>r9],764205),e.i(247167);var t=e.i(998573),r=e.i(268004);e.s(["default",()=>h,"jsonFields",()=>p],82946);var n=e.i(843476),o=e.i(271645),a=e.i(808613),i=e.i(311451),l=e.i(28651),s=e.i(199133),c=e.i(779241),u=e.i(827252),d=e.i(592968),f=e.i(122550);let p=["metadata","config","enforced_params","aliases"],m=(e,t)=>p.includes(e)||"json"===t.format,h=({schemaComponent:e,excludedFields:t=[],form:r,overrideLabels:p={},overrideTooltips:h={},customValidation:g={},defaultValues:v={}})=>{let[y,b]=(0,o.useState)(null),[w,$]=(0,o.useState)(null);return((0,o.useEffect)(()=>{(async()=>{try{let n=(await M()).components.schemas[e];if(!n)throw Error(`Schema component "${e}" not found`);b(n);let o={};Object.keys(n.properties).filter(e=>!t.includes(e)&&void 0!==v[e]).forEach(e=>{o[e]=v[e]}),r.setFieldsValue(o)}catch(e){console.error("Schema fetch error:",e),$(e instanceof Error?e.message:"Failed to fetch schema")}})()},[e,r,t]),w)?(0,n.jsxs)("div",{className:"text-red-500",children:["Error: ",w]}):y?.properties?(0,n.jsx)("div",{children:Object.entries(y.properties).filter(([e])=>!t.includes(e)).map(([e,t])=>{let r,o,b,w,$,C,E,S;return o=(e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"})(t),b=y?.required?.includes(e),w=p[e]||t.title||(0,f.formatLabel)(e),$=h[e]||t.description,C=[],b&&C.push({required:!0,message:`${w} is required`}),g[e]&&C.push({validator:g[e]}),m(e,t)&&C.push({validator:async(e,t)=>{if(t&&!(e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch{return!1}})(t))throw Error("Please enter valid JSON")}}),E=$?(0,n.jsxs)("span",{children:[w," ",(0,n.jsx)(d.Tooltip,{title:$,children:(0,n.jsx)(u.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}):w,r=m(e,t)?(0,n.jsx)(i.Input.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,n.jsx)(s.Select,{children:t.enum.map(e=>(0,n.jsx)(s.Select.Option,{value:e,children:e},e))}):"number"===o||"integer"===o?(0,n.jsx)(l.InputNumber,{style:{width:"100%"},precision:"integer"===o?0:void 0}):"duration"===e?(0,n.jsx)(c.TextInput,{placeholder:"eg: 30s, 30h, 30d"}):(0,n.jsx)(c.TextInput,{placeholder:$||""}),(0,n.jsx)(a.Form.Item,{label:E,name:e,className:"mt-8",rules:C,initialValue:v[e],help:(0,n.jsx)("div",{className:"text-xs text-gray-500",children:(S=({max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"})[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[o]||"Text input",m(e,t)?`${S}
Must be valid JSON format`:t.enum?`Select from available options
-Allowed values: ${t.enum.join(", ")}`:S)}),children:r},e)})}):null};var g=e.i(727749);let v=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`},y=async e=>{try{let t=C?`${C}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},b=async e=>{try{let t=C?`${C}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},w=null,$="/",C=null;console.log=function(){};let E=()=>{if(C)return C;let e=window.location;return e?.origin??""},S="POST",x="DELETE",j=0,k=async e=>{let t=Date.now();if(t-j>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){g.default.info("UI Session Expired. Logging out."),j=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}j=t}else console.log("Error suppressed to prevent spam:",e)},O=async()=>{let e=C?`${C}/public/providers/fields`:"/public/providers/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch provider create metadata:",t.status,e),Error("Failed to load provider configuration")}return await t.json()},T=async()=>{let e=C?`${C}/public/agents/fields`:"/public/agents/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch agent create metadata:",t.status,e),Error("Failed to load agent configuration")}return await t.json()},F="Authorization";function _(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),F=e}function I(){return F}let P=async(e,t)=>{let r=C?`${C}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},N=async()=>{console.log("Getting UI config");let e=await fetch("/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),((e,t=null)=>{let r=window.location,n=r?.origin??null,o=t||n;if(console.log("proxyBaseUrl:",C),console.log("serverRootPath:",e),!o)return console.log("Updated proxyBaseUrl:",C=C??null);e.length>0&&!o.endsWith(e)&&"/"!=e&&(o+=e),console.log("Updated proxyBaseUrl:",C=o)})(t.server_root_path,t.proxy_base_url),t},R=async()=>{let e=C?`${C}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},M=async()=>{let e=C?`${C}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},B=async()=>{try{let e=C?`${C}/public/litellm_model_cost_map`:"/public/litellm_model_cost_map",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await t.json();return console.log(`received litellm model cost data: ${r}`),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},A=async e=>{try{let t=C?`${C}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to reload model cost map:",e),e}},z=async(e,t)=>{try{let r=C?`${C}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await n.json();return console.log(`Schedule model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},L=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Cancel model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},H=async e=>{try{let t=C?`${C}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map source info:",n),n}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},D=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload/status`:"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){console.error(`Status request failed with status: ${r.status}`);let e=await r.text();throw console.error("Error response:",e),Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map reload status:",n),n}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},V=async(e,r)=>{try{let n=C?`${C}/model/new`:"/model/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),t.message.destroy(),g.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},W=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=C?`${C}/model/delete`:"/model/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=C?`${C}/budget/delete`:"/budget/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},U=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/new`:"/budget/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/update`:"/budget/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{let r=C?`${C}/invitation/new`:"/invitation/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/invitation/claim`:"/invitation/claim",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},X=async e=>{try{let t=C?`${C}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Y=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),p))if(t[e]){console.log(`formValues.${e}:`,t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",t);let r=C?`${C}/key/service-account/generate`:"/key/service-account/generate",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},Z=async(e,t,r)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),p))if(r[e]){console.log(`formValues.${e}:`,r[e]);try{r[e]=JSON.parse(r[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",r);let n=C?`${C}/key/generate`:"/key/generate",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t,r,n)=>{let o=C?`${C}/key/generate`:"/key/generate",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_id:t,key_alias:r,models:n.length>0?n:[]})});if(!a.ok)throw k(await a.text()),Error("Failed to create key for agent");return a.json()},ee=async(e,t,r)=>{try{if(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),r.auto_create_key=!1,r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",r);let n=C?`${C}/user/new`:"/user/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t)=>{try{let r=C?`${C}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},er=async(e,t)=>{try{let r=C?`${C}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete user(s):",e),e}},en=async(e,t)=>{try{let r=C?`${C}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},eo=async(e,t=null,r=null,n=null,o=null,a=null,i=null,l=null,s=null,c=null)=>{try{let u=C?`${C}/user/list`:"/user/list";console.log("in userListCall");let d=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");d.append("user_ids",e)}r&&d.append("page",r.toString()),n&&d.append("page_size",n.toString()),o&&d.append("user_email",o),a&&d.append("role",a),i&&d.append("team",i),l&&d.append("sso_user_ids",l),s&&d.append("sort_by",s),c&&d.append("sort_order",c);let f=d.toString();f&&(u+=`?${f}`);let p=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!p.ok){let e=await p.json(),t=nW(e);throw k(t),Error(t)}let m=await p.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},ea=async(e,t,r,n=!1,o,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${n}, ${o}, ${a}, ${i}`);try{let l;if(n){l=C?`${C}/user/list`:"/user/list";let e=new URLSearchParams;null!=o&&e.append("page",o.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=C?`${C}/user/info`:"/user/info",("Admin"!==r&&"Admin Viewer"!==r||i)&&t&&(l+=`?user_id=${t}`);console.log("Requesting user data from:",l);let s=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to fetch user data:",e),e}},ei=async(e,t)=>{try{let r=C?`${C}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t,r=null,n=null,o=null,a=1,i=10,l=null,s=null)=>{try{let a=C?`${C}/v2/team/list`:"/v2/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},es=async(e,t,r=null,n=null,o=null)=>{try{let a=C?`${C}/team/list`:"/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ec=async e=>{try{let t=C?`${C}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/team/available_teams API Response:",n),n}catch(e){throw e}},eu=async(e,t=null,r=null)=>{try{let n=C?`${C}/organization/list`:"/organization/list",o=new URLSearchParams;t&&o.append("org_id",t.toString()),r&&o.append("org_alias",r.toString());let a=o.toString();a&&(n+=`?${a}`);let i=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},ed=async(e,t)=>{try{let r=C?`${C}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ef=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let r=C?`${C}/organization/new`:"/organization/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=C?`${C}/organization/update`:"/organization/update",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=C?`${C}/organization/delete`:"/organization/delete",n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!n.ok){let e=await n.text();throw k(e),Error(`Error deleting organization: ${e}`)}return await n.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},eh=async(e,t)=>{try{let r=C?`${C}/utils/transform_request`:"/utils/transform_request",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eg=async({accessToken:e,endpoint:t,startTime:r,endTime:n,page:o=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=C?`${C}${i}`:i,(s=new URLSearchParams).append("start_date",v(r)),s.append("end_date",v(n)),s.append("page_size","1000"),s.append("page",o.toString()),s.append("timezone",new Date().getTimezoneOffset().toString()),a&&Object.entries(a).forEach(([e,t])=>{((e,t,r)=>{if(null!=r){if(Array.isArray(r)){r.length>0&&e.append(t,r.join(","));return}e.append(t,`${r}`)}})(s,e,t)}),(c=s.toString())?`${l}?${c}`:l),d=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=nW(e);throw k(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ev=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{user_id:o}}),ey=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{tags:o}}),eb=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{team_ids:o,exclude_team_ids:"litellm-dashboard"}}),ew=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{organization_ids:o}}),e$=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{end_user_ids:o}}),eC=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{agent_ids:o}}),eE=async e=>{try{let t=C?`${C}/global/spend`:"/global/spend",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=C?`${C}/onboarding/get_token`:"/onboarding/get_token";t+=`?invite_link=${e}`;let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,r,n)=>{let o=C?`${C}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,r)=>{try{let n=C?`${C}/key/${t}/regenerate`:`/key/${t}/regenerate`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},ek=!1,eO=null,eT=async(e,t,r,n=1,o=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,n,o,a,i,l,s,c);let u=C?`${C}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",n.toString()),d.append("size",o.toString()),a&&a.trim()&&d.append("search",a.trim()),i&&i.trim()&&d.append("modelId",i.trim()),l&&l.trim()&&d.append("teamId",l.trim()),s&&s.trim()&&d.append("sortBy",s.trim()),c&&c.trim()&&d.append("sortOrder",c.trim()),d.toString()&&(u+=`?${d.toString()}`);let f=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${ek}`,ek||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),g.default.info(e),ek=!0,eO&&clearTimeout(eO),eO=setTimeout(()=>{ek=!1},1e4)),Error("Network response was not ok")}let p=await f.json();return console.log("modelInfoCall:",p),p}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let r=C?`${C}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("modelInfoV1Call:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},e_=async()=>{let e=C?`${C}/public/model_hub`:"/public/model_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`modelHubPublicModelsCall failed with status ${t.status}`),[])},eI=async()=>{let e=C?`${C}/public/agent_hub`:"/public/agent_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`agentHubPublicModelsCall failed with status ${t.status}`),[])},eP=async()=>{let e=C?`${C}/public/mcp_hub`:"/public/mcp_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`mcpHubPublicServersCall failed with status ${t.status}`),[])},eN=async e=>{try{let t=C?`${C}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("modelHubCall:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eR=async e=>{try{let t=C?`${C}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("getAllowedIPs:",n),n.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eM=async(e,t)=>{try{let r=C?`${C}/add/allowed_ip`:"/add/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("addAllowedIP:",o),o}catch(e){throw console.error("Failed to add allowed IP:",e),e}},eB=async(e,t)=>{try{let r=C?`${C}/delete/allowed_ip`:"/delete/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("deleteAllowedIP:",o),o}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eA=async(e,t)=>{try{let r=C?`${C}/model_hub/update_useful_links`:"/model_hub/update_useful_links",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ez=async(e,t,r,n=!1,o=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",F);try{let t=C?`${C}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===n&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),o&&r.append("team_id",o.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t)=>{try{let r=C?`${C}/global/spend/logs`:"/global/spend/logs";console.log("in keySpendLogsCall:",r);let n=await fetch(`${r}?api_key=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=C?`${C}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eD=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/tags`:"/global/spend/tags";t&&r&&(o=`${o}?start_date=${t}&end_date=${r}`),n&&(o+=`&tags=${n.join(",")}`),console.log("in tagsSpendLogsCall:",o);let a=await fetch(`${o}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eV=async e=>{try{let t=C?`${C}/global/spend/all_tag_names`:"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=C?`${C}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to fetch end users:",e),e}},eG=async(e,t)=>{try{let r=C?`${C}/user/filter/ui`:"/user/filter/ui";t.get("user_email")&&(r+=`?user_email=${t.get("user_email")}`),t.get("user_id")&&(r+=`?user_id=${t.get("user_id")}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eU=async(e,t,r,n,o,a)=>{try{console.log(`user role in spend logs call: ${r}`);let t=C?`${C}/spend/logs`:"/spend/logs";t="App Owner"==r?`${t}?user_id=${n}&start_date=${o}&end_date=${a}`:`${t}?start_date=${o}&end_date=${a}`;let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:n=1,page_size:o=50,params:a={}})=>{try{let i=C?`${C}/spend/logs/ui`:"/spend/logs/ui",l=new URLSearchParams;for(let[e,i]of(l.append("start_date",t),l.append("end_date",r),l.append("page",n.toString()),l.append("page_size",o.toString()),Object.entries(a)))null!=i&&("min_spend"===e||"max_spend"===e?l.append(e,i.toString()):"string"==typeof i&&""!==i&&l.append(e,String(i)));let s=l.toString();s&&(i+=`?${s}`);let c=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=nW(e);throw k(t),Error(t)}let u=await c.json();return console.log("Spend Logs Response:",u),u}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eJ=async e=>{try{let t=C?`${C}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=C?`${C}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:n}):JSON.stringify({startTime:r,endTime:n});let i={method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(o,i);if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}let s=await l.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eY=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/provider`:"/global/spend/provider";r&&n&&(o+=`?start_date=${r}&end_date=${n}`),t&&(o+=`&api_key=${t}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eZ=async(e,t,r)=>{try{let n=C?`${C}/global/activity`:"/global/activity";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eQ=async(e,t,r)=>{try{let n=C?`${C}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e0=async(e,t,r)=>{try{let n=C?`${C}/global/activity/model`:"/global/activity/model";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e1=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions`:"/global/activity/exceptions";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e2=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions/deployment`:"/global/activity/exceptions/deployment";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e4=async e=>{try{let t=C?`${C}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e6=async(e,t)=>{try{let r=C?`${C}/v2/key/info`:"/v2/key/info",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!n.ok){let e=await n.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw k(e),Error("Network response was not ok")}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t,r,n)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let o=C?`${C}/health/test_connection`:"/health/test_connection",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:n})}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||"error"===l.status)&&"error"!==l.status)return{status:"error",message:l.error?.message||`Connection test failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("Model connection test error:",e),e}},e7=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=C?`${C}/key/info`:"/key/info";r=`${r}?key=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",n),!n.ok){let e=await n.text();k(e),g.default.fromBackend("Failed to fetch key info - "+e)}let o=await n.json();return console.log("data",o),o}catch(e){throw console.error("Failed to fetch key info:",e),e}},e5=async(e,t,r,n,o,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=C?`${C}/key/list`:"/key/list";console.log("in keyListCall");let p=new URLSearchParams;r&&p.append("team_id",r.toString()),t&&p.append("organization_id",t.toString()),n&&p.append("key_alias",n),a&&p.append("key_hash",a),o&&p.append("user_id",o.toString()),i&&p.append("page",i.toString()),l&&p.append("size",l.toString()),s&&p.append("sort_by",s),c&&p.append("sort_order",c),u&&p.append("expand",u),d&&p.append("status",d),p.append("return_full_object","true"),p.append("include_team_keys","true"),p.append("include_created_by_keys","true");let m=p.toString();m&&(f+=`?${m}`);let h=await fetch(f,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=nW(e);throw k(t),Error(t)}let g=await h.json();return console.log("/team/list API Response:",g),g}catch(e){throw console.error("Failed to create key:",e),e}},e9=async(e,t=1,r=50,n)=>{try{let o=new URLSearchParams(Object.entries({page:String(t),size:String(r),...n?{search:n}:{}})),a=C?`${C}/key/aliases`:"/key/aliases";a=`${a}?${o}`;let i=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("/key/aliases API Response:",l),l}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e8=async(e,t)=>{try{let r=C?`${C}/spend/users`:"/spend/users";console.log("in spendUsersCall:",r);let n=await fetch(`${r}?user_id=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get spend for user",e),e}},te=async(e,t,r,n)=>{try{let o=C?`${C}/user/request_model`:"/user/request_model",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:r,justification:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=C?`${C}/user/get_requests`:"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to get requested models:",e),e}},tr=async(e,t,r,n=null)=>{try{let o=C?`${C}/user/daily/activity/aggregated`:"/user/daily/activity/aggregated",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),n&&a.append("user_id",n);let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},tn=async(e,t)=>{try{let r=C?`${C}/user/get_users?role=${t}`:`/user/get_users?role=${t}`;console.log("in userGetAllUsersCall:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get requested models:",e),e}},to=async e=>{try{let t=C?`${C}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("response from user/available_role",n),n}catch(e){throw e}},ta=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/team/new`:"/team/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/credentials`:"/credentials",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tl=async e=>{try{let t=C?`${C}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ts=async(e,t,r)=>{try{let n=C?`${C}/credentials`:"/credentials";t?n+=`/by_name/${t}`:r&&(n+=`/by_model/${r}`),console.log("in credentialListCall");let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t)=>{try{let r=C?`${C}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},tu=async(e,t,r)=>{try{if(console.log("Form Values in credentialUpdateCall:",r),r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let n=C?`${C}/credentials/${t}`:`/credentials/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},td=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let r=C?`${C}/key/update`:"/key/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("Update key Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=C?`${C}/team/update`:"/team/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),g.default.fromBackend("Failed to update team settings: "+e),Error(e)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to update team:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let n=C?`${C}/model/${r}/update`:`/model/${r}/update`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await o.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},tm=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let r=C?`${C}/model/update`:"/model/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let o=await n.json();return console.log("Update model Response:",o),o}catch(e){throw console.error("Failed to update model:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_add`:"/team/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!o.ok){let e=await o.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tg=async(e,t,r,n,o)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:n});let a=C?`${C}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};o?i.all_users=!0:i.members=r,null!=n&&(i.max_budget_in_team=n);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to bulk add team members",n=Error(r);throw n.raw=t,n}let s=await l.json();return console.log("Bulk team member add API Response:",s),s}catch(e){throw console.error("Failed to bulk add team members:",e),e}},tv=async(e,t,r)=>{try{console.log("Form Values in teamMemberUpdateCall:",r),console.log("Budget value:",r.max_budget_in_team),console.log("TPM limit:",r.tpm_limit),console.log("RPM limit:",r.rpm_limit);let n=C?`${C}/team/member_update`:"/team/member_update",o={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(o.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(o.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(o.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(o.rpm_limit=r.rpm_limit),console.log("Final request body:",o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!a.ok){let e=await a.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},ty=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_delete`:"/team/member_delete",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==r.user_email&&{user_email:r.user_email},...void 0!==r.user_id&&{user_id:r.user_id}})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tb=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/organization/member_add`:"/organization/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tw=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let n=C?`${C}/organization/member_delete`:"/organization/member_delete",o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},t$=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let n=C?`${C}/organization/member_update`:"/organization/member_update",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},tC=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let n=C?`${C}/user/update`:"/user/update",o={...t};null!==r&&(o.user_role=r),o=JSON.stringify(o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},tE=async(e,t,r,n=!1)=>{try{let o;console.log("Form Values in userUpdateUserCall:",t);let a=C?`${C}/user/bulk_update`:"/user/bulk_update";if(n)o=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let n of r)e.push({user_id:n,...t});o=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tS=async(e,t)=>{try{let r=C?`${C}/global/predict/spend/logs`:"/global/predict/spend/logs",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},tx=async e=>{try{let t=C?`${C}/health/services?service=slack_budget_alerts`:"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}let n=await r.json();return g.default.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",n),n}catch(e){throw console.error("Failed to perform health check:",e),e}},tj=async(e,t)=>{try{let r=C?`${C}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}return await n.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tk=async e=>{try{let t=C?`${C}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tO=async e=>{try{let t=C?`${C}/budget/settings`:"/budget/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tT=async(e,t,r)=>{try{let t=C?`${C}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async e=>{try{let t=C?`${C}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async e=>{try{let t=C?`${C}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tI=async e=>{try{let t=C?`${C}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tP=async(e,t)=>{try{let r=C?`${C}/cache/settings/test`:"/cache/settings/test",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tN=async(e,t)=>{try{let r=C?`${C}/cache/settings`:"/cache/settings",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tR=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async(e,t)=>{try{let r=C?`${C}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tB=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tA=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tz=async(e,t,r)=>{try{let n=C?`${C}/config/field/update`:"/config/field/update",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tL=async(e,t)=>{try{let r=C?`${C}/config/field/delete`:"/config/field/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return g.default.success("Field reset on proxy"),o}catch(e){throw console.error("Failed to get callbacks:",e),e}},tH=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tD=async(e,t)=>{try{let r=C?`${C}/config/update`:"/config/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tV=async e=>{try{let t=C?`${C}/health`:"/health",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tW=async(e,t)=>{try{let r=C?`${C}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tG=async e=>{try{let t=C?`${C}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tU=async(e,t,r,n=100,o=0)=>{try{let a=C?`${C}/health/history`:"/health/history",i=new URLSearchParams;t&&i.append("model",t),r&&i.append("status_filter",r),i.append("limit",n.toString()),i.append("offset",o.toString()),i.toString()&&(a+=`?${i.toString()}`);let l=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.text();throw k(e),Error(e)}return await l.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tq=async e=>{try{let t=C?`${C}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tJ=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",C);let t=C?`${C}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tK=async e=>{try{let t=C?`${C}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);return console.error("Failed to get UI settings:",t),null}return await r.json()}catch(e){return console.error("Failed to get UI settings:",e),null}},tX=async(e,t)=>{try{let r=C?`${C}/update/ui_settings`:"/update/ui_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update UI settings:",e),e}},tY=async e=>{try{let t=C?`${C}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tZ=async(e,t)=>{try{let r=C?`${C}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tQ=async(e,t,r)=>{try{let n=C?`${C}/v1/responses`:"/v1/responses",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:t,input:[{role:"user",content:r,type:"message"}],tools:[{type:"mcp",server_url:"litellm_proxy",require_approval:"never"}],tool_choice:"required"})}),a=o.headers.get("x-litellm-semantic-filter"),i=o.headers.get("x-litellm-semantic-filter-tools");if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return{data:await o.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},t0=async e=>{try{let t=C?`${C}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},t1=async(e,t,r)=>{try{let n=C?`${C}/guardrails/usage/overview`:"/guardrails/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},t2=async(e,t,r,n)=>{try{let o=C?`${C}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),n&&a.append("end_date",n),a.toString()&&(o+=`?${a.toString()}`);let i=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(nW(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},t4=async(e,t)=>{try{let r=C?`${C}/guardrails/usage/logs`:"/guardrails/usage/logs",n=new URLSearchParams;t.guardrailId&&n.append("guardrail_id",t.guardrailId),t.policyId&&n.append("policy_id",t.policyId),null!=t.page&&n.append("page",String(t.page)),null!=t.pageSize&&n.append("page_size",String(t.pageSize)),t.action&&n.append("action",t.action),t.startDate&&n.append("start_date",t.startDate),t.endDate&&n.append("end_date",t.endDate),n.toString()&&(r+=`?${n.toString()}`);let o=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json();throw Error(nW(e))}return o.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},t6=async(e,t,r)=>{try{let n=C?`${C}/policies/usage/overview`:"/policies/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get policies usage overview:",e),e}},t3=async e=>{try{let t=C?`${C}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},t7=async(e,t,r)=>{try{let n=C?`${C}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",o=await fetch(n,{method:"POST",signal:r,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({policy_names:t.policy_names??null,guardrail_names:t.guardrail_names??null,inputs:t.inputs??null,inputs_list:t.inputs_list??null,request_data:t.request_data??{},input_type:t.input_type??"request",agent_id:t.agent_id??null})});if(!o.ok){let e=await o.text(),t="Failed to test policies and guardrails";try{let r=JSON.parse(e);r.detail?t="string"==typeof r.detail?r.detail:JSON.stringify(r.detail):r.message&&(t=r.message)}catch{t=e||t}throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},t5=async(e,t)=>{try{let r=C?`${C}/policy/info/${t}`:`/policy/info/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},t9=async e=>{try{let t=C?`${C}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},t8=async(e,t,r,n,o)=>{try{let a=C?`${C}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};n&&(i.model=n),o&&(i.competitors=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},re=async(e,t,r,n)=>{try{let o=C?`${C}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},rt=async(e,t,r)=>{try{let n=C?`${C}/policy/templates/test`:"/policy/templates/test",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},rr=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:n};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=nW(await d.json());throw k(e),Error(e)}let f=d.body?.getReader();if(!f)throw Error("No response body");let p=new TextDecoder,m="";for(;;){let{done:e,value:t}=await f.read();if(e)break;let r=(m+=p.decode(t,{stream:!0})).split("\n");for(let e of(m=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"competitor"===t.type?o(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},rn=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=nW(await u.json());throw k(e),Error(e)}let d=u.body?.getReader();if(!d)throw Error("No response body");let f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await d.read();if(e)break;let r=(p+=f.decode(t,{stream:!0})).split("\n");for(let e of(p=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"chunk"===t.type?n(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?o():"error"===t.type&&a?.(t.message)}catch{}}},ro=async(e,t)=>{try{let r=C?`${C}/policies`:"/policies",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy:",e),e}},ra=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}`:`/policies/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy:",e),e}},ri=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},rl=async(e,t,r)=>{try{let n=encodeURIComponent(t),o=C?`${C}/policies/name/${n}/versions`:`/policies/name/${n}/versions`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},rs=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}/status`:`/policies/${t}/status`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},rc=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},ru=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},rd=async e=>{try{let t=C?`${C}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},rf=async(e,t)=>{try{let r=C?`${C}/policies/attachments`:"/policies/attachments",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rp=async(e,t)=>{try{let r=C?`${C}/policies/attachments/${t}`:`/policies/attachments/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rm=async(e,t,r)=>{try{let n=C?`${C}/policies/test-pipeline`:"/policies/test-pipeline",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},rh=async(e,t)=>{try{let r=C?`${C}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rg=async(e,t)=>{try{let r=C?`${C}/policies/resolve`:"/policies/resolve",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},rv=async(e,t)=>{try{let r=C?`${C}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ry=async e=>{try{let t=C?`${C}/prompts/list`:"/prompts/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rb=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/info`:`/prompts/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rw=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/versions`:`/prompts/${t}/versions`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw 404!==n.status&&k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},r$=async(e,t)=>{try{let r=C?`${C}/prompts`:"/prompts",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},rC=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rE=async(e,t)=>{try{let r=C?`${C}/prompts/${t}`:`/prompts/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rS=async(e,t)=>{try{let r=new FormData;r.append("file",t);let n=C?`${C}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`},body:r});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rx=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},rj=async(e,t)=>{try{let r=C?`${C}/v1/agents`:"/v1/agents",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create agent response:",o),o}catch(e){throw console.error("Failed to create agent:",e),e}},rk=async(e,t)=>{try{let r=C?`${C}/guardrails`:"/guardrails",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create guardrail response:",o),o}catch(e){throw console.error("Failed to create guardrail:",e),e}},rO=async(e,t,r)=>{try{let n=C?`${C}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",n);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rT=async e=>{try{let t=C?`${C}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO settings:",n),n}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rF=async(e,t)=>{try{let r=C?`${C}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Updated internal user settings:",o),g.default.success("Internal user settings updated successfully"),o}catch(e){throw console.error("Failed to update internal user settings:",e),e}},r_=async e=>{try{let t=C?`${C}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rI=async e=>{try{let t=C?`${C}/v1/mcp/server`:"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},rP=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server/health`:"/v1/mcp/server/health";if(t&&t.length>0){let e=new URLSearchParams;t.forEach(t=>e.append("server_ids",t)),r=`${r}?${e.toString()}`}console.log("Fetching MCP server health from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched MCP server health:",o),o}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rN=async e=>{try{let t=C?`${C}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP access groups:",n),n.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rR=async e=>{try{let t=C?`${C}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rM=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},rB=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rA=async(e,t)=>{try{let r=(C?`${C}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rz=async e=>{try{let t=C?`${C}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched search tools:",n),n}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rL=async(e,t)=>{try{let r=C?`${C}/search_tools/${t}`:`/search_tools/${t}`;console.log("Fetching search tool by ID from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched search tool:",o),o}catch(e){throw console.error("Failed to fetch search tool:",e),e}},rH=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=C?`${C}/search_tools`:"/search_tools",n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Created search tool:",o),o}catch(e){throw console.error("Failed to create search tool:",e),e}},rD=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let n=C?`${C}/search_tools/${t}`:`/search_tools/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rV=async(e,t)=>{try{let r=(C?`${C}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Deleted search tool:",o),o}catch(e){throw console.error("Failed to delete search tool:",e),e}},rW=async e=>{try{let t=C?`${C}/search_tools/ui/available_providers`:"/search_tools/ui/available_providers";console.log("Fetching available search providers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched available search providers:",n),n}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rG=async(e,t)=>{try{let r=C?`${C}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Test connection response:",o),o}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rU=async(e,t,r)=>{try{let n=C?`${C}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",n);let o={[F]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(n,{method:"GET",headers:o}),i=await a.json();if(console.log("Fetched MCP tools response:",i),!a.ok){if(i.error&&i.message)throw Error(i.message);throw Error("Failed to fetch MCP tools")}return i}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools",stack_trace:null}}},rq=async(e,t,r,n,o)=>{try{let a=C?`${C}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",n,"for server:",t);let i={[F]:`Bearer ${e}`,"Content-Type":"application/json",...o?.customHeaders||{}},l={server_id:t,name:r,arguments:n};o?.guardrails&&o.guardrails.length>0&&(l.litellm_metadata={guardrails:o.guardrails});let s=await fetch(a,{method:"POST",headers:i,body:JSON.stringify(l)});if(!s.ok){let e="Network response was not ok",t=null,r=await s.text();try{let n=JSON.parse(r);n.detail?"string"==typeof n.detail?e=n.detail:"object"==typeof n.detail&&(e=n.detail.message||n.detail.error||"An error occurred",t=n.detail):e=n.message||n.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let n=Error(e);throw n.status=s.status,n.statusText=s.statusText,n.details=t,k(e),n}let c=await s.json();return console.log("MCP tool call response:",c),c}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},rJ=async(e,t)=>{try{let r=C?`${C}/tag/new`:"/tag/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error creating tag:",e),e}},rK=async(e,t)=>{try{let r=C?`${C}/tag/update`:"/tag/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error updating tag:",e),e}},rX=async(e,t)=>{try{let r=C?`${C}/tag/info`:"/tag/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!n.ok){let e=await n.text();return await k(e),{}}return await n.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rY=async e=>{try{let t=C?`${C}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await k(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rZ=async(e,t)=>{try{let r=C?`${C}/tag/delete`:"/tag/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rQ=async e=>{try{let t=C?`${C}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched default team settings:",n),n}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},r0=async(e,t)=>{try{let r=C?`${C}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Updated default team settings:",o),g.default.success("Default team settings updated successfully"),o}catch(e){throw console.error("Failed to update default team settings:",e),e}},r1=async(e,t)=>{try{let r=C?`${C}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Team permissions response:",o),o}catch(e){throw console.error("Failed to get team permissions:",e),e}},r2=async(e,t,r)=>{try{let n=C?`${C}/team/permissions_update`:"/team/permissions_update",o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},r4=async(e,t)=>{try{let r=C?`${C}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},r6=async(e,t)=>{try{let r=C?`${C}/vector_store/new`:"/vector_store/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to create vector store")}return await n.json()}catch(e){throw console.error("Error creating vector store:",e),e}},r3=async(e,t=1,r=100)=>{try{let t=C?`${C}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to list vector stores")}return await r.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},r7=async(e,t)=>{try{let r=C?`${C}/vector_store/delete`:"/vector_store/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to delete vector store")}return await n.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},r5=async(e,t)=>{try{let r=C?`${C}/vector_store/info`:"/vector_store/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to get vector store info")}return await n.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},r9=async(e,t)=>{try{let r=C?`${C}/vector_store/update`:"/vector_store/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to update vector store")}return await n.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r8=async(e,t,r,n,o,a,i)=>{try{let l=C?`${C}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...n&&{vector_store_id:n},...i&&i}}};(o||a)&&(c.ingest_options.litellm_vector_store_params={},o&&(c.ingest_options.litellm_vector_store_params.vector_store_name=o),a&&(c.ingest_options.litellm_vector_store_params.vector_store_description=a)),s.append("request",JSON.stringify(c));let u=await fetch(l,{method:"POST",headers:{[F]:`Bearer ${e}`},body:s});if(!u.ok){let e=await u.json();throw Error(e.error?.message||e.detail||"Failed to ingest document")}return await u.json()}catch(e){throw console.error("Error ingesting document:",e),e}},ne=async e=>{try{let t=C?`${C}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get email event settings")}let n=await r.json();return console.log("Email event settings response:",n),n}catch(e){throw console.error("Failed to get email event settings:",e),e}},nt=async(e,t)=>{try{let r=C?`${C}/email/event_settings`:"/email/event_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to update email event settings")}let o=await n.json();return console.log("Update email event settings response:",o),o}catch(e){throw console.error("Failed to update email event settings:",e),e}},nr=async e=>{try{let t=C?`${C}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to reset email event settings")}let n=await r.json();return console.log("Reset email event settings response:",n),n}catch(e){throw console.error("Failed to reset email event settings:",e),e}},nn=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete agent response:",o),o}catch(e){throw console.error("Failed to delete agent:",e),e}},no=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}/make_public`:`/v1/agents/${t}/make_public`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agent public response:",o),o}catch(e){throw console.error("Failed to make agent public:",e),e}},na=async(e,t)=>{try{let r=C?`${C}/v1/agents/make_public`:"/v1/agents/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},ni=async(e,t)=>{try{let r=C?`${C}/v1/mcp/make_public`:"/v1/mcp/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},nl=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete guardrail response:",o),o}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ns=async e=>{try{let t=C?`${C}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail UI settings")}let n=await r.json();return console.log("Guardrail UI settings response:",n),n}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},nc=async e=>{try{let t=C?`${C}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail provider specific parameters")}let n=await r.json();return console.log("Guardrail provider specific params response:",n),n}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},nu=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${n}`);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw console.error(`Failed to get category YAML. Status: ${o.status}, Error:`,e),k(e),Error(`Failed to get category YAML: ${o.status} ${e}`)}let a=await o.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},nd=async e=>{try{let t=C?`${C}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw console.error(`Failed to get major airlines. Status: ${r.status}, Error:`,e),k(e),Error(`Failed to get major airlines: ${r.status} ${e}`)}return await r.json()}catch(e){throw console.error("Failed to get major airlines:",e),e}},nf=async e=>{try{let t=C?`${C}/v1/agents`:"/v1/agents",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get agents list")}let n=await r.json();return console.log("Agents list response:",n),{agents:n}}catch(e){throw console.error("Failed to get agents list:",e),e}},np=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get agent info")}let o=await n.json();return console.log("Agent info response:",o),o}catch(e){throw console.error("Failed to get agent info:",e),e}},nm=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}/info`:`/guardrails/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get guardrail info")}let o=await n.json();return console.log("Guardrail info response:",o),o}catch(e){throw console.error("Failed to get guardrail info:",e),e}},nh=async(e,t,r)=>{try{let n=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to patch agent")}let a=await o.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ng=async(e,t,r)=>{try{let n=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to update guardrail")}let a=await o.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},nv=async(e,t,r,n,o)=>{try{let a=C?`${C}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};n&&(i.language=n),o&&o.length>0&&(i.entities=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t="Failed to apply guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let s=await l.json();return console.log("Apply guardrail response:",s),s}catch(e){throw console.error("Failed to apply guardrail:",e),e}},ny=async(e,t)=>{try{let r=C?`${C}/guardrails/test_custom_code`:"/guardrails/test_custom_code",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t="Failed to test custom code guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let o=await n.json();return console.log("Test custom code guardrail response:",o),o}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},nb=async(e,t)=>{try{let r=C?`${C}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to validate blocked words file")}let o=await n.json();return console.log("Validate blocked words file response:",o),o}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},nw=async e=>{try{let t=C?`${C}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO configuration:",n),n}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},n$=async(e,t)=>{try{let r=C?`${C}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:nW(e);k(r);let o=Error(r);throw e?.detail!==void 0&&(o.detail=e.detail),o.rawError=e,o}let o=await n.json();return console.log("Updated SSO configuration:",o),o}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},nC=async(e,t,r,n,o)=>{try{let t=C?`${C}/audit`:"/audit",r=new URLSearchParams;n&&r.append("page",n.toString()),o&&r.append("page_size",o.toString());let a=r.toString();a&&(t+=`?${a}`);let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},nE=async e=>{try{let t=C?`${C}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},nS=async e=>{try{let t=C?`${C}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},nx=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},nj=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`:`/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=(await n.json()).endpoints;if(!o||0===o.length)throw Error("Pass through endpoint not found");return o[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},nk=async(e,t)=>{try{let r=C?`${C}/config/callback/delete`:"/config/callback/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},nO=async e=>{let t=E(),r=await fetch(`${t}/v1/mcp/tools`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`HTTP error! status: ${r.status}`);return await r.json()},nT=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let r=C?`${C}/mcp-rest/test/connection`:"/mcp-rest/test/connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)}),o=n.headers.get("content-type");if(!o||!o.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${n.status}: ${n.statusText}). Check network tab for details.`)}let a=await n.json();if((!n.ok||"error"===a.status)&&"error"!==a.status)return{status:"error",message:a.error?.message||`MCP connection test failed: ${n.status} ${n.statusText}`};return a}catch(e){throw console.error("MCP connection test error:",e),e}},nF=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let n=C?`${C}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",o={"Content-Type":"application/json"};e&&(o["x-litellm-api-key"]=e),r?o.Authorization=`Bearer ${r}`:e&&(o[F]=`Bearer ${e}`);let a=await fetch(n,{method:"POST",headers:o,body:JSON.stringify(t)}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||l.error)&&!l.error)return{tools:[],error:"request_failed",message:l.message||`MCP tools list failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("MCP tools list test error:",e),e}},n_=async(e,t)=>{let r=C?`${C}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),o=await n.json();if(!n.ok)throw Error(nW(o)||o?.error||"Failed to cache MCP server");return o},nI=async(e,t,r)=>{let n=E(),o=encodeURIComponent(t.trim()),a=`${n}/v1/mcp/server/oauth/${o}/register`,i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify(r)}),l=await i.json();if(!i.ok)throw Error(nW(l)||l?.detail||"Failed to register OAuth client");return l},nP=({serverId:e,clientId:t,redirectUri:r,state:n,codeChallenge:o,scope:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:n,response_type:"code",code_challenge:o,code_challenge_method:"S256"});return t&&t.trim().length>0&&c.set("client_id",t),a&&a.trim().length>0&&c.set("scope",a),`${s}?${c.toString()}`},nN=async({serverId:e,code:t,clientId:r,clientSecret:n,codeVerifier:o,redirectUri:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/token`,c=new URLSearchParams;c.set("grant_type","authorization_code"),c.set("code",t),r&&r.trim().length>0&&c.set("client_id",r),n&&n.trim().length>0&&c.set("client_secret",n),c.set("code_verifier",o),c.set("redirect_uri",a);let u=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}),d=await u.json();if(!u.ok)throw Error(nW(d)||d?.detail||"OAuth token exchange failed");return d},nR=async(e,t,r)=>{try{let n=`${E()}/v1/vector_stores/${t}/search`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!o.ok){let e=await o.text();return await k(e),null}return await o.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},nM=async(e,t,r,n)=>{try{let o=`${E()}/v1/search/${t}`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:n||5})});if(!a.ok){let e=await a.text();return await k(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},nB=async(e,t,r,n=1,o=50,a)=>{try{let i=C?`${C}/tag/user-agent/analytics`:"/tag/user-agent/analytics",l=new URLSearchParams,s=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};l.append("start_date",s(t)),l.append("end_date",s(r)),l.append("page",n.toString()),l.append("page_size",o.toString()),a&&l.append("user_agent_filter",a);let c=l.toString();c&&(i+=`?${c}`);let u=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},nA=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},nz=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},nL=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},nH=async e=>{try{let t=C?`${C}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},nD=async(e,t,r,n)=>{try{let o=C?`${C}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},nV=async(e,t=1,r=50,n)=>{try{let o=C?`${C}/tag/user-agent/per-user-analytics`:"/tag/user-agent/per-user-analytics",a=new URLSearchParams;a.append("page",t.toString()),a.append("page_size",r.toString()),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(o+=`?${i}`);let l=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},nW=e=>e?.error&&(e.error.message||e.error)||e?.message||e?.detail||e?.error||JSON.stringify(e),nG=async(e,t)=>{let r=E(),n=r?`${r}/v2/login`:"/v2/login",o=JSON.stringify({username:e,password:t}),a=await fetch(n,{method:"POST",body:o,credentials:"include",headers:{"Content-Type":"application/json"}});if(!a.ok)throw Error(nW(await a.json()));return await a.json()},nU=async()=>{let e=E(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(nW(await r.json()));return await r.json()},nq=async(e,t)=>{let r=E(),n=r?`${r}/update/ui_settings`:"/update/ui_settings",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(nW(await o.json()));return await o.json()},nJ=async()=>{try{let e=E(),t=e?`${e}/claude-code/marketplace.json`:"/claude-code/marketplace.json",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},nK=async(e,t=!1)=>{try{let r=E(),n=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},nX=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},nY=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins`:"/claude-code/plugins",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},nZ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},nQ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},n0=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},n1=async(e,t)=>{let r=C?`${C}/compliance/eu-ai-act`:"/compliance/eu-ai-act",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n2=async(e,t)=>{let r=C?`${C}/compliance/gdpr`:"/compliance/gdpr",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n4=async e=>{let t=C?`${C}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},n6=async(e,t,r)=>{let n=C?`${C}/v1/tool/policy`:"/v1/tool/policy",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({tool_name:t,call_policy:r})});if(!o.ok)throw Error(await o.text());return o.json()}}]);
\ No newline at end of file
+Allowed values: ${t.enum.join(", ")}`:S)}),children:r},e)})}):null};var g=e.i(727749);let v=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`},y=async e=>{try{let t=C?`${C}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},b=async e=>{try{let t=C?`${C}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},w=null,$="/",C=null;console.log=function(){};let E=()=>{if(C)return C;let e=window.location;return e?.origin??""},S="POST",x="DELETE",j=0,k=async e=>{let t=Date.now();if(t-j>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){g.default.info("UI Session Expired. Logging out."),j=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}j=t}else console.log("Error suppressed to prevent spam:",e)},O=async()=>{let e=C?`${C}/public/providers/fields`:"/public/providers/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch provider create metadata:",t.status,e),Error("Failed to load provider configuration")}return await t.json()},T=async()=>{let e=C?`${C}/public/agents/fields`:"/public/agents/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch agent create metadata:",t.status,e),Error("Failed to load agent configuration")}return await t.json()},F="Authorization";function _(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),F=e}function I(){return F}let P=async(e,t)=>{let r=C?`${C}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},N=async()=>{console.log("Getting UI config");let e=await fetch("/my-custom-path/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),((e,t=null)=>{let r=window.location,n=r?.origin??null,o=t||n;if(console.log("proxyBaseUrl:",C),console.log("serverRootPath:",e),!o)return console.log("Updated proxyBaseUrl:",C=C??null);e.length>0&&!o.endsWith(e)&&"/"!=e&&(o+=e),console.log("Updated proxyBaseUrl:",C=o)})(t.server_root_path,t.proxy_base_url),t},R=async()=>{let e=C?`${C}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},M=async()=>{let e=C?`${C}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},B=async()=>{try{let e=C?`${C}/public/litellm_model_cost_map`:"/public/litellm_model_cost_map",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await t.json();return console.log(`received litellm model cost data: ${r}`),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},A=async e=>{try{let t=C?`${C}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to reload model cost map:",e),e}},z=async(e,t)=>{try{let r=C?`${C}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await n.json();return console.log(`Schedule model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},L=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Cancel model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},H=async e=>{try{let t=C?`${C}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map source info:",n),n}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},D=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload/status`:"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){console.error(`Status request failed with status: ${r.status}`);let e=await r.text();throw console.error("Error response:",e),Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map reload status:",n),n}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},V=async(e,r)=>{try{let n=C?`${C}/model/new`:"/model/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),t.message.destroy(),g.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},W=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=C?`${C}/model/delete`:"/model/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=C?`${C}/budget/delete`:"/budget/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},U=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/new`:"/budget/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/update`:"/budget/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{let r=C?`${C}/invitation/new`:"/invitation/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/invitation/claim`:"/invitation/claim",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},X=async e=>{try{let t=C?`${C}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Y=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),p))if(t[e]){console.log(`formValues.${e}:`,t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",t);let r=C?`${C}/key/service-account/generate`:"/key/service-account/generate",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},Z=async(e,t,r)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),p))if(r[e]){console.log(`formValues.${e}:`,r[e]);try{r[e]=JSON.parse(r[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",r);let n=C?`${C}/key/generate`:"/key/generate",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t,r,n)=>{let o=C?`${C}/key/generate`:"/key/generate",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_id:t,key_alias:r,models:n.length>0?n:[]})});if(!a.ok)throw k(await a.text()),Error("Failed to create key for agent");return a.json()},ee=async(e,t,r)=>{try{if(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),r.auto_create_key=!1,r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",r);let n=C?`${C}/user/new`:"/user/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t)=>{try{let r=C?`${C}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},er=async(e,t)=>{try{let r=C?`${C}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete user(s):",e),e}},en=async(e,t)=>{try{let r=C?`${C}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},eo=async(e,t=null,r=null,n=null,o=null,a=null,i=null,l=null,s=null,c=null)=>{try{let u=C?`${C}/user/list`:"/user/list";console.log("in userListCall");let d=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");d.append("user_ids",e)}r&&d.append("page",r.toString()),n&&d.append("page_size",n.toString()),o&&d.append("user_email",o),a&&d.append("role",a),i&&d.append("team",i),l&&d.append("sso_user_ids",l),s&&d.append("sort_by",s),c&&d.append("sort_order",c);let f=d.toString();f&&(u+=`?${f}`);let p=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!p.ok){let e=await p.json(),t=nW(e);throw k(t),Error(t)}let m=await p.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},ea=async(e,t,r,n=!1,o,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${n}, ${o}, ${a}, ${i}`);try{let l;if(n){l=C?`${C}/user/list`:"/user/list";let e=new URLSearchParams;null!=o&&e.append("page",o.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=C?`${C}/user/info`:"/user/info",("Admin"!==r&&"Admin Viewer"!==r||i)&&t&&(l+=`?user_id=${t}`);console.log("Requesting user data from:",l);let s=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to fetch user data:",e),e}},ei=async(e,t)=>{try{let r=C?`${C}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t,r=null,n=null,o=null,a=1,i=10,l=null,s=null)=>{try{let a=C?`${C}/v2/team/list`:"/v2/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},es=async(e,t,r=null,n=null,o=null)=>{try{let a=C?`${C}/team/list`:"/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ec=async e=>{try{let t=C?`${C}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/team/available_teams API Response:",n),n}catch(e){throw e}},eu=async(e,t=null,r=null)=>{try{let n=C?`${C}/organization/list`:"/organization/list",o=new URLSearchParams;t&&o.append("org_id",t.toString()),r&&o.append("org_alias",r.toString());let a=o.toString();a&&(n+=`?${a}`);let i=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},ed=async(e,t)=>{try{let r=C?`${C}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ef=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let r=C?`${C}/organization/new`:"/organization/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=C?`${C}/organization/update`:"/organization/update",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=C?`${C}/organization/delete`:"/organization/delete",n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!n.ok){let e=await n.text();throw k(e),Error(`Error deleting organization: ${e}`)}return await n.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},eh=async(e,t)=>{try{let r=C?`${C}/utils/transform_request`:"/utils/transform_request",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eg=async({accessToken:e,endpoint:t,startTime:r,endTime:n,page:o=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=C?`${C}${i}`:i,(s=new URLSearchParams).append("start_date",v(r)),s.append("end_date",v(n)),s.append("page_size","1000"),s.append("page",o.toString()),s.append("timezone",new Date().getTimezoneOffset().toString()),a&&Object.entries(a).forEach(([e,t])=>{((e,t,r)=>{if(null!=r){if(Array.isArray(r)){r.length>0&&e.append(t,r.join(","));return}e.append(t,`${r}`)}})(s,e,t)}),(c=s.toString())?`${l}?${c}`:l),d=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=nW(e);throw k(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ev=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{user_id:o}}),ey=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{tags:o}}),eb=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{team_ids:o,exclude_team_ids:"litellm-dashboard"}}),ew=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{organization_ids:o}}),e$=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{end_user_ids:o}}),eC=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{agent_ids:o}}),eE=async e=>{try{let t=C?`${C}/global/spend`:"/global/spend",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=C?`${C}/onboarding/get_token`:"/onboarding/get_token";t+=`?invite_link=${e}`;let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,r,n)=>{let o=C?`${C}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,r)=>{try{let n=C?`${C}/key/${t}/regenerate`:`/key/${t}/regenerate`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},ek=!1,eO=null,eT=async(e,t,r,n=1,o=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,n,o,a,i,l,s,c);let u=C?`${C}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",n.toString()),d.append("size",o.toString()),a&&a.trim()&&d.append("search",a.trim()),i&&i.trim()&&d.append("modelId",i.trim()),l&&l.trim()&&d.append("teamId",l.trim()),s&&s.trim()&&d.append("sortBy",s.trim()),c&&c.trim()&&d.append("sortOrder",c.trim()),d.toString()&&(u+=`?${d.toString()}`);let f=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${ek}`,ek||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),g.default.info(e),ek=!0,eO&&clearTimeout(eO),eO=setTimeout(()=>{ek=!1},1e4)),Error("Network response was not ok")}let p=await f.json();return console.log("modelInfoCall:",p),p}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let r=C?`${C}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("modelInfoV1Call:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},e_=async()=>{let e=C?`${C}/public/model_hub`:"/public/model_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`modelHubPublicModelsCall failed with status ${t.status}`),[])},eI=async()=>{let e=C?`${C}/public/agent_hub`:"/public/agent_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`agentHubPublicModelsCall failed with status ${t.status}`),[])},eP=async()=>{let e=C?`${C}/public/mcp_hub`:"/public/mcp_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`mcpHubPublicServersCall failed with status ${t.status}`),[])},eN=async e=>{try{let t=C?`${C}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("modelHubCall:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eR=async e=>{try{let t=C?`${C}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("getAllowedIPs:",n),n.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eM=async(e,t)=>{try{let r=C?`${C}/add/allowed_ip`:"/add/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("addAllowedIP:",o),o}catch(e){throw console.error("Failed to add allowed IP:",e),e}},eB=async(e,t)=>{try{let r=C?`${C}/delete/allowed_ip`:"/delete/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("deleteAllowedIP:",o),o}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eA=async(e,t)=>{try{let r=C?`${C}/model_hub/update_useful_links`:"/model_hub/update_useful_links",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ez=async(e,t,r,n=!1,o=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",F);try{let t=C?`${C}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===n&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),o&&r.append("team_id",o.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t)=>{try{let r=C?`${C}/global/spend/logs`:"/global/spend/logs";console.log("in keySpendLogsCall:",r);let n=await fetch(`${r}?api_key=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=C?`${C}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eD=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/tags`:"/global/spend/tags";t&&r&&(o=`${o}?start_date=${t}&end_date=${r}`),n&&(o+=`&tags=${n.join(",")}`),console.log("in tagsSpendLogsCall:",o);let a=await fetch(`${o}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eV=async e=>{try{let t=C?`${C}/global/spend/all_tag_names`:"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=C?`${C}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to fetch end users:",e),e}},eG=async(e,t)=>{try{let r=C?`${C}/user/filter/ui`:"/user/filter/ui";t.get("user_email")&&(r+=`?user_email=${t.get("user_email")}`),t.get("user_id")&&(r+=`?user_id=${t.get("user_id")}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eU=async(e,t,r,n,o,a)=>{try{console.log(`user role in spend logs call: ${r}`);let t=C?`${C}/spend/logs`:"/spend/logs";t="App Owner"==r?`${t}?user_id=${n}&start_date=${o}&end_date=${a}`:`${t}?start_date=${o}&end_date=${a}`;let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:n=1,page_size:o=50,params:a={}})=>{try{let i=C?`${C}/spend/logs/ui`:"/spend/logs/ui",l=new URLSearchParams;for(let[e,i]of(l.append("start_date",t),l.append("end_date",r),l.append("page",n.toString()),l.append("page_size",o.toString()),Object.entries(a)))null!=i&&("min_spend"===e||"max_spend"===e?l.append(e,i.toString()):"string"==typeof i&&""!==i&&l.append(e,String(i)));let s=l.toString();s&&(i+=`?${s}`);let c=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=nW(e);throw k(t),Error(t)}let u=await c.json();return console.log("Spend Logs Response:",u),u}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eJ=async e=>{try{let t=C?`${C}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=C?`${C}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:n}):JSON.stringify({startTime:r,endTime:n});let i={method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(o,i);if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}let s=await l.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eY=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/provider`:"/global/spend/provider";r&&n&&(o+=`?start_date=${r}&end_date=${n}`),t&&(o+=`&api_key=${t}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eZ=async(e,t,r)=>{try{let n=C?`${C}/global/activity`:"/global/activity";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eQ=async(e,t,r)=>{try{let n=C?`${C}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e0=async(e,t,r)=>{try{let n=C?`${C}/global/activity/model`:"/global/activity/model";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e1=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions`:"/global/activity/exceptions";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e2=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions/deployment`:"/global/activity/exceptions/deployment";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e4=async e=>{try{let t=C?`${C}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e6=async(e,t)=>{try{let r=C?`${C}/v2/key/info`:"/v2/key/info",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!n.ok){let e=await n.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw k(e),Error("Network response was not ok")}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t,r,n)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let o=C?`${C}/health/test_connection`:"/health/test_connection",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:n})}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||"error"===l.status)&&"error"!==l.status)return{status:"error",message:l.error?.message||`Connection test failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("Model connection test error:",e),e}},e7=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=C?`${C}/key/info`:"/key/info";r=`${r}?key=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",n),!n.ok){let e=await n.text();k(e),g.default.fromBackend("Failed to fetch key info - "+e)}let o=await n.json();return console.log("data",o),o}catch(e){throw console.error("Failed to fetch key info:",e),e}},e5=async(e,t,r,n,o,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=C?`${C}/key/list`:"/key/list";console.log("in keyListCall");let p=new URLSearchParams;r&&p.append("team_id",r.toString()),t&&p.append("organization_id",t.toString()),n&&p.append("key_alias",n),a&&p.append("key_hash",a),o&&p.append("user_id",o.toString()),i&&p.append("page",i.toString()),l&&p.append("size",l.toString()),s&&p.append("sort_by",s),c&&p.append("sort_order",c),u&&p.append("expand",u),d&&p.append("status",d),p.append("return_full_object","true"),p.append("include_team_keys","true"),p.append("include_created_by_keys","true");let m=p.toString();m&&(f+=`?${m}`);let h=await fetch(f,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=nW(e);throw k(t),Error(t)}let g=await h.json();return console.log("/team/list API Response:",g),g}catch(e){throw console.error("Failed to create key:",e),e}},e9=async(e,t=1,r=50,n)=>{try{let o=new URLSearchParams(Object.entries({page:String(t),size:String(r),...n?{search:n}:{}})),a=C?`${C}/key/aliases`:"/key/aliases";a=`${a}?${o}`;let i=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("/key/aliases API Response:",l),l}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e8=async(e,t)=>{try{let r=C?`${C}/spend/users`:"/spend/users";console.log("in spendUsersCall:",r);let n=await fetch(`${r}?user_id=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get spend for user",e),e}},te=async(e,t,r,n)=>{try{let o=C?`${C}/user/request_model`:"/user/request_model",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:r,justification:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=C?`${C}/user/get_requests`:"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to get requested models:",e),e}},tr=async(e,t,r,n=null)=>{try{let o=C?`${C}/user/daily/activity/aggregated`:"/user/daily/activity/aggregated",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),n&&a.append("user_id",n);let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},tn=async(e,t)=>{try{let r=C?`${C}/user/get_users?role=${t}`:`/user/get_users?role=${t}`;console.log("in userGetAllUsersCall:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get requested models:",e),e}},to=async e=>{try{let t=C?`${C}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("response from user/available_role",n),n}catch(e){throw e}},ta=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/team/new`:"/team/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/credentials`:"/credentials",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tl=async e=>{try{let t=C?`${C}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ts=async(e,t,r)=>{try{let n=C?`${C}/credentials`:"/credentials";t?n+=`/by_name/${t}`:r&&(n+=`/by_model/${r}`),console.log("in credentialListCall");let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t)=>{try{let r=C?`${C}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},tu=async(e,t,r)=>{try{if(console.log("Form Values in credentialUpdateCall:",r),r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let n=C?`${C}/credentials/${t}`:`/credentials/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},td=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let r=C?`${C}/key/update`:"/key/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("Update key Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=C?`${C}/team/update`:"/team/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),g.default.fromBackend("Failed to update team settings: "+e),Error(e)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to update team:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let n=C?`${C}/model/${r}/update`:`/model/${r}/update`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await o.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},tm=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let r=C?`${C}/model/update`:"/model/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let o=await n.json();return console.log("Update model Response:",o),o}catch(e){throw console.error("Failed to update model:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_add`:"/team/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!o.ok){let e=await o.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tg=async(e,t,r,n,o)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:n});let a=C?`${C}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};o?i.all_users=!0:i.members=r,null!=n&&(i.max_budget_in_team=n);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to bulk add team members",n=Error(r);throw n.raw=t,n}let s=await l.json();return console.log("Bulk team member add API Response:",s),s}catch(e){throw console.error("Failed to bulk add team members:",e),e}},tv=async(e,t,r)=>{try{console.log("Form Values in teamMemberUpdateCall:",r),console.log("Budget value:",r.max_budget_in_team),console.log("TPM limit:",r.tpm_limit),console.log("RPM limit:",r.rpm_limit);let n=C?`${C}/team/member_update`:"/team/member_update",o={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(o.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(o.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(o.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(o.rpm_limit=r.rpm_limit),console.log("Final request body:",o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!a.ok){let e=await a.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},ty=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_delete`:"/team/member_delete",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==r.user_email&&{user_email:r.user_email},...void 0!==r.user_id&&{user_id:r.user_id}})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tb=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/organization/member_add`:"/organization/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tw=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let n=C?`${C}/organization/member_delete`:"/organization/member_delete",o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},t$=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let n=C?`${C}/organization/member_update`:"/organization/member_update",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},tC=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let n=C?`${C}/user/update`:"/user/update",o={...t};null!==r&&(o.user_role=r),o=JSON.stringify(o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},tE=async(e,t,r,n=!1)=>{try{let o;console.log("Form Values in userUpdateUserCall:",t);let a=C?`${C}/user/bulk_update`:"/user/bulk_update";if(n)o=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let n of r)e.push({user_id:n,...t});o=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tS=async(e,t)=>{try{let r=C?`${C}/global/predict/spend/logs`:"/global/predict/spend/logs",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},tx=async e=>{try{let t=C?`${C}/health/services?service=slack_budget_alerts`:"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}let n=await r.json();return g.default.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",n),n}catch(e){throw console.error("Failed to perform health check:",e),e}},tj=async(e,t)=>{try{let r=C?`${C}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}return await n.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tk=async e=>{try{let t=C?`${C}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tO=async e=>{try{let t=C?`${C}/budget/settings`:"/budget/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tT=async(e,t,r)=>{try{let t=C?`${C}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async e=>{try{let t=C?`${C}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async e=>{try{let t=C?`${C}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tI=async e=>{try{let t=C?`${C}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tP=async(e,t)=>{try{let r=C?`${C}/cache/settings/test`:"/cache/settings/test",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tN=async(e,t)=>{try{let r=C?`${C}/cache/settings`:"/cache/settings",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tR=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async(e,t)=>{try{let r=C?`${C}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tB=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tA=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tz=async(e,t,r)=>{try{let n=C?`${C}/config/field/update`:"/config/field/update",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tL=async(e,t)=>{try{let r=C?`${C}/config/field/delete`:"/config/field/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return g.default.success("Field reset on proxy"),o}catch(e){throw console.error("Failed to get callbacks:",e),e}},tH=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tD=async(e,t)=>{try{let r=C?`${C}/config/update`:"/config/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tV=async e=>{try{let t=C?`${C}/health`:"/health",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tW=async(e,t)=>{try{let r=C?`${C}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tG=async e=>{try{let t=C?`${C}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tU=async(e,t,r,n=100,o=0)=>{try{let a=C?`${C}/health/history`:"/health/history",i=new URLSearchParams;t&&i.append("model",t),r&&i.append("status_filter",r),i.append("limit",n.toString()),i.append("offset",o.toString()),i.toString()&&(a+=`?${i.toString()}`);let l=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.text();throw k(e),Error(e)}return await l.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tq=async e=>{try{let t=C?`${C}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tJ=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",C);let t=C?`${C}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tK=async e=>{try{let t=C?`${C}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);return console.error("Failed to get UI settings:",t),null}return await r.json()}catch(e){return console.error("Failed to get UI settings:",e),null}},tX=async(e,t)=>{try{let r=C?`${C}/update/ui_settings`:"/update/ui_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update UI settings:",e),e}},tY=async e=>{try{let t=C?`${C}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tZ=async(e,t)=>{try{let r=C?`${C}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tQ=async(e,t,r)=>{try{let n=C?`${C}/v1/responses`:"/v1/responses",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:t,input:[{role:"user",content:r,type:"message"}],tools:[{type:"mcp",server_url:"litellm_proxy",require_approval:"never"}],tool_choice:"required"})}),a=o.headers.get("x-litellm-semantic-filter"),i=o.headers.get("x-litellm-semantic-filter-tools");if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return{data:await o.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},t0=async e=>{try{let t=C?`${C}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},t1=async(e,t,r)=>{try{let n=C?`${C}/guardrails/usage/overview`:"/guardrails/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},t2=async(e,t,r,n)=>{try{let o=C?`${C}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),n&&a.append("end_date",n),a.toString()&&(o+=`?${a.toString()}`);let i=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(nW(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},t4=async(e,t)=>{try{let r=C?`${C}/guardrails/usage/logs`:"/guardrails/usage/logs",n=new URLSearchParams;t.guardrailId&&n.append("guardrail_id",t.guardrailId),t.policyId&&n.append("policy_id",t.policyId),null!=t.page&&n.append("page",String(t.page)),null!=t.pageSize&&n.append("page_size",String(t.pageSize)),t.action&&n.append("action",t.action),t.startDate&&n.append("start_date",t.startDate),t.endDate&&n.append("end_date",t.endDate),n.toString()&&(r+=`?${n.toString()}`);let o=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json();throw Error(nW(e))}return o.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},t6=async(e,t,r)=>{try{let n=C?`${C}/policies/usage/overview`:"/policies/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get policies usage overview:",e),e}},t3=async e=>{try{let t=C?`${C}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},t7=async(e,t,r)=>{try{let n=C?`${C}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",o=await fetch(n,{method:"POST",signal:r,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({policy_names:t.policy_names??null,guardrail_names:t.guardrail_names??null,inputs:t.inputs??null,inputs_list:t.inputs_list??null,request_data:t.request_data??{},input_type:t.input_type??"request",agent_id:t.agent_id??null})});if(!o.ok){let e=await o.text(),t="Failed to test policies and guardrails";try{let r=JSON.parse(e);r.detail?t="string"==typeof r.detail?r.detail:JSON.stringify(r.detail):r.message&&(t=r.message)}catch{t=e||t}throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},t5=async(e,t)=>{try{let r=C?`${C}/policy/info/${t}`:`/policy/info/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},t9=async e=>{try{let t=C?`${C}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},t8=async(e,t,r,n,o)=>{try{let a=C?`${C}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};n&&(i.model=n),o&&(i.competitors=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},re=async(e,t,r,n)=>{try{let o=C?`${C}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},rt=async(e,t,r)=>{try{let n=C?`${C}/policy/templates/test`:"/policy/templates/test",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},rr=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:n};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=nW(await d.json());throw k(e),Error(e)}let f=d.body?.getReader();if(!f)throw Error("No response body");let p=new TextDecoder,m="";for(;;){let{done:e,value:t}=await f.read();if(e)break;let r=(m+=p.decode(t,{stream:!0})).split("\n");for(let e of(m=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"competitor"===t.type?o(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},rn=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=nW(await u.json());throw k(e),Error(e)}let d=u.body?.getReader();if(!d)throw Error("No response body");let f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await d.read();if(e)break;let r=(p+=f.decode(t,{stream:!0})).split("\n");for(let e of(p=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"chunk"===t.type?n(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?o():"error"===t.type&&a?.(t.message)}catch{}}},ro=async(e,t)=>{try{let r=C?`${C}/policies`:"/policies",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy:",e),e}},ra=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}`:`/policies/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy:",e),e}},ri=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},rl=async(e,t,r)=>{try{let n=encodeURIComponent(t),o=C?`${C}/policies/name/${n}/versions`:`/policies/name/${n}/versions`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},rs=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}/status`:`/policies/${t}/status`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},rc=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},ru=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},rd=async e=>{try{let t=C?`${C}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},rf=async(e,t)=>{try{let r=C?`${C}/policies/attachments`:"/policies/attachments",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rp=async(e,t)=>{try{let r=C?`${C}/policies/attachments/${t}`:`/policies/attachments/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rm=async(e,t,r)=>{try{let n=C?`${C}/policies/test-pipeline`:"/policies/test-pipeline",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},rh=async(e,t)=>{try{let r=C?`${C}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rg=async(e,t)=>{try{let r=C?`${C}/policies/resolve`:"/policies/resolve",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},rv=async(e,t)=>{try{let r=C?`${C}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ry=async e=>{try{let t=C?`${C}/prompts/list`:"/prompts/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rb=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/info`:`/prompts/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rw=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/versions`:`/prompts/${t}/versions`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw 404!==n.status&&k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},r$=async(e,t)=>{try{let r=C?`${C}/prompts`:"/prompts",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},rC=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rE=async(e,t)=>{try{let r=C?`${C}/prompts/${t}`:`/prompts/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rS=async(e,t)=>{try{let r=new FormData;r.append("file",t);let n=C?`${C}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`},body:r});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rx=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},rj=async(e,t)=>{try{let r=C?`${C}/v1/agents`:"/v1/agents",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create agent response:",o),o}catch(e){throw console.error("Failed to create agent:",e),e}},rk=async(e,t)=>{try{let r=C?`${C}/guardrails`:"/guardrails",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create guardrail response:",o),o}catch(e){throw console.error("Failed to create guardrail:",e),e}},rO=async(e,t,r)=>{try{let n=C?`${C}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",n);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rT=async e=>{try{let t=C?`${C}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO settings:",n),n}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rF=async(e,t)=>{try{let r=C?`${C}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Updated internal user settings:",o),g.default.success("Internal user settings updated successfully"),o}catch(e){throw console.error("Failed to update internal user settings:",e),e}},r_=async e=>{try{let t=C?`${C}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rI=async e=>{try{let t=C?`${C}/v1/mcp/server`:"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},rP=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server/health`:"/v1/mcp/server/health";if(t&&t.length>0){let e=new URLSearchParams;t.forEach(t=>e.append("server_ids",t)),r=`${r}?${e.toString()}`}console.log("Fetching MCP server health from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched MCP server health:",o),o}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rN=async e=>{try{let t=C?`${C}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP access groups:",n),n.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rR=async e=>{try{let t=C?`${C}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rM=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},rB=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rA=async(e,t)=>{try{let r=(C?`${C}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rz=async e=>{try{let t=C?`${C}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched search tools:",n),n}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rL=async(e,t)=>{try{let r=C?`${C}/search_tools/${t}`:`/search_tools/${t}`;console.log("Fetching search tool by ID from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched search tool:",o),o}catch(e){throw console.error("Failed to fetch search tool:",e),e}},rH=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=C?`${C}/search_tools`:"/search_tools",n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Created search tool:",o),o}catch(e){throw console.error("Failed to create search tool:",e),e}},rD=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let n=C?`${C}/search_tools/${t}`:`/search_tools/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rV=async(e,t)=>{try{let r=(C?`${C}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Deleted search tool:",o),o}catch(e){throw console.error("Failed to delete search tool:",e),e}},rW=async e=>{try{let t=C?`${C}/search_tools/ui/available_providers`:"/search_tools/ui/available_providers";console.log("Fetching available search providers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched available search providers:",n),n}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rG=async(e,t)=>{try{let r=C?`${C}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Test connection response:",o),o}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rU=async(e,t,r)=>{try{let n=C?`${C}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",n);let o={[F]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(n,{method:"GET",headers:o}),i=await a.json();if(console.log("Fetched MCP tools response:",i),!a.ok){if(i.error&&i.message)throw Error(i.message);throw Error("Failed to fetch MCP tools")}return i}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools",stack_trace:null}}},rq=async(e,t,r,n,o)=>{try{let a=C?`${C}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",n,"for server:",t);let i={[F]:`Bearer ${e}`,"Content-Type":"application/json",...o?.customHeaders||{}},l={server_id:t,name:r,arguments:n};o?.guardrails&&o.guardrails.length>0&&(l.litellm_metadata={guardrails:o.guardrails});let s=await fetch(a,{method:"POST",headers:i,body:JSON.stringify(l)});if(!s.ok){let e="Network response was not ok",t=null,r=await s.text();try{let n=JSON.parse(r);n.detail?"string"==typeof n.detail?e=n.detail:"object"==typeof n.detail&&(e=n.detail.message||n.detail.error||"An error occurred",t=n.detail):e=n.message||n.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let n=Error(e);throw n.status=s.status,n.statusText=s.statusText,n.details=t,k(e),n}let c=await s.json();return console.log("MCP tool call response:",c),c}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},rJ=async(e,t)=>{try{let r=C?`${C}/tag/new`:"/tag/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error creating tag:",e),e}},rK=async(e,t)=>{try{let r=C?`${C}/tag/update`:"/tag/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error updating tag:",e),e}},rX=async(e,t)=>{try{let r=C?`${C}/tag/info`:"/tag/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!n.ok){let e=await n.text();return await k(e),{}}return await n.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rY=async e=>{try{let t=C?`${C}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await k(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rZ=async(e,t)=>{try{let r=C?`${C}/tag/delete`:"/tag/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rQ=async e=>{try{let t=C?`${C}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched default team settings:",n),n}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},r0=async(e,t)=>{try{let r=C?`${C}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Updated default team settings:",o),g.default.success("Default team settings updated successfully"),o}catch(e){throw console.error("Failed to update default team settings:",e),e}},r1=async(e,t)=>{try{let r=C?`${C}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Team permissions response:",o),o}catch(e){throw console.error("Failed to get team permissions:",e),e}},r2=async(e,t,r)=>{try{let n=C?`${C}/team/permissions_update`:"/team/permissions_update",o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},r4=async(e,t)=>{try{let r=C?`${C}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},r6=async(e,t)=>{try{let r=C?`${C}/vector_store/new`:"/vector_store/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to create vector store")}return await n.json()}catch(e){throw console.error("Error creating vector store:",e),e}},r3=async(e,t=1,r=100)=>{try{let t=C?`${C}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to list vector stores")}return await r.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},r7=async(e,t)=>{try{let r=C?`${C}/vector_store/delete`:"/vector_store/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to delete vector store")}return await n.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},r5=async(e,t)=>{try{let r=C?`${C}/vector_store/info`:"/vector_store/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to get vector store info")}return await n.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},r9=async(e,t)=>{try{let r=C?`${C}/vector_store/update`:"/vector_store/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to update vector store")}return await n.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r8=async(e,t,r,n,o,a,i)=>{try{let l=C?`${C}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...n&&{vector_store_id:n},...i&&i}}};(o||a)&&(c.ingest_options.litellm_vector_store_params={},o&&(c.ingest_options.litellm_vector_store_params.vector_store_name=o),a&&(c.ingest_options.litellm_vector_store_params.vector_store_description=a)),s.append("request",JSON.stringify(c));let u=await fetch(l,{method:"POST",headers:{[F]:`Bearer ${e}`},body:s});if(!u.ok){let e=await u.json();throw Error(e.error?.message||e.detail||"Failed to ingest document")}return await u.json()}catch(e){throw console.error("Error ingesting document:",e),e}},ne=async e=>{try{let t=C?`${C}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get email event settings")}let n=await r.json();return console.log("Email event settings response:",n),n}catch(e){throw console.error("Failed to get email event settings:",e),e}},nt=async(e,t)=>{try{let r=C?`${C}/email/event_settings`:"/email/event_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to update email event settings")}let o=await n.json();return console.log("Update email event settings response:",o),o}catch(e){throw console.error("Failed to update email event settings:",e),e}},nr=async e=>{try{let t=C?`${C}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to reset email event settings")}let n=await r.json();return console.log("Reset email event settings response:",n),n}catch(e){throw console.error("Failed to reset email event settings:",e),e}},nn=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete agent response:",o),o}catch(e){throw console.error("Failed to delete agent:",e),e}},no=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}/make_public`:`/v1/agents/${t}/make_public`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agent public response:",o),o}catch(e){throw console.error("Failed to make agent public:",e),e}},na=async(e,t)=>{try{let r=C?`${C}/v1/agents/make_public`:"/v1/agents/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},ni=async(e,t)=>{try{let r=C?`${C}/v1/mcp/make_public`:"/v1/mcp/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},nl=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete guardrail response:",o),o}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ns=async e=>{try{let t=C?`${C}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail UI settings")}let n=await r.json();return console.log("Guardrail UI settings response:",n),n}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},nc=async e=>{try{let t=C?`${C}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail provider specific parameters")}let n=await r.json();return console.log("Guardrail provider specific params response:",n),n}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},nu=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${n}`);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw console.error(`Failed to get category YAML. Status: ${o.status}, Error:`,e),k(e),Error(`Failed to get category YAML: ${o.status} ${e}`)}let a=await o.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},nd=async e=>{try{let t=C?`${C}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw console.error(`Failed to get major airlines. Status: ${r.status}, Error:`,e),k(e),Error(`Failed to get major airlines: ${r.status} ${e}`)}return await r.json()}catch(e){throw console.error("Failed to get major airlines:",e),e}},nf=async e=>{try{let t=C?`${C}/v1/agents`:"/v1/agents",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get agents list")}let n=await r.json();return console.log("Agents list response:",n),{agents:n}}catch(e){throw console.error("Failed to get agents list:",e),e}},np=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get agent info")}let o=await n.json();return console.log("Agent info response:",o),o}catch(e){throw console.error("Failed to get agent info:",e),e}},nm=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}/info`:`/guardrails/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get guardrail info")}let o=await n.json();return console.log("Guardrail info response:",o),o}catch(e){throw console.error("Failed to get guardrail info:",e),e}},nh=async(e,t,r)=>{try{let n=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to patch agent")}let a=await o.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ng=async(e,t,r)=>{try{let n=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to update guardrail")}let a=await o.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},nv=async(e,t,r,n,o)=>{try{let a=C?`${C}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};n&&(i.language=n),o&&o.length>0&&(i.entities=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t="Failed to apply guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let s=await l.json();return console.log("Apply guardrail response:",s),s}catch(e){throw console.error("Failed to apply guardrail:",e),e}},ny=async(e,t)=>{try{let r=C?`${C}/guardrails/test_custom_code`:"/guardrails/test_custom_code",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t="Failed to test custom code guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let o=await n.json();return console.log("Test custom code guardrail response:",o),o}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},nb=async(e,t)=>{try{let r=C?`${C}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to validate blocked words file")}let o=await n.json();return console.log("Validate blocked words file response:",o),o}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},nw=async e=>{try{let t=C?`${C}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO configuration:",n),n}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},n$=async(e,t)=>{try{let r=C?`${C}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:nW(e);k(r);let o=Error(r);throw e?.detail!==void 0&&(o.detail=e.detail),o.rawError=e,o}let o=await n.json();return console.log("Updated SSO configuration:",o),o}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},nC=async(e,t,r,n,o)=>{try{let t=C?`${C}/audit`:"/audit",r=new URLSearchParams;n&&r.append("page",n.toString()),o&&r.append("page_size",o.toString());let a=r.toString();a&&(t+=`?${a}`);let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},nE=async e=>{try{let t=C?`${C}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},nS=async e=>{try{let t=C?`${C}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},nx=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},nj=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`:`/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=(await n.json()).endpoints;if(!o||0===o.length)throw Error("Pass through endpoint not found");return o[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},nk=async(e,t)=>{try{let r=C?`${C}/config/callback/delete`:"/config/callback/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},nO=async e=>{let t=E(),r=await fetch(`${t}/v1/mcp/tools`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`HTTP error! status: ${r.status}`);return await r.json()},nT=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let r=C?`${C}/mcp-rest/test/connection`:"/mcp-rest/test/connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)}),o=n.headers.get("content-type");if(!o||!o.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${n.status}: ${n.statusText}). Check network tab for details.`)}let a=await n.json();if((!n.ok||"error"===a.status)&&"error"!==a.status)return{status:"error",message:a.error?.message||`MCP connection test failed: ${n.status} ${n.statusText}`};return a}catch(e){throw console.error("MCP connection test error:",e),e}},nF=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let n=C?`${C}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",o={"Content-Type":"application/json"};e&&(o["x-litellm-api-key"]=e),r?o.Authorization=`Bearer ${r}`:e&&(o[F]=`Bearer ${e}`);let a=await fetch(n,{method:"POST",headers:o,body:JSON.stringify(t)}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||l.error)&&!l.error)return{tools:[],error:"request_failed",message:l.message||`MCP tools list failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("MCP tools list test error:",e),e}},n_=async(e,t)=>{let r=C?`${C}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),o=await n.json();if(!n.ok)throw Error(nW(o)||o?.error||"Failed to cache MCP server");return o},nI=async(e,t,r)=>{let n=E(),o=encodeURIComponent(t.trim()),a=`${n}/v1/mcp/server/oauth/${o}/register`,i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify(r)}),l=await i.json();if(!i.ok)throw Error(nW(l)||l?.detail||"Failed to register OAuth client");return l},nP=({serverId:e,clientId:t,redirectUri:r,state:n,codeChallenge:o,scope:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:n,response_type:"code",code_challenge:o,code_challenge_method:"S256"});return t&&t.trim().length>0&&c.set("client_id",t),a&&a.trim().length>0&&c.set("scope",a),`${s}?${c.toString()}`},nN=async({serverId:e,code:t,clientId:r,clientSecret:n,codeVerifier:o,redirectUri:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/token`,c=new URLSearchParams;c.set("grant_type","authorization_code"),c.set("code",t),r&&r.trim().length>0&&c.set("client_id",r),n&&n.trim().length>0&&c.set("client_secret",n),c.set("code_verifier",o),c.set("redirect_uri",a);let u=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}),d=await u.json();if(!u.ok)throw Error(nW(d)||d?.detail||"OAuth token exchange failed");return d},nR=async(e,t,r)=>{try{let n=`${E()}/v1/vector_stores/${t}/search`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!o.ok){let e=await o.text();return await k(e),null}return await o.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},nM=async(e,t,r,n)=>{try{let o=`${E()}/v1/search/${t}`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:n||5})});if(!a.ok){let e=await a.text();return await k(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},nB=async(e,t,r,n=1,o=50,a)=>{try{let i=C?`${C}/tag/user-agent/analytics`:"/tag/user-agent/analytics",l=new URLSearchParams,s=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};l.append("start_date",s(t)),l.append("end_date",s(r)),l.append("page",n.toString()),l.append("page_size",o.toString()),a&&l.append("user_agent_filter",a);let c=l.toString();c&&(i+=`?${c}`);let u=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},nA=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},nz=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},nL=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},nH=async e=>{try{let t=C?`${C}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},nD=async(e,t,r,n)=>{try{let o=C?`${C}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},nV=async(e,t=1,r=50,n)=>{try{let o=C?`${C}/tag/user-agent/per-user-analytics`:"/tag/user-agent/per-user-analytics",a=new URLSearchParams;a.append("page",t.toString()),a.append("page_size",r.toString()),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(o+=`?${i}`);let l=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},nW=e=>e?.error&&(e.error.message||e.error)||e?.message||e?.detail||e?.error||JSON.stringify(e),nG=async(e,t)=>{let r=E(),n=r?`${r}/v2/login`:"/v2/login",o=JSON.stringify({username:e,password:t}),a=await fetch(n,{method:"POST",body:o,credentials:"include",headers:{"Content-Type":"application/json"}});if(!a.ok)throw Error(nW(await a.json()));return await a.json()},nU=async()=>{let e=E(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(nW(await r.json()));return await r.json()},nq=async(e,t)=>{let r=E(),n=r?`${r}/update/ui_settings`:"/update/ui_settings",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(nW(await o.json()));return await o.json()},nJ=async()=>{try{let e=E(),t=e?`${e}/claude-code/marketplace.json`:"/claude-code/marketplace.json",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},nK=async(e,t=!1)=>{try{let r=E(),n=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},nX=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},nY=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins`:"/claude-code/plugins",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},nZ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},nQ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},n0=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},n1=async(e,t)=>{let r=C?`${C}/compliance/eu-ai-act`:"/compliance/eu-ai-act",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n2=async(e,t)=>{let r=C?`${C}/compliance/gdpr`:"/compliance/gdpr",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n4=async e=>{let t=C?`${C}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},n6=async(e,t,r)=>{let n=C?`${C}/v1/tool/policy`:"/v1/tool/policy",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({tool_name:t,call_policy:r})});if(!o.ok)throw Error(await o.text());return o.json()}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/ad426ab08aee6c64.js b/litellm/proxy/_experimental/out/_next/static/chunks/ad426ab08aee6c64.js
index f77f6e14fe3..04f389f9d19 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/ad426ab08aee6c64.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/ad426ab08aee6c64.js
@@ -102,4 +102,4 @@
${u}${d}topRight
`]:{animationName:i.slideDownOut},"&-hidden":{display:"none"},[o]:Object.assign(Object.assign({},l(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},t.textEllipsis),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${o}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},l(e)),{color:e.colorTextDisabled})}),[`${f}:has(+ ${f})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${f}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,i.initSlideMotion)(e,"slide-up"),(0,i.initSlideMotion)(e,"slide-down"),(0,a.initMoveMotion)(e,"move-up"),(0,a.initMoveMotion)(e,"move-down")]})(e),{[`${n}-rtl`]:{direction:"rtl"}},(0,r.genCompactItemStyle)(e,{borderElCls:`${n}-selector`,focusElCls:`${n}-focused`})]})(v),{[v.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},{"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},d(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),f(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),f(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})}),{"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},p(v,{bg:v.colorFillTertiary,hoverBg:v.colorFillSecondary,activeBorderColor:v.activeBorderColor,color:v.colorText})),m(v,{status:"error",bg:v.colorErrorBg,hoverBg:v.colorErrorBgHover,activeBorderColor:v.colorError,color:v.colorError})),m(v,{status:"warning",bg:v.colorWarningBg,hoverBg:v.colorWarningBgHover,activeBorderColor:v.colorWarning,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{borderColor:v.colorBorder,background:v.colorBgContainerDisabled,color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.colorBgContainer,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.colorSplit}`}})}),{"&-borderless":{[`${v.componentCls}-selector`]:{background:"transparent",border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} transparent`},[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`},[`&${v.componentCls}-status-error`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorError}},[`&${v.componentCls}-status-warning`]:{[`${v.componentCls}-prefix, ${v.componentCls}-selection-item`]:{color:v.colorWarning}}}}),{"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},h(v,{borderColor:v.colorBorder,hoverBorderHover:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeOutlineColor:v.activeOutlineColor,color:v.colorText})),g(v,{status:"error",borderColor:v.colorError,hoverBorderHover:v.colorErrorHover,activeBorderColor:v.colorError,activeOutlineColor:v.colorErrorOutline,color:v.colorError})),g(v,{status:"warning",borderColor:v.colorWarning,hoverBorderHover:v.colorWarningHover,activeBorderColor:v.colorWarning,activeOutlineColor:v.colorWarningOutline,color:v.colorWarning})),{[`&${v.componentCls}-disabled`]:{[`&:not(${v.componentCls}-customize-input) ${v.componentCls}-selector`]:{color:v.colorTextDisabled}},[`&${v.componentCls}-multiple ${v.componentCls}-selection-item`]:{background:v.multipleItemBg,border:`${(0,s.unit)(v.lineWidth)} ${v.lineType} ${v.multipleItemBorderColor}`}})})}]},e=>{let{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:s,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:y,colorPrimary:b,controlOutline:w}=e,$=2*l,C=2*n,E=Math.min(o-$,o-C),S=Math.min(a-$,a-C),x=Math.min(i-$,i-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(o-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:i,multipleItemBg:h,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:S,multipleItemHeightLG:x,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:y,activeBorderColor:b,activeOutlineColor:w,selectAffixPadding:l}},{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});e.s(["default",0,v],950302)},121229,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var o=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["default",0,a],121229)},729151,e=>{"use strict";var t=e.i(271645),r=e.i(121229),n=e.i(726289),o=e.i(864517),a=e.i(247153),i=e.i(739295),l=e.i(38953);function s({suffixIcon:e,clearIcon:s,menuItemSelectedIcon:c,removeIcon:u,loading:d,multiple:f,hasFeedback:p,prefixCls:m,showSuffixIcon:h,feedbackIcon:g,showArrow:v,componentName:y}){let b=null!=s?s:t.createElement(n.default,null),w=r=>null!==e||p||v?t.createElement(t.Fragment,null,!1!==h&&r,p&&g):null,$=null;if(void 0!==e)$=w(e);else if(d)$=w(t.createElement(i.default,{spin:!0}));else{let e=`${m}-suffix`;$=({open:r,showSearch:n})=>r&&n?w(t.createElement(l.default,{className:e})):w(t.createElement(a.default,{className:e}))}let C=null;C=void 0!==c?c:f?t.createElement(r.default,null):null;return{clearIcon:b,suffixIcon:$,itemIcon:C,removeIcon:void 0!==u?u:t.createElement(o.default,null)}}e.s(["default",()=>s])},327494,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),n=e.i(123829),o=e.i(955492),a=e.i(869301),i=e.i(529681),l=e.i(122767),s=e.i(613541),c=e.i(805484),u=e.i(52956),d=e.i(242064),f=e.i(721132),p=e.i(937328),m=e.i(321883),h=e.i(517455),g=e.i(62139),v=e.i(792812),y=e.i(249616),b=e.i(104458),w=e.i(85566),$=e.i(950302),C=e.i(729151),E=e.i(617206),S=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let x="SECRET_COMBOBOX_MODE_DO_NOT_USE",j=t.forwardRef((e,o)=>{var a,c,j,k,O,T,F,_;let I,{prefixCls:P,bordered:N,className:R,rootClassName:M,getPopupContainer:B,popupClassName:A,dropdownClassName:z,listHeight:L=256,placement:H,listItemHeight:D,size:V,disabled:W,notFoundContent:G,status:U,builtinPlacements:q,dropdownMatchSelectWidth:J,popupMatchSelectWidth:K,direction:X,style:Y,allowClear:Z,variant:Q,dropdownStyle:ee,transitionName:et,tagRender:er,maxCount:en,prefix:eo,dropdownRender:ea,popupRender:ei,onDropdownVisibleChange:el,onOpenChange:es,styles:ec,classNames:eu}=e,ed=S(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:ef,getPrefixCls:ep,renderEmpty:em,direction:eh,virtual:eg,popupMatchSelectWidth:ev,popupOverflow:ey}=t.useContext(d.ConfigContext),{showSearch:eb,style:ew,styles:e$,className:eC,classNames:eE}=(0,d.useComponentConfig)("select"),[,eS]=(0,b.useToken)(),ex=null!=D?D:null==eS?void 0:eS.controlHeight,ej=ep("select",P),ek=ep(),eO=null!=X?X:eh,{compactSize:eT,compactItemClassnames:eF}=(0,y.useCompactItemContext)(ej,eO),[e_,eI]=(0,v.default)("select",Q,N),eP=(0,m.default)(ej),[eN,eR,eM]=(0,$.default)(ej,eP),eB=t.useMemo(()=>{let{mode:t}=e;if("combobox"!==t)return t===x?"combobox":t},[e.mode]),eA="multiple"===eB||"tags"===eB,ez=(T=e.suffixIcon,void 0!==(F=e.showArrow)?F:null!==T),eL=null!=(a=null!=K?K:J)?a:ev,eH=(null==(c=null==ec?void 0:ec.popup)?void 0:c.root)||(null==(j=e$.popup)?void 0:j.root)||ee,eD=(_=ei||ea,t.default.useMemo(()=>{if(_)return(...e)=>t.default.createElement(E.default,{space:!0},_.apply(void 0,e))},[_])),{status:eV,hasFeedback:eW,isFormItemInput:eG,feedbackIcon:eU}=t.useContext(g.FormItemInputContext),eq=(0,u.getMergedStatus)(eV,U);I=void 0!==G?G:"combobox"===eB?null:(null==em?void 0:em("Select"))||t.createElement(f.default,{componentName:"Select"});let{suffixIcon:eJ,itemIcon:eK,removeIcon:eX,clearIcon:eY}=(0,C.default)(Object.assign(Object.assign({},ed),{multiple:eA,hasFeedback:eW,feedbackIcon:eU,showSuffixIcon:ez,prefixCls:ej,componentName:"Select"})),eZ=(0,i.default)(ed,["suffixIcon","itemIcon"]),eQ=(0,r.default)((null==(k=null==eu?void 0:eu.popup)?void 0:k.root)||(null==(O=null==eE?void 0:eE.popup)?void 0:O.root)||A||z,{[`${ej}-dropdown-${eO}`]:"rtl"===eO},M,eE.root,null==eu?void 0:eu.root,eM,eP,eR),e0=(0,h.default)(e=>{var t;return null!=(t=null!=V?V:eT)?t:e}),e1=t.useContext(p.default),e2=(0,r.default)({[`${ej}-lg`]:"large"===e0,[`${ej}-sm`]:"small"===e0,[`${ej}-rtl`]:"rtl"===eO,[`${ej}-${e_}`]:eI,[`${ej}-in-form-item`]:eG},(0,u.getStatusClassNames)(ej,eq,eW),eF,eC,R,eE.root,null==eu?void 0:eu.root,M,eM,eP,eR),e4=t.useMemo(()=>void 0!==H?H:"rtl"===eO?"bottomRight":"bottomLeft",[H,eO]),[e6]=(0,l.useZIndex)("SelectLike",null==eH?void 0:eH.zIndex);return eN(t.createElement(n.default,Object.assign({ref:o,virtual:eg,showSearch:eb},eZ,{style:Object.assign(Object.assign(Object.assign(Object.assign({},e$.root),null==ec?void 0:ec.root),ew),Y),dropdownMatchSelectWidth:eL,transitionName:(0,s.getTransitionName)(ek,"slide-up",et),builtinPlacements:(0,w.default)(q,ey),listHeight:L,listItemHeight:ex,mode:eB,prefixCls:ej,placement:e4,direction:eO,prefix:eo,suffixIcon:eJ,menuItemSelectedIcon:eK,removeIcon:eX,allowClear:!0===Z?{clearIcon:eY}:Z,notFoundContent:I,className:e2,getPopupContainer:B||ef,dropdownClassName:eQ,disabled:null!=W?W:e1,dropdownStyle:Object.assign(Object.assign({},eH),{zIndex:e6}),maxCount:eA?en:void 0,tagRender:eA?er:void 0,dropdownRender:eD,onDropdownVisibleChange:es||el})))}),k=(0,c.default)(j,"dropdownAlign");j.SECRET_COMBOBOX_MODE_DO_NOT_USE=x,j.Option=a.Option,j.OptGroup=o.OptGroup,j._InternalPanelDoNotUseOrYouWillBeFired=k,e.s(["default",0,j],327494)},199133,e=>{"use strict";var t=e.i(327494);e.s(["Select",()=>t.default])},689074,21243,98801,e=>{"use strict";var t=e.i(290571),r=e.i(271645);let n=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"}))};e.s(["default",()=>n],689074);let o=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12ZM12.0003 17C14.7617 17 17.0003 14.7614 17.0003 12C17.0003 9.23858 14.7617 7 12.0003 7C9.23884 7 7.00026 9.23858 7.00026 12C7.00026 14.7614 9.23884 17 12.0003 17ZM12.0003 15C10.3434 15 9.00026 13.6569 9.00026 12C9.00026 10.3431 10.3434 9 12.0003 9C13.6571 9 15.0003 10.3431 15.0003 12C15.0003 13.6569 13.6571 15 12.0003 15Z"}))};e.s(["default",()=>o],21243);let a=e=>{var n=(0,t.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},n),r.default.createElement("path",{d:"M4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457ZM14.7577 16.1718L13.2937 14.7078C12.902 14.8952 12.4634 15.0002 12.0003 15.0002C10.3434 15.0002 9.00026 13.657 9.00026 12.0002C9.00026 11.537 9.10522 11.0984 9.29263 10.7067L7.82866 9.24277C7.30514 10.0332 7.00026 10.9811 7.00026 12.0002C7.00026 14.7616 9.23884 17.0002 12.0003 17.0002C13.0193 17.0002 13.9672 16.6953 14.7577 16.1718ZM7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925L16.947 12.7327C16.9821 12.4936 17.0003 12.249 17.0003 12.0002C17.0003 9.23873 14.7617 7.00016 12.0003 7.00016C11.7514 7.00016 11.5068 7.01833 11.2677 7.05343L7.97446 3.76015Z"}))};e.s(["default",()=>a],98801)},103471,e=>{"use strict";var t=e.i(444755),r=e.i(271645);let n=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(n).join(""):"object"==typeof e&&e?n(e.props.children):void 0;function o(e){let t=new Map;return r.default.Children.map(e,e=>{var r;t.set(e.props.value,null!=(r=n(e))?r:e.props.value)}),t}function a(e,t){return r.default.Children.map(t,t=>{var r;if((null!=(r=n(t))?r:t.props.value).toLowerCase().includes(e.toLowerCase()))return t})}let i=(e,r,n=!1)=>(0,t.tremorTwMerge)(r?"bg-tremor-background-subtle dark:bg-dark-tremor-background-subtle":"bg-tremor-background dark:bg-dark-tremor-background",!r&&"hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-muted",e?"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis":"text-tremor-content dark:text-dark-tremor-content",r&&"text-tremor-content-subtle dark:text-dark-tremor-content-subtle",n&&"text-red-500 placeholder:text-red-500 dark:text-red-500 dark:placeholder:text-red-500",n?"border-red-500 dark:border-red-500":"border-tremor-border dark:border-dark-tremor-border");function l(e){return null!=e&&""!==e}e.s(["constructValueToNameMapping",()=>o,"getFilteredOptions",()=>a,"getNodeText",()=>n,"getSelectButtonColors",()=>i,"hasValue",()=>l])},779241,677955,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(673706),o=e.i(689074),a=e.i(21243),i=e.i(98801),l=e.i(103471),s=e.i(444755);let c=r.default.forwardRef((e,c)=>{let{value:u,defaultValue:d,type:f,placeholder:p="Type...",icon:m,error:h=!1,errorMessage:g,disabled:v=!1,stepper:y,makeInputClassName:b,className:w,onChange:$,onValueChange:C,autoFocus:E,pattern:S}=e,x=(0,t.__rest)(e,["value","defaultValue","type","placeholder","icon","error","errorMessage","disabled","stepper","makeInputClassName","className","onChange","onValueChange","autoFocus","pattern"]),[j,k]=(0,r.useState)(E||!1),[O,T]=(0,r.useState)(!1),F=(0,r.useCallback)(()=>T(!O),[O,T]),_=(0,r.useRef)(null),I=(0,l.hasValue)(u||d);return r.default.useEffect(()=>{let e=()=>k(!0),t=()=>k(!1),r=_.current;return r&&(r.addEventListener("focus",e),r.addEventListener("blur",t),E&&r.focus()),()=>{r&&(r.removeEventListener("focus",e),r.removeEventListener("blur",t))}},[E]),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:(0,s.tremorTwMerge)(b("root"),"relative w-full flex items-center min-w-[10rem] outline-none rounded-tremor-default transition duration-100 border","shadow-tremor-input","dark:shadow-dark-tremor-input",(0,l.getSelectButtonColors)(I,v,h),j&&(0,s.tremorTwMerge)("ring-2","border-tremor-brand-subtle ring-tremor-brand-muted","dark:border-dark-tremor-brand-subtle dark:ring-dark-tremor-brand-muted"),w)},m?r.default.createElement(m,{className:(0,s.tremorTwMerge)(b("icon"),"shrink-0 h-5 w-5 mx-2.5 absolute left-0 flex items-center","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}):null,r.default.createElement("input",Object.assign({ref:(0,n.mergeRefs)([_,c]),defaultValue:d,value:u,type:O?"text":f,className:(0,s.tremorTwMerge)(b("input"),"w-full bg-transparent focus:outline-none focus:ring-0 border-none text-tremor-default rounded-tremor-default transition duration-100 py-2","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none","password"===f?h?"pr-16":"pr-12":h?"pr-8":"pr-3",m?"pl-10":"pl-3",v?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content"),placeholder:p,disabled:v,"data-testid":"base-input",onChange:e=>{null==$||$(e),null==C||C(e.target.value)},pattern:S},x)),"password"!==f||v?null:r.default.createElement("button",{className:(0,s.tremorTwMerge)(b("toggleButton"),"absolute inset-y-0 right-0 flex items-center px-2.5 rounded-lg"),type:"button",onClick:()=>F(),"aria-label":O?"Hide password":"Show Password"},O?r.default.createElement(i.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0}):r.default.createElement(a.default,{className:(0,s.tremorTwMerge)("flex-none h-5 w-5 transition","text-tremor-content-subtle hover:text-tremor-content","dark:text-dark-tremor-content-subtle hover:dark:text-dark-tremor-content"),"aria-hidden":!0})),h?r.default.createElement(o.default,{className:(0,s.tremorTwMerge)(b("errorIcon"),"text-red-500 shrink-0 h-5 w-5 absolute right-0 flex items-center","password"===f?"mr-10":"number"===f?y?"mr-20":"mr-3":"mx-2.5")}):null,null!=y?y:null),h&&g?r.default.createElement("p",{className:(0,s.tremorTwMerge)(b("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});c.displayName="BaseInput",e.s(["default",()=>c],677955);let u=(0,n.makeClassName)("TextInput"),d=r.default.forwardRef((e,n)=>{let{type:o="text"}=e,a=(0,t.__rest)(e,["type"]);return r.default.createElement(c,Object.assign({ref:n,type:o,makeInputClassName:u},a))});d.displayName="TextInput",e.s(["TextInput",()=>d],779241)},827252,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};var o=e.i(9583),a=r.forwardRef(function(e,a){return r.createElement(o.default,(0,t.default)({},e,{ref:a,icon:n}))});e.s(["InfoCircleOutlined",0,a],827252)},592968,e=>{"use strict";var t=e.i(491816);e.s(["Tooltip",()=>t.default])},122550,e=>{"use strict";function t(e,t){return e.length>t?e.substring(0,t)+"...":e}e.s(["formItemValidateJSON",0,(e,t)=>{if(!t)return Promise.resolve();try{return JSON.parse(t),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}},"formatLabel",0,e=>e?e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):e,"truncateString",()=>t])},764205,82946,e=>{"use strict";e.s(["PredictedSpendLogsCall",()=>tS,"addAllowedIP",()=>eM,"adminGlobalActivity",()=>eZ,"adminGlobalActivityExceptions",()=>e1,"adminGlobalActivityExceptionsPerDeployment",()=>e2,"adminGlobalActivityPerModel",()=>e0,"adminGlobalCacheActivity",()=>eQ,"adminSpendLogsCall",()=>eJ,"adminTopEndUsersCall",()=>eX,"adminTopKeysCall",()=>eK,"adminTopModelsCall",()=>e4,"adminspendByProvider",()=>eY,"agentDailyActivityCall",()=>eC,"agentHubPublicModelsCall",()=>eI,"alertingSettingsCall",()=>X,"allEndUsersCall",()=>eW,"allTagNamesCall",()=>eV,"applyGuardrail",()=>nv,"availableTeamListCall",()=>ec,"budgetCreateCall",()=>U,"budgetDeleteCall",()=>G,"budgetUpdateCall",()=>q,"buildMcpOAuthAuthorizeUrl",()=>nP,"cacheTemporaryMcpServer",()=>n_,"cachingHealthCheckCall",()=>tG,"callMCPTool",()=>rq,"cancelModelCostMapReload",()=>L,"checkEuAiActCompliance",()=>n1,"checkGdprCompliance",()=>n2,"claimOnboardingToken",()=>ex,"convertPromptFileToJson",()=>rS,"createAgentCall",()=>rj,"createGuardrailCall",()=>rk,"createMCPServer",()=>rM,"createPassThroughEndpoint",()=>tA,"createPolicyAttachmentCall",()=>rf,"createPolicyCall",()=>ro,"createPolicyVersion",()=>rl,"createPromptCall",()=>r$,"createSearchTool",()=>rH,"credentialCreateCall",()=>ti,"credentialDeleteCall",()=>tc,"credentialGetCall",()=>ts,"credentialListCall",()=>tl,"credentialUpdateCall",()=>tu,"customerDailyActivityCall",()=>e$,"defaultProxyBaseUrl",()=>w,"deleteAgentCall",()=>nn,"deleteAllowedIP",()=>eB,"deleteCallback",()=>nk,"deleteClaudeCodePlugin",()=>n0,"deleteConfigFieldSetting",()=>tL,"deleteGuardrailCall",()=>nl,"deleteMCPServer",()=>rA,"deletePassThroughEndpointsCall",()=>tH,"deletePolicyAttachmentCall",()=>rp,"deletePolicyCall",()=>rc,"deletePromptCall",()=>rE,"deleteSearchTool",()=>rV,"deriveErrorMessage",()=>nW,"disableClaudeCodePlugin",()=>nQ,"enableClaudeCodePlugin",()=>nZ,"enrichPolicyTemplate",()=>t8,"enrichPolicyTemplateStream",()=>rr,"estimateAttachmentImpactCall",()=>rv,"exchangeMcpOAuthToken",()=>nN,"fetchAvailableSearchProviders",()=>rW,"fetchDiscoverableMCPServers",()=>r_,"fetchMCPAccessGroups",()=>rN,"fetchMCPClientIp",()=>rR,"fetchMCPServerHealth",()=>rP,"fetchMCPServers",()=>rI,"fetchSearchToolById",()=>rL,"fetchSearchTools",()=>rz,"fetchToolsList",()=>n4,"formatDate",()=>v,"getAgentCreateMetadata",()=>T,"getAgentInfo",()=>np,"getAgentsList",()=>nf,"getAllowedIPs",()=>eR,"getBudgetList",()=>tk,"getBudgetSettings",()=>tO,"getCacheSettingsCall",()=>tI,"getCallbackConfigsCall",()=>y,"getCallbacksCall",()=>tT,"getCategoryYaml",()=>nu,"getClaudeCodeMarketplace",()=>nJ,"getClaudeCodePluginDetails",()=>nX,"getClaudeCodePluginsList",()=>nK,"getConfigFieldSetting",()=>tM,"getDefaultTeamSettings",()=>rQ,"getEmailEventSettings",()=>ne,"getGeneralSettingsCall",()=>tF,"getGlobalLitellmHeaderName",()=>I,"getGuardrailInfo",()=>nm,"getGuardrailProviderSpecificParams",()=>nc,"getGuardrailUISettings",()=>ns,"getGuardrailsList",()=>t0,"getGuardrailsUsageDetail",()=>t2,"getGuardrailsUsageLogs",()=>t4,"getGuardrailsUsageOverview",()=>t1,"getInProductNudgesCall",()=>b,"getInternalUserSettings",()=>rT,"getLicenseInfo",()=>nS,"getMCPSemanticFilterSettings",()=>tY,"getMajorAirlines",()=>nd,"getModelCostMapReloadStatus",()=>D,"getModelCostMapSource",()=>H,"getOnboardingCredentials",()=>eS,"getOpenAPISchema",()=>M,"getPassThroughEndpointInfo",()=>nj,"getPassThroughEndpointsCall",()=>tR,"getPoliciesList",()=>t3,"getPoliciesUsageOverview",()=>t6,"getPolicyAttachmentsList",()=>rd,"getPolicyInfo",()=>ru,"getPolicyInfoWithGuardrails",()=>t5,"getPolicyTemplates",()=>t9,"getPossibleUserRoles",()=>to,"getPromptInfo",()=>rb,"getPromptVersions",()=>rw,"getPromptsList",()=>ry,"getProviderCreateMetadata",()=>O,"getProxyBaseUrl",()=>E,"getProxyUISettings",()=>tJ,"getPublicModelHubInfo",()=>R,"getRemainingUsers",()=>nE,"getResolvedGuardrails",()=>rh,"getRouterSettingsCall",()=>t_,"getSSOSettings",()=>nw,"getTeamPermissionsCall",()=>r1,"getTotalSpendCall",()=>eE,"getUISettings",()=>tK,"getUiConfig",()=>N,"getUiSettings",()=>nU,"handleError",()=>k,"healthCheckCall",()=>tV,"healthCheckHistoryCall",()=>tU,"individualModelHealthCheckCall",()=>tW,"invitationClaimCall",()=>K,"invitationCreateCall",()=>J,"keyAliasesCall",()=>e9,"keyCreateCall",()=>Z,"keyCreateForAgentCall",()=>Q,"keyCreateServiceAccountCall",()=>Y,"keyDeleteCall",()=>et,"keyInfoCall",()=>e6,"keyInfoV1Call",()=>e7,"keyListCall",()=>e5,"keySpendLogsCall",()=>eL,"keyUpdateCall",()=>td,"latestHealthChecksCall",()=>tq,"listMCPTools",()=>rU,"listPolicyVersions",()=>ri,"loginCall",()=>nG,"makeAgentPublicCall",()=>no,"makeAgentsPublicCall",()=>na,"makeMCPPublicCall",()=>ni,"makeModelGroupPublic",()=>P,"mcpHubPublicServersCall",()=>eP,"mcpToolsCall",()=>nO,"modelAvailableCall",()=>ez,"modelCostMap",()=>B,"modelCreateCall",()=>V,"modelDeleteCall",()=>W,"modelHubCall",()=>eN,"modelHubPublicModelsCall",()=>e_,"modelInfoCall",()=>eT,"modelInfoV1Call",()=>eF,"modelPatchUpdateCall",()=>tp,"modelUpdateCall",()=>tm,"organizationCreateCall",()=>ef,"organizationDailyActivityCall",()=>ew,"organizationDeleteCall",()=>em,"organizationInfoCall",()=>ed,"organizationListCall",()=>eu,"organizationMemberAddCall",()=>tb,"organizationMemberDeleteCall",()=>tw,"organizationMemberUpdateCall",()=>t$,"organizationUpdateCall",()=>ep,"patchAgentCall",()=>nh,"patchPromptCall",()=>rx,"perUserAnalyticsCall",()=>nV,"proxyBaseUrl",()=>C,"ragIngestCall",()=>r8,"regenerateKeyCall",()=>ej,"registerClaudeCodePlugin",()=>nY,"registerMcpOAuthClient",()=>nI,"reloadModelCostMap",()=>A,"resetEmailEventSettings",()=>nr,"resolvePoliciesCall",()=>rg,"scheduleModelCostMapReload",()=>z,"searchToolQueryCall",()=>nM,"serverRootPath",()=>$,"serviceHealthCheck",()=>tj,"sessionSpendLogsCall",()=>r4,"setCallbacksCall",()=>tD,"setGlobalLitellmHeaderName",()=>_,"slackBudgetAlertsHealthCheck",()=>tx,"spendUsersCall",()=>e8,"suggestPolicyTemplates",()=>re,"tagCreateCall",()=>rJ,"tagDailyActivityCall",()=>ey,"tagDauCall",()=>nA,"tagDeleteCall",()=>rZ,"tagDistinctCall",()=>nH,"tagInfoCall",()=>rX,"tagListCall",()=>rY,"tagMauCall",()=>nL,"tagUpdateCall",()=>rK,"tagWauCall",()=>nz,"tagsSpendLogsCall",()=>eD,"teamBulkMemberAddCall",()=>tg,"teamCreateCall",()=>ta,"teamDailyActivityCall",()=>eb,"teamDeleteCall",()=>en,"teamInfoCall",()=>ei,"teamListCall",()=>es,"teamMemberAddCall",()=>th,"teamMemberDeleteCall",()=>ty,"teamMemberUpdateCall",()=>tv,"teamPermissionsUpdateCall",()=>r2,"teamSpendLogsCall",()=>eH,"teamUpdateCall",()=>tf,"testCacheConnectionCall",()=>tP,"testConnectionRequest",()=>e3,"testCustomCodeGuardrail",()=>ny,"testMCPConnectionRequest",()=>nT,"testMCPSemanticFilter",()=>tQ,"testMCPToolsListRequest",()=>nF,"testPipelineCall",()=>rm,"testPoliciesAndGuardrails",()=>t7,"testPolicyTemplate",()=>rt,"testSearchToolConnection",()=>rG,"transformRequestCall",()=>eh,"uiAuditLogsCall",()=>nC,"uiSpendLogDetailsCall",()=>rO,"uiSpendLogsCall",()=>eq,"updateCacheSettingsCall",()=>tN,"updateConfigFieldSetting",()=>tz,"updateDefaultTeamSettings",()=>r0,"updateEmailEventSettings",()=>nt,"updateGuardrailCall",()=>ng,"updateInternalUserSettings",()=>rF,"updateMCPSemanticFilterSettings",()=>tZ,"updateMCPServer",()=>rB,"updatePassThroughEndpoint",()=>nx,"updatePassThroughFieldSetting",()=>tB,"updatePolicyCall",()=>ra,"updatePolicyVersionStatus",()=>rs,"updatePromptCall",()=>rC,"updateSSOSettings",()=>n$,"updateSearchTool",()=>rD,"updateToolPolicy",()=>n6,"updateUISettings",()=>tX,"updateUiSettings",()=>nq,"updateUsefulLinksCall",()=>eA,"usageAiChatStream",()=>rn,"userAgentAnalyticsCall",()=>nB,"userAgentSummaryCall",()=>nD,"userBulkUpdateUserCall",()=>tE,"userCreateCall",()=>ee,"userDailyActivityAggregatedCall",()=>tr,"userDailyActivityCall",()=>ev,"userDeleteCall",()=>er,"userFilterUICall",()=>eG,"userGetAllUsersCall",()=>tn,"userGetRequesedtModelsCall",()=>tt,"userInfoCall",()=>ea,"userListCall",()=>eo,"userRequestModelCall",()=>te,"userSpendLogsCall",()=>eU,"userUpdateUserCall",()=>tC,"v2TeamListCall",()=>el,"validateBlockedWordsFile",()=>nb,"vectorStoreCreateCall",()=>r6,"vectorStoreDeleteCall",()=>r7,"vectorStoreInfoCall",()=>r5,"vectorStoreListCall",()=>r3,"vectorStoreSearchCall",()=>nR,"vectorStoreUpdateCall",()=>r9],764205),e.i(247167);var t=e.i(998573),r=e.i(268004);e.s(["default",()=>h,"jsonFields",()=>p],82946);var n=e.i(843476),o=e.i(271645),a=e.i(808613),i=e.i(311451),l=e.i(28651),s=e.i(199133),c=e.i(779241),u=e.i(827252),d=e.i(592968),f=e.i(122550);let p=["metadata","config","enforced_params","aliases"],m=(e,t)=>p.includes(e)||"json"===t.format,h=({schemaComponent:e,excludedFields:t=[],form:r,overrideLabels:p={},overrideTooltips:h={},customValidation:g={},defaultValues:v={}})=>{let[y,b]=(0,o.useState)(null),[w,$]=(0,o.useState)(null);return((0,o.useEffect)(()=>{(async()=>{try{let n=(await M()).components.schemas[e];if(!n)throw Error(`Schema component "${e}" not found`);b(n);let o={};Object.keys(n.properties).filter(e=>!t.includes(e)&&void 0!==v[e]).forEach(e=>{o[e]=v[e]}),r.setFieldsValue(o)}catch(e){console.error("Schema fetch error:",e),$(e instanceof Error?e.message:"Failed to fetch schema")}})()},[e,r,t]),w)?(0,n.jsxs)("div",{className:"text-red-500",children:["Error: ",w]}):y?.properties?(0,n.jsx)("div",{children:Object.entries(y.properties).filter(([e])=>!t.includes(e)).map(([e,t])=>{let r,o,b,w,$,C,E,S;return o=(e=>{if(e.type)return e.type;if(e.anyOf){let t=e.anyOf.map(e=>e.type);if(t.includes("number")||t.includes("integer"))return"number";t.includes("string")}return"string"})(t),b=y?.required?.includes(e),w=p[e]||t.title||(0,f.formatLabel)(e),$=h[e]||t.description,C=[],b&&C.push({required:!0,message:`${w} is required`}),g[e]&&C.push({validator:g[e]}),m(e,t)&&C.push({validator:async(e,t)=>{if(t&&!(e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch{return!1}})(t))throw Error("Please enter valid JSON")}}),E=$?(0,n.jsxs)("span",{children:[w," ",(0,n.jsx)(d.Tooltip,{title:$,children:(0,n.jsx)(u.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}):w,r=m(e,t)?(0,n.jsx)(i.Input.TextArea,{rows:4,placeholder:"Enter as JSON",className:"font-mono"}):t.enum?(0,n.jsx)(s.Select,{children:t.enum.map(e=>(0,n.jsx)(s.Select.Option,{value:e,children:e},e))}):"number"===o||"integer"===o?(0,n.jsx)(l.InputNumber,{style:{width:"100%"},precision:"integer"===o?0:void 0}):"duration"===e?(0,n.jsx)(c.TextInput,{placeholder:"eg: 30s, 30h, 30d"}):(0,n.jsx)(c.TextInput,{placeholder:$||""}),(0,n.jsx)(a.Form.Item,{label:E,name:e,className:"mt-8",rules:C,initialValue:v[e],help:(0,n.jsx)("div",{className:"text-xs text-gray-500",children:(S=({max_budget:"Enter maximum budget in USD (e.g., 100.50)",budget_duration:"Select a time period for budget reset",tpm_limit:"Enter maximum tokens per minute (whole number)",rpm_limit:"Enter maximum requests per minute (whole number)",duration:"Enter duration (e.g., 30s, 24h, 7d)",metadata:'Enter JSON object with key-value pairs\nExample: {"team": "research", "project": "nlp"}',config:'Enter configuration as JSON object\nExample: {"setting": "value"}',permissions:"Enter comma-separated permission strings",enforced_params:'Enter parameters as JSON object\nExample: {"param": "value"}',blocked:"Enter true/false or specific block conditions",aliases:'Enter aliases as JSON object\nExample: {"alias1": "value1", "alias2": "value2"}',models:"Select one or more model names",key_alias:"Enter a unique identifier for this key",tags:"Enter comma-separated tag strings"})[e]||({string:"Text input",number:"Numeric input",integer:"Whole number input",boolean:"True/False value"})[o]||"Text input",m(e,t)?`${S}
Must be valid JSON format`:t.enum?`Select from available options
-Allowed values: ${t.enum.join(", ")}`:S)}),children:r},e)})}):null};var g=e.i(727749);let v=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`},y=async e=>{try{let t=C?`${C}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},b=async e=>{try{let t=C?`${C}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},w=null,$="/",C=null;console.log=function(){};let E=()=>{if(C)return C;let e=window.location;return e?.origin??""},S="POST",x="DELETE",j=0,k=async e=>{let t=Date.now();if(t-j>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){g.default.info("UI Session Expired. Logging out."),j=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}j=t}else console.log("Error suppressed to prevent spam:",e)},O=async()=>{let e=C?`${C}/public/providers/fields`:"/public/providers/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch provider create metadata:",t.status,e),Error("Failed to load provider configuration")}return await t.json()},T=async()=>{let e=C?`${C}/public/agents/fields`:"/public/agents/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch agent create metadata:",t.status,e),Error("Failed to load agent configuration")}return await t.json()},F="Authorization";function _(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),F=e}function I(){return F}let P=async(e,t)=>{let r=C?`${C}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},N=async()=>{console.log("Getting UI config");let e=await fetch("/litellm/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),((e,t=null)=>{let r=window.location,n=r?.origin??null,o=t||n;if(console.log("proxyBaseUrl:",C),console.log("serverRootPath:",e),!o)return console.log("Updated proxyBaseUrl:",C=C??null);e.length>0&&!o.endsWith(e)&&"/"!=e&&(o+=e),console.log("Updated proxyBaseUrl:",C=o)})(t.server_root_path,t.proxy_base_url),t},R=async()=>{let e=C?`${C}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},M=async()=>{let e=C?`${C}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},B=async()=>{try{let e=C?`${C}/public/litellm_model_cost_map`:"/public/litellm_model_cost_map",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await t.json();return console.log(`received litellm model cost data: ${r}`),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},A=async e=>{try{let t=C?`${C}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to reload model cost map:",e),e}},z=async(e,t)=>{try{let r=C?`${C}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await n.json();return console.log(`Schedule model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},L=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Cancel model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},H=async e=>{try{let t=C?`${C}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map source info:",n),n}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},D=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload/status`:"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){console.error(`Status request failed with status: ${r.status}`);let e=await r.text();throw console.error("Error response:",e),Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map reload status:",n),n}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},V=async(e,r)=>{try{let n=C?`${C}/model/new`:"/model/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),t.message.destroy(),g.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},W=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=C?`${C}/model/delete`:"/model/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=C?`${C}/budget/delete`:"/budget/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},U=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/new`:"/budget/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/update`:"/budget/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{let r=C?`${C}/invitation/new`:"/invitation/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/invitation/claim`:"/invitation/claim",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},X=async e=>{try{let t=C?`${C}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Y=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),p))if(t[e]){console.log(`formValues.${e}:`,t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",t);let r=C?`${C}/key/service-account/generate`:"/key/service-account/generate",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},Z=async(e,t,r)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),p))if(r[e]){console.log(`formValues.${e}:`,r[e]);try{r[e]=JSON.parse(r[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",r);let n=C?`${C}/key/generate`:"/key/generate",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t,r,n)=>{let o=C?`${C}/key/generate`:"/key/generate",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_id:t,key_alias:r,models:n.length>0?n:[]})});if(!a.ok)throw k(await a.text()),Error("Failed to create key for agent");return a.json()},ee=async(e,t,r)=>{try{if(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),r.auto_create_key=!1,r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",r);let n=C?`${C}/user/new`:"/user/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t)=>{try{let r=C?`${C}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},er=async(e,t)=>{try{let r=C?`${C}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete user(s):",e),e}},en=async(e,t)=>{try{let r=C?`${C}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},eo=async(e,t=null,r=null,n=null,o=null,a=null,i=null,l=null,s=null,c=null)=>{try{let u=C?`${C}/user/list`:"/user/list";console.log("in userListCall");let d=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");d.append("user_ids",e)}r&&d.append("page",r.toString()),n&&d.append("page_size",n.toString()),o&&d.append("user_email",o),a&&d.append("role",a),i&&d.append("team",i),l&&d.append("sso_user_ids",l),s&&d.append("sort_by",s),c&&d.append("sort_order",c);let f=d.toString();f&&(u+=`?${f}`);let p=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!p.ok){let e=await p.json(),t=nW(e);throw k(t),Error(t)}let m=await p.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},ea=async(e,t,r,n=!1,o,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${n}, ${o}, ${a}, ${i}`);try{let l;if(n){l=C?`${C}/user/list`:"/user/list";let e=new URLSearchParams;null!=o&&e.append("page",o.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=C?`${C}/user/info`:"/user/info",("Admin"!==r&&"Admin Viewer"!==r||i)&&t&&(l+=`?user_id=${t}`);console.log("Requesting user data from:",l);let s=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to fetch user data:",e),e}},ei=async(e,t)=>{try{let r=C?`${C}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t,r=null,n=null,o=null,a=1,i=10,l=null,s=null)=>{try{let a=C?`${C}/v2/team/list`:"/v2/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},es=async(e,t,r=null,n=null,o=null)=>{try{let a=C?`${C}/team/list`:"/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ec=async e=>{try{let t=C?`${C}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/team/available_teams API Response:",n),n}catch(e){throw e}},eu=async(e,t=null,r=null)=>{try{let n=C?`${C}/organization/list`:"/organization/list",o=new URLSearchParams;t&&o.append("org_id",t.toString()),r&&o.append("org_alias",r.toString());let a=o.toString();a&&(n+=`?${a}`);let i=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},ed=async(e,t)=>{try{let r=C?`${C}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ef=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let r=C?`${C}/organization/new`:"/organization/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=C?`${C}/organization/update`:"/organization/update",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=C?`${C}/organization/delete`:"/organization/delete",n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!n.ok){let e=await n.text();throw k(e),Error(`Error deleting organization: ${e}`)}return await n.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},eh=async(e,t)=>{try{let r=C?`${C}/utils/transform_request`:"/utils/transform_request",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eg=async({accessToken:e,endpoint:t,startTime:r,endTime:n,page:o=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=C?`${C}${i}`:i,(s=new URLSearchParams).append("start_date",v(r)),s.append("end_date",v(n)),s.append("page_size","1000"),s.append("page",o.toString()),s.append("timezone",new Date().getTimezoneOffset().toString()),a&&Object.entries(a).forEach(([e,t])=>{((e,t,r)=>{if(null!=r){if(Array.isArray(r)){r.length>0&&e.append(t,r.join(","));return}e.append(t,`${r}`)}})(s,e,t)}),(c=s.toString())?`${l}?${c}`:l),d=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=nW(e);throw k(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ev=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{user_id:o}}),ey=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{tags:o}}),eb=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{team_ids:o,exclude_team_ids:"litellm-dashboard"}}),ew=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{organization_ids:o}}),e$=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{end_user_ids:o}}),eC=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{agent_ids:o}}),eE=async e=>{try{let t=C?`${C}/global/spend`:"/global/spend",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=C?`${C}/onboarding/get_token`:"/onboarding/get_token";t+=`?invite_link=${e}`;let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,r,n)=>{let o=C?`${C}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,r)=>{try{let n=C?`${C}/key/${t}/regenerate`:`/key/${t}/regenerate`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},ek=!1,eO=null,eT=async(e,t,r,n=1,o=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,n,o,a,i,l,s,c);let u=C?`${C}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",n.toString()),d.append("size",o.toString()),a&&a.trim()&&d.append("search",a.trim()),i&&i.trim()&&d.append("modelId",i.trim()),l&&l.trim()&&d.append("teamId",l.trim()),s&&s.trim()&&d.append("sortBy",s.trim()),c&&c.trim()&&d.append("sortOrder",c.trim()),d.toString()&&(u+=`?${d.toString()}`);let f=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${ek}`,ek||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),g.default.info(e),ek=!0,eO&&clearTimeout(eO),eO=setTimeout(()=>{ek=!1},1e4)),Error("Network response was not ok")}let p=await f.json();return console.log("modelInfoCall:",p),p}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let r=C?`${C}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("modelInfoV1Call:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},e_=async()=>{let e=C?`${C}/public/model_hub`:"/public/model_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`modelHubPublicModelsCall failed with status ${t.status}`),[])},eI=async()=>{let e=C?`${C}/public/agent_hub`:"/public/agent_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`agentHubPublicModelsCall failed with status ${t.status}`),[])},eP=async()=>{let e=C?`${C}/public/mcp_hub`:"/public/mcp_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`mcpHubPublicServersCall failed with status ${t.status}`),[])},eN=async e=>{try{let t=C?`${C}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("modelHubCall:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eR=async e=>{try{let t=C?`${C}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("getAllowedIPs:",n),n.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eM=async(e,t)=>{try{let r=C?`${C}/add/allowed_ip`:"/add/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("addAllowedIP:",o),o}catch(e){throw console.error("Failed to add allowed IP:",e),e}},eB=async(e,t)=>{try{let r=C?`${C}/delete/allowed_ip`:"/delete/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("deleteAllowedIP:",o),o}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eA=async(e,t)=>{try{let r=C?`${C}/model_hub/update_useful_links`:"/model_hub/update_useful_links",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ez=async(e,t,r,n=!1,o=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",F);try{let t=C?`${C}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===n&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),o&&r.append("team_id",o.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t)=>{try{let r=C?`${C}/global/spend/logs`:"/global/spend/logs";console.log("in keySpendLogsCall:",r);let n=await fetch(`${r}?api_key=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=C?`${C}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eD=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/tags`:"/global/spend/tags";t&&r&&(o=`${o}?start_date=${t}&end_date=${r}`),n&&(o+=`&tags=${n.join(",")}`),console.log("in tagsSpendLogsCall:",o);let a=await fetch(`${o}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eV=async e=>{try{let t=C?`${C}/global/spend/all_tag_names`:"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=C?`${C}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to fetch end users:",e),e}},eG=async(e,t)=>{try{let r=C?`${C}/user/filter/ui`:"/user/filter/ui";t.get("user_email")&&(r+=`?user_email=${t.get("user_email")}`),t.get("user_id")&&(r+=`?user_id=${t.get("user_id")}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eU=async(e,t,r,n,o,a)=>{try{console.log(`user role in spend logs call: ${r}`);let t=C?`${C}/spend/logs`:"/spend/logs";t="App Owner"==r?`${t}?user_id=${n}&start_date=${o}&end_date=${a}`:`${t}?start_date=${o}&end_date=${a}`;let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:n=1,page_size:o=50,params:a={}})=>{try{let i=C?`${C}/spend/logs/ui`:"/spend/logs/ui",l=new URLSearchParams;for(let[e,i]of(l.append("start_date",t),l.append("end_date",r),l.append("page",n.toString()),l.append("page_size",o.toString()),Object.entries(a)))null!=i&&("min_spend"===e||"max_spend"===e?l.append(e,i.toString()):"string"==typeof i&&""!==i&&l.append(e,String(i)));let s=l.toString();s&&(i+=`?${s}`);let c=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=nW(e);throw k(t),Error(t)}let u=await c.json();return console.log("Spend Logs Response:",u),u}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eJ=async e=>{try{let t=C?`${C}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=C?`${C}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:n}):JSON.stringify({startTime:r,endTime:n});let i={method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(o,i);if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}let s=await l.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eY=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/provider`:"/global/spend/provider";r&&n&&(o+=`?start_date=${r}&end_date=${n}`),t&&(o+=`&api_key=${t}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eZ=async(e,t,r)=>{try{let n=C?`${C}/global/activity`:"/global/activity";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eQ=async(e,t,r)=>{try{let n=C?`${C}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e0=async(e,t,r)=>{try{let n=C?`${C}/global/activity/model`:"/global/activity/model";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e1=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions`:"/global/activity/exceptions";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e2=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions/deployment`:"/global/activity/exceptions/deployment";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e4=async e=>{try{let t=C?`${C}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e6=async(e,t)=>{try{let r=C?`${C}/v2/key/info`:"/v2/key/info",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!n.ok){let e=await n.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw k(e),Error("Network response was not ok")}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t,r,n)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let o=C?`${C}/health/test_connection`:"/health/test_connection",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:n})}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||"error"===l.status)&&"error"!==l.status)return{status:"error",message:l.error?.message||`Connection test failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("Model connection test error:",e),e}},e7=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=C?`${C}/key/info`:"/key/info";r=`${r}?key=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",n),!n.ok){let e=await n.text();k(e),g.default.fromBackend("Failed to fetch key info - "+e)}let o=await n.json();return console.log("data",o),o}catch(e){throw console.error("Failed to fetch key info:",e),e}},e5=async(e,t,r,n,o,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=C?`${C}/key/list`:"/key/list";console.log("in keyListCall");let p=new URLSearchParams;r&&p.append("team_id",r.toString()),t&&p.append("organization_id",t.toString()),n&&p.append("key_alias",n),a&&p.append("key_hash",a),o&&p.append("user_id",o.toString()),i&&p.append("page",i.toString()),l&&p.append("size",l.toString()),s&&p.append("sort_by",s),c&&p.append("sort_order",c),u&&p.append("expand",u),d&&p.append("status",d),p.append("return_full_object","true"),p.append("include_team_keys","true"),p.append("include_created_by_keys","true");let m=p.toString();m&&(f+=`?${m}`);let h=await fetch(f,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=nW(e);throw k(t),Error(t)}let g=await h.json();return console.log("/team/list API Response:",g),g}catch(e){throw console.error("Failed to create key:",e),e}},e9=async(e,t=1,r=50,n)=>{try{let o=new URLSearchParams(Object.entries({page:String(t),size:String(r),...n?{search:n}:{}})),a=C?`${C}/key/aliases`:"/key/aliases";a=`${a}?${o}`;let i=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("/key/aliases API Response:",l),l}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e8=async(e,t)=>{try{let r=C?`${C}/spend/users`:"/spend/users";console.log("in spendUsersCall:",r);let n=await fetch(`${r}?user_id=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get spend for user",e),e}},te=async(e,t,r,n)=>{try{let o=C?`${C}/user/request_model`:"/user/request_model",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:r,justification:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=C?`${C}/user/get_requests`:"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to get requested models:",e),e}},tr=async(e,t,r,n=null)=>{try{let o=C?`${C}/user/daily/activity/aggregated`:"/user/daily/activity/aggregated",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),n&&a.append("user_id",n);let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},tn=async(e,t)=>{try{let r=C?`${C}/user/get_users?role=${t}`:`/user/get_users?role=${t}`;console.log("in userGetAllUsersCall:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get requested models:",e),e}},to=async e=>{try{let t=C?`${C}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("response from user/available_role",n),n}catch(e){throw e}},ta=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/team/new`:"/team/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/credentials`:"/credentials",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tl=async e=>{try{let t=C?`${C}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ts=async(e,t,r)=>{try{let n=C?`${C}/credentials`:"/credentials";t?n+=`/by_name/${t}`:r&&(n+=`/by_model/${r}`),console.log("in credentialListCall");let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t)=>{try{let r=C?`${C}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},tu=async(e,t,r)=>{try{if(console.log("Form Values in credentialUpdateCall:",r),r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let n=C?`${C}/credentials/${t}`:`/credentials/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},td=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let r=C?`${C}/key/update`:"/key/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("Update key Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=C?`${C}/team/update`:"/team/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),g.default.fromBackend("Failed to update team settings: "+e),Error(e)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to update team:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let n=C?`${C}/model/${r}/update`:`/model/${r}/update`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await o.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},tm=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let r=C?`${C}/model/update`:"/model/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let o=await n.json();return console.log("Update model Response:",o),o}catch(e){throw console.error("Failed to update model:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_add`:"/team/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!o.ok){let e=await o.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tg=async(e,t,r,n,o)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:n});let a=C?`${C}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};o?i.all_users=!0:i.members=r,null!=n&&(i.max_budget_in_team=n);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to bulk add team members",n=Error(r);throw n.raw=t,n}let s=await l.json();return console.log("Bulk team member add API Response:",s),s}catch(e){throw console.error("Failed to bulk add team members:",e),e}},tv=async(e,t,r)=>{try{console.log("Form Values in teamMemberUpdateCall:",r),console.log("Budget value:",r.max_budget_in_team),console.log("TPM limit:",r.tpm_limit),console.log("RPM limit:",r.rpm_limit);let n=C?`${C}/team/member_update`:"/team/member_update",o={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(o.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(o.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(o.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(o.rpm_limit=r.rpm_limit),console.log("Final request body:",o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!a.ok){let e=await a.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},ty=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_delete`:"/team/member_delete",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==r.user_email&&{user_email:r.user_email},...void 0!==r.user_id&&{user_id:r.user_id}})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tb=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/organization/member_add`:"/organization/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tw=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let n=C?`${C}/organization/member_delete`:"/organization/member_delete",o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},t$=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let n=C?`${C}/organization/member_update`:"/organization/member_update",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},tC=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let n=C?`${C}/user/update`:"/user/update",o={...t};null!==r&&(o.user_role=r),o=JSON.stringify(o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},tE=async(e,t,r,n=!1)=>{try{let o;console.log("Form Values in userUpdateUserCall:",t);let a=C?`${C}/user/bulk_update`:"/user/bulk_update";if(n)o=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let n of r)e.push({user_id:n,...t});o=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tS=async(e,t)=>{try{let r=C?`${C}/global/predict/spend/logs`:"/global/predict/spend/logs",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},tx=async e=>{try{let t=C?`${C}/health/services?service=slack_budget_alerts`:"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}let n=await r.json();return g.default.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",n),n}catch(e){throw console.error("Failed to perform health check:",e),e}},tj=async(e,t)=>{try{let r=C?`${C}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}return await n.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tk=async e=>{try{let t=C?`${C}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tO=async e=>{try{let t=C?`${C}/budget/settings`:"/budget/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tT=async(e,t,r)=>{try{let t=C?`${C}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async e=>{try{let t=C?`${C}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async e=>{try{let t=C?`${C}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tI=async e=>{try{let t=C?`${C}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tP=async(e,t)=>{try{let r=C?`${C}/cache/settings/test`:"/cache/settings/test",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tN=async(e,t)=>{try{let r=C?`${C}/cache/settings`:"/cache/settings",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tR=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async(e,t)=>{try{let r=C?`${C}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tB=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tA=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tz=async(e,t,r)=>{try{let n=C?`${C}/config/field/update`:"/config/field/update",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tL=async(e,t)=>{try{let r=C?`${C}/config/field/delete`:"/config/field/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return g.default.success("Field reset on proxy"),o}catch(e){throw console.error("Failed to get callbacks:",e),e}},tH=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tD=async(e,t)=>{try{let r=C?`${C}/config/update`:"/config/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tV=async e=>{try{let t=C?`${C}/health`:"/health",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tW=async(e,t)=>{try{let r=C?`${C}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tG=async e=>{try{let t=C?`${C}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tU=async(e,t,r,n=100,o=0)=>{try{let a=C?`${C}/health/history`:"/health/history",i=new URLSearchParams;t&&i.append("model",t),r&&i.append("status_filter",r),i.append("limit",n.toString()),i.append("offset",o.toString()),i.toString()&&(a+=`?${i.toString()}`);let l=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.text();throw k(e),Error(e)}return await l.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tq=async e=>{try{let t=C?`${C}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tJ=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",C);let t=C?`${C}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tK=async e=>{try{let t=C?`${C}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);return console.error("Failed to get UI settings:",t),null}return await r.json()}catch(e){return console.error("Failed to get UI settings:",e),null}},tX=async(e,t)=>{try{let r=C?`${C}/update/ui_settings`:"/update/ui_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update UI settings:",e),e}},tY=async e=>{try{let t=C?`${C}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tZ=async(e,t)=>{try{let r=C?`${C}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tQ=async(e,t,r)=>{try{let n=C?`${C}/v1/responses`:"/v1/responses",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:t,input:[{role:"user",content:r,type:"message"}],tools:[{type:"mcp",server_url:"litellm_proxy",require_approval:"never"}],tool_choice:"required"})}),a=o.headers.get("x-litellm-semantic-filter"),i=o.headers.get("x-litellm-semantic-filter-tools");if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return{data:await o.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},t0=async e=>{try{let t=C?`${C}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},t1=async(e,t,r)=>{try{let n=C?`${C}/guardrails/usage/overview`:"/guardrails/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},t2=async(e,t,r,n)=>{try{let o=C?`${C}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),n&&a.append("end_date",n),a.toString()&&(o+=`?${a.toString()}`);let i=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(nW(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},t4=async(e,t)=>{try{let r=C?`${C}/guardrails/usage/logs`:"/guardrails/usage/logs",n=new URLSearchParams;t.guardrailId&&n.append("guardrail_id",t.guardrailId),t.policyId&&n.append("policy_id",t.policyId),null!=t.page&&n.append("page",String(t.page)),null!=t.pageSize&&n.append("page_size",String(t.pageSize)),t.action&&n.append("action",t.action),t.startDate&&n.append("start_date",t.startDate),t.endDate&&n.append("end_date",t.endDate),n.toString()&&(r+=`?${n.toString()}`);let o=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json();throw Error(nW(e))}return o.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},t6=async(e,t,r)=>{try{let n=C?`${C}/policies/usage/overview`:"/policies/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get policies usage overview:",e),e}},t3=async e=>{try{let t=C?`${C}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},t7=async(e,t,r)=>{try{let n=C?`${C}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",o=await fetch(n,{method:"POST",signal:r,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({policy_names:t.policy_names??null,guardrail_names:t.guardrail_names??null,inputs:t.inputs??null,inputs_list:t.inputs_list??null,request_data:t.request_data??{},input_type:t.input_type??"request",agent_id:t.agent_id??null})});if(!o.ok){let e=await o.text(),t="Failed to test policies and guardrails";try{let r=JSON.parse(e);r.detail?t="string"==typeof r.detail?r.detail:JSON.stringify(r.detail):r.message&&(t=r.message)}catch{t=e||t}throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},t5=async(e,t)=>{try{let r=C?`${C}/policy/info/${t}`:`/policy/info/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},t9=async e=>{try{let t=C?`${C}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},t8=async(e,t,r,n,o)=>{try{let a=C?`${C}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};n&&(i.model=n),o&&(i.competitors=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},re=async(e,t,r,n)=>{try{let o=C?`${C}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},rt=async(e,t,r)=>{try{let n=C?`${C}/policy/templates/test`:"/policy/templates/test",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},rr=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:n};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=nW(await d.json());throw k(e),Error(e)}let f=d.body?.getReader();if(!f)throw Error("No response body");let p=new TextDecoder,m="";for(;;){let{done:e,value:t}=await f.read();if(e)break;let r=(m+=p.decode(t,{stream:!0})).split("\n");for(let e of(m=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"competitor"===t.type?o(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},rn=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=nW(await u.json());throw k(e),Error(e)}let d=u.body?.getReader();if(!d)throw Error("No response body");let f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await d.read();if(e)break;let r=(p+=f.decode(t,{stream:!0})).split("\n");for(let e of(p=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"chunk"===t.type?n(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?o():"error"===t.type&&a?.(t.message)}catch{}}},ro=async(e,t)=>{try{let r=C?`${C}/policies`:"/policies",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy:",e),e}},ra=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}`:`/policies/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy:",e),e}},ri=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},rl=async(e,t,r)=>{try{let n=encodeURIComponent(t),o=C?`${C}/policies/name/${n}/versions`:`/policies/name/${n}/versions`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},rs=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}/status`:`/policies/${t}/status`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},rc=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},ru=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},rd=async e=>{try{let t=C?`${C}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},rf=async(e,t)=>{try{let r=C?`${C}/policies/attachments`:"/policies/attachments",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rp=async(e,t)=>{try{let r=C?`${C}/policies/attachments/${t}`:`/policies/attachments/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rm=async(e,t,r)=>{try{let n=C?`${C}/policies/test-pipeline`:"/policies/test-pipeline",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},rh=async(e,t)=>{try{let r=C?`${C}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rg=async(e,t)=>{try{let r=C?`${C}/policies/resolve`:"/policies/resolve",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},rv=async(e,t)=>{try{let r=C?`${C}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ry=async e=>{try{let t=C?`${C}/prompts/list`:"/prompts/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rb=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/info`:`/prompts/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rw=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/versions`:`/prompts/${t}/versions`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw 404!==n.status&&k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},r$=async(e,t)=>{try{let r=C?`${C}/prompts`:"/prompts",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},rC=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rE=async(e,t)=>{try{let r=C?`${C}/prompts/${t}`:`/prompts/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rS=async(e,t)=>{try{let r=new FormData;r.append("file",t);let n=C?`${C}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`},body:r});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rx=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},rj=async(e,t)=>{try{let r=C?`${C}/v1/agents`:"/v1/agents",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create agent response:",o),o}catch(e){throw console.error("Failed to create agent:",e),e}},rk=async(e,t)=>{try{let r=C?`${C}/guardrails`:"/guardrails",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create guardrail response:",o),o}catch(e){throw console.error("Failed to create guardrail:",e),e}},rO=async(e,t,r)=>{try{let n=C?`${C}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",n);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rT=async e=>{try{let t=C?`${C}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO settings:",n),n}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rF=async(e,t)=>{try{let r=C?`${C}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Updated internal user settings:",o),g.default.success("Internal user settings updated successfully"),o}catch(e){throw console.error("Failed to update internal user settings:",e),e}},r_=async e=>{try{let t=C?`${C}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rI=async e=>{try{let t=C?`${C}/v1/mcp/server`:"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},rP=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server/health`:"/v1/mcp/server/health";if(t&&t.length>0){let e=new URLSearchParams;t.forEach(t=>e.append("server_ids",t)),r=`${r}?${e.toString()}`}console.log("Fetching MCP server health from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched MCP server health:",o),o}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rN=async e=>{try{let t=C?`${C}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP access groups:",n),n.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rR=async e=>{try{let t=C?`${C}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rM=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},rB=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rA=async(e,t)=>{try{let r=(C?`${C}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rz=async e=>{try{let t=C?`${C}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched search tools:",n),n}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rL=async(e,t)=>{try{let r=C?`${C}/search_tools/${t}`:`/search_tools/${t}`;console.log("Fetching search tool by ID from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched search tool:",o),o}catch(e){throw console.error("Failed to fetch search tool:",e),e}},rH=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=C?`${C}/search_tools`:"/search_tools",n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Created search tool:",o),o}catch(e){throw console.error("Failed to create search tool:",e),e}},rD=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let n=C?`${C}/search_tools/${t}`:`/search_tools/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rV=async(e,t)=>{try{let r=(C?`${C}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Deleted search tool:",o),o}catch(e){throw console.error("Failed to delete search tool:",e),e}},rW=async e=>{try{let t=C?`${C}/search_tools/ui/available_providers`:"/search_tools/ui/available_providers";console.log("Fetching available search providers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched available search providers:",n),n}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rG=async(e,t)=>{try{let r=C?`${C}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Test connection response:",o),o}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rU=async(e,t,r)=>{try{let n=C?`${C}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",n);let o={[F]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(n,{method:"GET",headers:o}),i=await a.json();if(console.log("Fetched MCP tools response:",i),!a.ok){if(i.error&&i.message)throw Error(i.message);throw Error("Failed to fetch MCP tools")}return i}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools",stack_trace:null}}},rq=async(e,t,r,n,o)=>{try{let a=C?`${C}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",n,"for server:",t);let i={[F]:`Bearer ${e}`,"Content-Type":"application/json",...o?.customHeaders||{}},l={server_id:t,name:r,arguments:n};o?.guardrails&&o.guardrails.length>0&&(l.litellm_metadata={guardrails:o.guardrails});let s=await fetch(a,{method:"POST",headers:i,body:JSON.stringify(l)});if(!s.ok){let e="Network response was not ok",t=null,r=await s.text();try{let n=JSON.parse(r);n.detail?"string"==typeof n.detail?e=n.detail:"object"==typeof n.detail&&(e=n.detail.message||n.detail.error||"An error occurred",t=n.detail):e=n.message||n.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let n=Error(e);throw n.status=s.status,n.statusText=s.statusText,n.details=t,k(e),n}let c=await s.json();return console.log("MCP tool call response:",c),c}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},rJ=async(e,t)=>{try{let r=C?`${C}/tag/new`:"/tag/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error creating tag:",e),e}},rK=async(e,t)=>{try{let r=C?`${C}/tag/update`:"/tag/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error updating tag:",e),e}},rX=async(e,t)=>{try{let r=C?`${C}/tag/info`:"/tag/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!n.ok){let e=await n.text();return await k(e),{}}return await n.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rY=async e=>{try{let t=C?`${C}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await k(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rZ=async(e,t)=>{try{let r=C?`${C}/tag/delete`:"/tag/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rQ=async e=>{try{let t=C?`${C}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched default team settings:",n),n}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},r0=async(e,t)=>{try{let r=C?`${C}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Updated default team settings:",o),g.default.success("Default team settings updated successfully"),o}catch(e){throw console.error("Failed to update default team settings:",e),e}},r1=async(e,t)=>{try{let r=C?`${C}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Team permissions response:",o),o}catch(e){throw console.error("Failed to get team permissions:",e),e}},r2=async(e,t,r)=>{try{let n=C?`${C}/team/permissions_update`:"/team/permissions_update",o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},r4=async(e,t)=>{try{let r=C?`${C}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},r6=async(e,t)=>{try{let r=C?`${C}/vector_store/new`:"/vector_store/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to create vector store")}return await n.json()}catch(e){throw console.error("Error creating vector store:",e),e}},r3=async(e,t=1,r=100)=>{try{let t=C?`${C}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to list vector stores")}return await r.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},r7=async(e,t)=>{try{let r=C?`${C}/vector_store/delete`:"/vector_store/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to delete vector store")}return await n.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},r5=async(e,t)=>{try{let r=C?`${C}/vector_store/info`:"/vector_store/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to get vector store info")}return await n.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},r9=async(e,t)=>{try{let r=C?`${C}/vector_store/update`:"/vector_store/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to update vector store")}return await n.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r8=async(e,t,r,n,o,a,i)=>{try{let l=C?`${C}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...n&&{vector_store_id:n},...i&&i}}};(o||a)&&(c.ingest_options.litellm_vector_store_params={},o&&(c.ingest_options.litellm_vector_store_params.vector_store_name=o),a&&(c.ingest_options.litellm_vector_store_params.vector_store_description=a)),s.append("request",JSON.stringify(c));let u=await fetch(l,{method:"POST",headers:{[F]:`Bearer ${e}`},body:s});if(!u.ok){let e=await u.json();throw Error(e.error?.message||e.detail||"Failed to ingest document")}return await u.json()}catch(e){throw console.error("Error ingesting document:",e),e}},ne=async e=>{try{let t=C?`${C}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get email event settings")}let n=await r.json();return console.log("Email event settings response:",n),n}catch(e){throw console.error("Failed to get email event settings:",e),e}},nt=async(e,t)=>{try{let r=C?`${C}/email/event_settings`:"/email/event_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to update email event settings")}let o=await n.json();return console.log("Update email event settings response:",o),o}catch(e){throw console.error("Failed to update email event settings:",e),e}},nr=async e=>{try{let t=C?`${C}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to reset email event settings")}let n=await r.json();return console.log("Reset email event settings response:",n),n}catch(e){throw console.error("Failed to reset email event settings:",e),e}},nn=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete agent response:",o),o}catch(e){throw console.error("Failed to delete agent:",e),e}},no=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}/make_public`:`/v1/agents/${t}/make_public`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agent public response:",o),o}catch(e){throw console.error("Failed to make agent public:",e),e}},na=async(e,t)=>{try{let r=C?`${C}/v1/agents/make_public`:"/v1/agents/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},ni=async(e,t)=>{try{let r=C?`${C}/v1/mcp/make_public`:"/v1/mcp/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},nl=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete guardrail response:",o),o}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ns=async e=>{try{let t=C?`${C}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail UI settings")}let n=await r.json();return console.log("Guardrail UI settings response:",n),n}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},nc=async e=>{try{let t=C?`${C}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail provider specific parameters")}let n=await r.json();return console.log("Guardrail provider specific params response:",n),n}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},nu=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${n}`);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw console.error(`Failed to get category YAML. Status: ${o.status}, Error:`,e),k(e),Error(`Failed to get category YAML: ${o.status} ${e}`)}let a=await o.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},nd=async e=>{try{let t=C?`${C}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw console.error(`Failed to get major airlines. Status: ${r.status}, Error:`,e),k(e),Error(`Failed to get major airlines: ${r.status} ${e}`)}return await r.json()}catch(e){throw console.error("Failed to get major airlines:",e),e}},nf=async e=>{try{let t=C?`${C}/v1/agents`:"/v1/agents",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get agents list")}let n=await r.json();return console.log("Agents list response:",n),{agents:n}}catch(e){throw console.error("Failed to get agents list:",e),e}},np=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get agent info")}let o=await n.json();return console.log("Agent info response:",o),o}catch(e){throw console.error("Failed to get agent info:",e),e}},nm=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}/info`:`/guardrails/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get guardrail info")}let o=await n.json();return console.log("Guardrail info response:",o),o}catch(e){throw console.error("Failed to get guardrail info:",e),e}},nh=async(e,t,r)=>{try{let n=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to patch agent")}let a=await o.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ng=async(e,t,r)=>{try{let n=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to update guardrail")}let a=await o.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},nv=async(e,t,r,n,o)=>{try{let a=C?`${C}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};n&&(i.language=n),o&&o.length>0&&(i.entities=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t="Failed to apply guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let s=await l.json();return console.log("Apply guardrail response:",s),s}catch(e){throw console.error("Failed to apply guardrail:",e),e}},ny=async(e,t)=>{try{let r=C?`${C}/guardrails/test_custom_code`:"/guardrails/test_custom_code",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t="Failed to test custom code guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let o=await n.json();return console.log("Test custom code guardrail response:",o),o}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},nb=async(e,t)=>{try{let r=C?`${C}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to validate blocked words file")}let o=await n.json();return console.log("Validate blocked words file response:",o),o}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},nw=async e=>{try{let t=C?`${C}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO configuration:",n),n}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},n$=async(e,t)=>{try{let r=C?`${C}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:nW(e);k(r);let o=Error(r);throw e?.detail!==void 0&&(o.detail=e.detail),o.rawError=e,o}let o=await n.json();return console.log("Updated SSO configuration:",o),o}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},nC=async(e,t,r,n,o)=>{try{let t=C?`${C}/audit`:"/audit",r=new URLSearchParams;n&&r.append("page",n.toString()),o&&r.append("page_size",o.toString());let a=r.toString();a&&(t+=`?${a}`);let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},nE=async e=>{try{let t=C?`${C}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},nS=async e=>{try{let t=C?`${C}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},nx=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},nj=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`:`/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=(await n.json()).endpoints;if(!o||0===o.length)throw Error("Pass through endpoint not found");return o[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},nk=async(e,t)=>{try{let r=C?`${C}/config/callback/delete`:"/config/callback/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},nO=async e=>{let t=E(),r=await fetch(`${t}/v1/mcp/tools`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`HTTP error! status: ${r.status}`);return await r.json()},nT=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let r=C?`${C}/mcp-rest/test/connection`:"/mcp-rest/test/connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)}),o=n.headers.get("content-type");if(!o||!o.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${n.status}: ${n.statusText}). Check network tab for details.`)}let a=await n.json();if((!n.ok||"error"===a.status)&&"error"!==a.status)return{status:"error",message:a.error?.message||`MCP connection test failed: ${n.status} ${n.statusText}`};return a}catch(e){throw console.error("MCP connection test error:",e),e}},nF=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let n=C?`${C}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",o={"Content-Type":"application/json"};e&&(o["x-litellm-api-key"]=e),r?o.Authorization=`Bearer ${r}`:e&&(o[F]=`Bearer ${e}`);let a=await fetch(n,{method:"POST",headers:o,body:JSON.stringify(t)}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||l.error)&&!l.error)return{tools:[],error:"request_failed",message:l.message||`MCP tools list failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("MCP tools list test error:",e),e}},n_=async(e,t)=>{let r=C?`${C}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),o=await n.json();if(!n.ok)throw Error(nW(o)||o?.error||"Failed to cache MCP server");return o},nI=async(e,t,r)=>{let n=E(),o=encodeURIComponent(t.trim()),a=`${n}/v1/mcp/server/oauth/${o}/register`,i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify(r)}),l=await i.json();if(!i.ok)throw Error(nW(l)||l?.detail||"Failed to register OAuth client");return l},nP=({serverId:e,clientId:t,redirectUri:r,state:n,codeChallenge:o,scope:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:n,response_type:"code",code_challenge:o,code_challenge_method:"S256"});return t&&t.trim().length>0&&c.set("client_id",t),a&&a.trim().length>0&&c.set("scope",a),`${s}?${c.toString()}`},nN=async({serverId:e,code:t,clientId:r,clientSecret:n,codeVerifier:o,redirectUri:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/token`,c=new URLSearchParams;c.set("grant_type","authorization_code"),c.set("code",t),r&&r.trim().length>0&&c.set("client_id",r),n&&n.trim().length>0&&c.set("client_secret",n),c.set("code_verifier",o),c.set("redirect_uri",a);let u=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}),d=await u.json();if(!u.ok)throw Error(nW(d)||d?.detail||"OAuth token exchange failed");return d},nR=async(e,t,r)=>{try{let n=`${E()}/v1/vector_stores/${t}/search`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!o.ok){let e=await o.text();return await k(e),null}return await o.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},nM=async(e,t,r,n)=>{try{let o=`${E()}/v1/search/${t}`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:n||5})});if(!a.ok){let e=await a.text();return await k(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},nB=async(e,t,r,n=1,o=50,a)=>{try{let i=C?`${C}/tag/user-agent/analytics`:"/tag/user-agent/analytics",l=new URLSearchParams,s=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};l.append("start_date",s(t)),l.append("end_date",s(r)),l.append("page",n.toString()),l.append("page_size",o.toString()),a&&l.append("user_agent_filter",a);let c=l.toString();c&&(i+=`?${c}`);let u=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},nA=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},nz=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},nL=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},nH=async e=>{try{let t=C?`${C}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},nD=async(e,t,r,n)=>{try{let o=C?`${C}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},nV=async(e,t=1,r=50,n)=>{try{let o=C?`${C}/tag/user-agent/per-user-analytics`:"/tag/user-agent/per-user-analytics",a=new URLSearchParams;a.append("page",t.toString()),a.append("page_size",r.toString()),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(o+=`?${i}`);let l=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},nW=e=>e?.error&&(e.error.message||e.error)||e?.message||e?.detail||e?.error||JSON.stringify(e),nG=async(e,t)=>{let r=E(),n=r?`${r}/v2/login`:"/v2/login",o=JSON.stringify({username:e,password:t}),a=await fetch(n,{method:"POST",body:o,credentials:"include",headers:{"Content-Type":"application/json"}});if(!a.ok)throw Error(nW(await a.json()));return await a.json()},nU=async()=>{let e=E(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(nW(await r.json()));return await r.json()},nq=async(e,t)=>{let r=E(),n=r?`${r}/update/ui_settings`:"/update/ui_settings",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(nW(await o.json()));return await o.json()},nJ=async()=>{try{let e=E(),t=e?`${e}/claude-code/marketplace.json`:"/claude-code/marketplace.json",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},nK=async(e,t=!1)=>{try{let r=E(),n=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},nX=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},nY=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins`:"/claude-code/plugins",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},nZ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},nQ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},n0=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},n1=async(e,t)=>{let r=C?`${C}/compliance/eu-ai-act`:"/compliance/eu-ai-act",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n2=async(e,t)=>{let r=C?`${C}/compliance/gdpr`:"/compliance/gdpr",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n4=async e=>{let t=C?`${C}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},n6=async(e,t,r)=>{let n=C?`${C}/v1/tool/policy`:"/v1/tool/policy",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({tool_name:t,call_policy:r})});if(!o.ok)throw Error(await o.text());return o.json()}}]);
\ No newline at end of file
+Allowed values: ${t.enum.join(", ")}`:S)}),children:r},e)})}):null};var g=e.i(727749);let v=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`},y=async e=>{try{let t=C?`${C}/callbacks/configs`:"/callbacks/configs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},b=async e=>{try{let t=C?`${C}/in_product_nudges`:"/in_product_nudges",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get in-product nudges:",e),e}},w=null,$="/",C=null;console.log=function(){};let E=()=>{if(C)return C;let e=window.location;return e?.origin??""},S="POST",x="DELETE",j=0,k=async e=>{let t=Date.now();if(t-j>6e4){if(("string"==typeof e?e:JSON.stringify(e)).includes("Authentication Error - Expired Key")){g.default.info("UI Session Expired. Logging out."),j=t,(0,r.clearTokenCookies)();let e=window.location;e&&(window.location.href=e.pathname)}j=t}else console.log("Error suppressed to prevent spam:",e)},O=async()=>{let e=C?`${C}/public/providers/fields`:"/public/providers/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch provider create metadata:",t.status,e),Error("Failed to load provider configuration")}return await t.json()},T=async()=>{let e=C?`${C}/public/agents/fields`:"/public/agents/fields",t=await fetch(e,{method:"GET"});if(!t.ok){let e=await t.text();throw console.error("Failed to fetch agent create metadata:",t.status,e),Error("Failed to load agent configuration")}return await t.json()},F="Authorization";function _(e="Authorization"){console.log(`setGlobalLitellmHeaderName: ${e}`),F=e}function I(){return F}let P=async(e,t)=>{let r=C?`${C}/model_group/make_public`:"/model_group/make_public";return(await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model_groups:t})})).json()},N=async()=>{console.log("Getting UI config");let e=await fetch("/my-custom-path/.well-known/litellm-ui-config"),t=await e.json();return console.log("jsonData in getUiConfig:",t),((e,t=null)=>{let r=window.location,n=r?.origin??null,o=t||n;if(console.log("proxyBaseUrl:",C),console.log("serverRootPath:",e),!o)return console.log("Updated proxyBaseUrl:",C=C??null);e.length>0&&!o.endsWith(e)&&"/"!=e&&(o+=e),console.log("Updated proxyBaseUrl:",C=o)})(t.server_root_path,t.proxy_base_url),t},R=async()=>{let e=C?`${C}/public/model_hub/info`:"/public/model_hub/info",t=await fetch(e);return await t.json()},M=async()=>{let e=C?`${C}/openapi.json`:"/openapi.json",t=await fetch(e);return await t.json()},B=async()=>{try{let e=C?`${C}/public/litellm_model_cost_map`:"/public/litellm_model_cost_map",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}),r=await t.json();return console.log(`received litellm model cost data: ${r}`),r}catch(e){throw console.error("Failed to get model cost map:",e),e}},A=async e=>{try{let t=C?`${C}/reload/model_cost_map`:"/reload/model_cost_map",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to reload model cost map:",e),e}},z=async(e,t)=>{try{let r=C?`${C}/schedule/model_cost_map_reload?hours=${t}`:`/schedule/model_cost_map_reload?hours=${t}`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),o=await n.json();return console.log(`Schedule model cost map reload response: ${o}`),o}catch(e){throw console.error("Failed to schedule model cost map reload:",e),e}},L=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload`:"/schedule/model_cost_map_reload",r=await fetch(t,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}}),n=await r.json();return console.log(`Cancel model cost map reload response: ${n}`),n}catch(e){throw console.error("Failed to cancel model cost map reload:",e),e}},H=async e=>{try{let t=C?`${C}/model/cost_map/source`:"/model/cost_map/source",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map source info:",n),n}catch(e){throw console.error("Failed to get model cost map source info:",e),e}},D=async e=>{try{let t=C?`${C}/schedule/model_cost_map_reload/status`:"/schedule/model_cost_map_reload/status";console.log("Fetching status from URL:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){console.error(`Status request failed with status: ${r.status}`);let e=await r.text();throw console.error("Error response:",e),Error(`HTTP ${r.status}: ${e}`)}let n=await r.json();return console.log("Model cost map reload status:",n),n}catch(e){throw console.error("Failed to get model cost map reload status:",e),e}},V=async(e,r)=>{try{let n=C?`${C}/model/new`:"/model/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),t.message.destroy(),g.default.success(`Model ${r.model_name} created successfully`),a}catch(e){throw console.error("Failed to create key:",e),e}},W=async(e,t)=>{console.log(`model_id in model delete call: ${t}`);try{let r=C?`${C}/model/delete`:"/model/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},G=async(e,t)=>{if(console.log(`budget_id in budget delete call: ${t}`),null!=e)try{let r=C?`${C}/budget/delete`:"/budget/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},U=async(e,t)=>{try{console.log("Form Values in budgetCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/new`:"/budget/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},q=async(e,t)=>{try{console.log("Form Values in budgetUpdateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/budget/update`:"/budget/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},J=async(e,t)=>{try{let r=C?`${C}/invitation/new`:"/invitation/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},K=async(e,t)=>{try{console.log("Form Values in invitationCreateCall:",t),console.log("Form Values after check:",t);let r=C?`${C}/invitation/claim`:"/invitation/claim",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},X=async e=>{try{let t=C?`${C}/alerting/settings`:"/alerting/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},Y=async(e,t)=>{try{for(let e of(console.log("Form Values in keyCreateServiceAccountCall:",t),t.description&&(t.metadata||(t.metadata={}),t.metadata.description=t.description,delete t.description,t.metadata=JSON.stringify(t.metadata)),p))if(t[e]){console.log(`formValues.${e}:`,t[e]);try{t[e]=JSON.parse(t[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",t);let r=C?`${C}/key/service-account/generate`:"/key/service-account/generate",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},Z=async(e,t,r)=>{try{for(let e of(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),p))if(r[e]){console.log(`formValues.${e}:`,r[e]);try{r[e]=JSON.parse(r[e])}catch(t){throw Error(`Failed to parse ${e}: `+t)}}console.log("Form Values after check:",r);let n=C?`${C}/key/generate`:"/key/generate",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},Q=async(e,t,r,n)=>{let o=C?`${C}/key/generate`:"/key/generate",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_id:t,key_alias:r,models:n.length>0?n:[]})});if(!a.ok)throw k(await a.text()),Error("Failed to create key for agent");return a.json()},ee=async(e,t,r)=>{try{if(console.log("Form Values in keyCreateCall:",r),r.description&&(r.metadata||(r.metadata={}),r.metadata.description=r.description,delete r.description,r.metadata=JSON.stringify(r.metadata)),r.auto_create_key=!1,r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}console.log("Form Values after check:",r);let n=C?`${C}/user/new`:"/user/new",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_id:t,...r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},et=async(e,t)=>{try{let r=C?`${C}/key/delete`:"/key/delete";console.log("in keyDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},er=async(e,t)=>{try{let r=C?`${C}/user/delete`:"/user/delete";console.log("in userDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({user_ids:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete user(s):",e),e}},en=async(e,t)=>{try{let r=C?`${C}/team/delete`:"/team/delete";console.log("in teamDeleteCall:",t);let n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_ids:[t]})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},eo=async(e,t=null,r=null,n=null,o=null,a=null,i=null,l=null,s=null,c=null)=>{try{let u=C?`${C}/user/list`:"/user/list";console.log("in userListCall");let d=new URLSearchParams;if(t&&t.length>0){let e=t.join(",");d.append("user_ids",e)}r&&d.append("page",r.toString()),n&&d.append("page_size",n.toString()),o&&d.append("user_email",o),a&&d.append("role",a),i&&d.append("team",i),l&&d.append("sso_user_ids",l),s&&d.append("sort_by",s),c&&d.append("sort_order",c);let f=d.toString();f&&(u+=`?${f}`);let p=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!p.ok){let e=await p.json(),t=nW(e);throw k(t),Error(t)}let m=await p.json();return console.log("/user/list API Response:",m),m}catch(e){throw console.error("Failed to create key:",e),e}},ea=async(e,t,r,n=!1,o,a,i=!1)=>{console.log(`userInfoCall: ${t}, ${r}, ${n}, ${o}, ${a}, ${i}`);try{let l;if(n){l=C?`${C}/user/list`:"/user/list";let e=new URLSearchParams;null!=o&&e.append("page",o.toString()),null!=a&&e.append("page_size",a.toString()),l+=`?${e.toString()}`}else l=C?`${C}/user/info`:"/user/info",("Admin"!==r&&"Admin Viewer"!==r||i)&&t&&(l+=`?user_id=${t}`);console.log("Requesting user data from:",l);let s=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("API Response:",c),c}catch(e){throw console.error("Failed to fetch user data:",e),e}},ei=async(e,t)=>{try{let r=C?`${C}/team/info`:"/team/info";t&&(r=`${r}?team_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},el=async(e,t,r=null,n=null,o=null,a=1,i=10,l=null,s=null)=>{try{let a=C?`${C}/v2/team/list`:"/v2/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/v2/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},es=async(e,t,r=null,n=null,o=null)=>{try{let a=C?`${C}/team/list`:"/team/list";console.log("in teamInfoCall");let i=new URLSearchParams;r&&i.append("user_id",r.toString()),t&&i.append("organization_id",t.toString()),n&&i.append("team_id",n.toString()),o&&i.append("team_alias",o.toString());let l=i.toString();l&&(a+=`?${l}`);let s=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}let c=await s.json();return console.log("/team/list API Response:",c),c}catch(e){throw console.error("Failed to create key:",e),e}},ec=async e=>{try{let t=C?`${C}/team/available`:"/team/available";console.log("in availableTeamListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/team/available_teams API Response:",n),n}catch(e){throw e}},eu=async(e,t=null,r=null)=>{try{let n=C?`${C}/organization/list`:"/organization/list",o=new URLSearchParams;t&&o.append("org_id",t.toString()),r&&o.append("org_alias",r.toString());let a=o.toString();a&&(n+=`?${a}`);let i=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to create key:",e),e}},ed=async(e,t)=>{try{let r=C?`${C}/organization/info`:"/organization/info";t&&(r=`${r}?organization_id=${t}`),console.log("in teamInfoCall");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ef=async(e,t)=>{try{if(console.log("Form Values in organizationCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw console.error("Failed to parse metadata:",e),Error("Failed to parse metadata: "+e)}}let r=C?`${C}/organization/new`:"/organization/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ep=async(e,t)=>{try{console.log("Form Values in organizationUpdateCall:",t);let r=C?`${C}/organization/update`:"/organization/update",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},em=async(e,t)=>{try{let r=C?`${C}/organization/delete`:"/organization/delete",n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_ids:[t]})});if(!n.ok){let e=await n.text();throw k(e),Error(`Error deleting organization: ${e}`)}return await n.json()}catch(e){throw console.error("Failed to delete organization:",e),e}},eh=async(e,t)=>{try{let r=C?`${C}/utils/transform_request`:"/utils/transform_request",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eg=async({accessToken:e,endpoint:t,startTime:r,endTime:n,page:o=1,extraQueryParams:a})=>{try{let i,l,s,c,u=(i=t.startsWith("/")?t:`/${t}`,l=C?`${C}${i}`:i,(s=new URLSearchParams).append("start_date",v(r)),s.append("end_date",v(n)),s.append("page_size","1000"),s.append("page",o.toString()),s.append("timezone",new Date().getTimezoneOffset().toString()),a&&Object.entries(a).forEach(([e,t])=>{((e,t,r)=>{if(null!=r){if(Array.isArray(r)){r.length>0&&e.append(t,r.join(","));return}e.append(t,`${r}`)}})(s,e,t)}),(c=s.toString())?`${l}?${c}`:l),d=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=nW(e);throw k(t),Error(t)}return await d.json()}catch(e){throw console.error(`Failed to fetch daily activity (${t}):`,e),e}},ev=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/user/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{user_id:o}}),ey=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/tag/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{tags:o}}),eb=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/team/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{team_ids:o,exclude_team_ids:"litellm-dashboard"}}),ew=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/organization/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{organization_ids:o}}),e$=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/customer/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{end_user_ids:o}}),eC=async(e,t,r,n=1,o=null)=>eg({accessToken:e,endpoint:"/agent/daily/activity",startTime:t,endTime:r,page:n,extraQueryParams:{agent_ids:o}}),eE=async e=>{try{let t=C?`${C}/global/spend`:"/global/spend",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},eS=async e=>{try{let t=C?`${C}/onboarding/get_token`:"/onboarding/get_token";t+=`?invite_link=${e}`;let r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to create key:",e),e}},ex=async(e,t,r,n)=>{let o=C?`${C}/onboarding/claim_token`:"/onboarding/claim_token";try{let a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({invitation_link:t,user_id:r,password:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to delete key:",e),e}},ej=async(e,t,r)=>{try{let n=C?`${C}/key/${t}/regenerate`:`/key/${t}/regenerate`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Regenerate key Response:",a),a}catch(e){throw console.error("Failed to regenerate key:",e),e}},ek=!1,eO=null,eT=async(e,t,r,n=1,o=50,a,i,l,s,c)=>{try{console.log("modelInfoCall:",e,t,r,n,o,a,i,l,s,c);let u=C?`${C}/v2/model/info`:"/v2/model/info",d=new URLSearchParams;d.append("include_team_models","true"),d.append("page",n.toString()),d.append("size",o.toString()),a&&a.trim()&&d.append("search",a.trim()),i&&i.trim()&&d.append("modelId",i.trim()),l&&l.trim()&&d.append("teamId",l.trim()),s&&s.trim()&&d.append("sortBy",s.trim()),c&&c.trim()&&d.append("sortOrder",c.trim()),d.toString()&&(u+=`?${d.toString()}`);let f=await fetch(u,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!f.ok){let e=await f.text();throw e+=`error shown=${ek}`,ek||(e.includes("No model list passed")&&(e="No Models Exist. Click Add Model to get started."),g.default.info(e),ek=!0,eO&&clearTimeout(eO),eO=setTimeout(()=>{ek=!1},1e4)),Error("Network response was not ok")}let p=await f.json();return console.log("modelInfoCall:",p),p}catch(e){throw console.error("Failed to create key:",e),e}},eF=async(e,t)=>{try{let r=C?`${C}/v1/model/info`:"/v1/model/info";r+=`?litellm_model_id=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("modelInfoV1Call:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},e_=async()=>{let e=C?`${C}/public/model_hub`:"/public/model_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`modelHubPublicModelsCall failed with status ${t.status}`),[])},eI=async()=>{let e=C?`${C}/public/agent_hub`:"/public/agent_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`agentHubPublicModelsCall failed with status ${t.status}`),[])},eP=async()=>{let e=C?`${C}/public/mcp_hub`:"/public/mcp_hub",t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});return t.ok?t.json():(console.error(`mcpHubPublicServersCall failed with status ${t.status}`),[])},eN=async e=>{try{let t=C?`${C}/model_group/info`:"/model_group/info",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("modelHubCall:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},eR=async e=>{try{let t=C?`${C}/get/allowed_ips`:"/get/allowed_ips",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("getAllowedIPs:",n),n.data}catch(e){throw console.error("Failed to get allowed IPs:",e),e}},eM=async(e,t)=>{try{let r=C?`${C}/add/allowed_ip`:"/add/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("addAllowedIP:",o),o}catch(e){throw console.error("Failed to add allowed IP:",e),e}},eB=async(e,t)=>{try{let r=C?`${C}/delete/allowed_ip`:"/delete/allowed_ip",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({ip:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("deleteAllowedIP:",o),o}catch(e){throw console.error("Failed to delete allowed IP:",e),e}},eA=async(e,t)=>{try{let r=C?`${C}/model_hub/update_useful_links`:"/model_hub/update_useful_links",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({useful_links:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},ez=async(e,t,r,n=!1,o=null,a=!1,i=!1,l)=>{console.log("in /models calls, globalLitellmHeaderName",F);try{let t=C?`${C}/models`:"/models",r=new URLSearchParams;r.append("include_model_access_groups","True"),!0===n&&r.append("return_wildcard_routes","True"),!0===i&&r.append("only_model_access_groups","True"),o&&r.append("team_id",o.toString()),l&&r.append("scope",l),r.toString()&&(t+=`?${r.toString()}`);let a=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create key:",e),e}},eL=async(e,t)=>{try{let r=C?`${C}/global/spend/logs`:"/global/spend/logs";console.log("in keySpendLogsCall:",r);let n=await fetch(`${r}?api_key=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},eH=async e=>{try{let t=C?`${C}/global/spend/teams`:"/global/spend/teams";console.log("in teamSpendLogsCall:",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eD=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/tags`:"/global/spend/tags";t&&r&&(o=`${o}?start_date=${t}&end_date=${r}`),n&&(o+=`&tags=${n.join(",")}`),console.log("in tagsSpendLogsCall:",o);let a=await fetch(`${o}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},eV=async e=>{try{let t=C?`${C}/global/spend/all_tag_names`:"/global/spend/all_tag_names";console.log("in global/spend/all_tag_names call",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eW=async e=>{try{let t=C?`${C}/customer/list`:"/customer/list";console.log("in customer/list",t);let r=await fetch(`${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to fetch end users:",e),e}},eG=async(e,t)=>{try{let r=C?`${C}/user/filter/ui`:"/user/filter/ui";t.get("user_email")&&(r+=`?user_email=${t.get("user_email")}`),t.get("user_id")&&(r+=`?user_id=${t.get("user_id")}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create key:",e),e}},eU=async(e,t,r,n,o,a)=>{try{console.log(`user role in spend logs call: ${r}`);let t=C?`${C}/spend/logs`:"/spend/logs";t="App Owner"==r?`${t}?user_id=${n}&start_date=${o}&end_date=${a}`:`${t}?start_date=${o}&end_date=${a}`;let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to create key:",e),e}},eq=async({accessToken:e,start_date:t,end_date:r,page:n=1,page_size:o=50,params:a={}})=>{try{let i=C?`${C}/spend/logs/ui`:"/spend/logs/ui",l=new URLSearchParams;for(let[e,i]of(l.append("start_date",t),l.append("end_date",r),l.append("page",n.toString()),l.append("page_size",o.toString()),Object.entries(a)))null!=i&&("min_spend"===e||"max_spend"===e?l.append(e,i.toString()):"string"==typeof i&&""!==i&&l.append(e,String(i)));let s=l.toString();s&&(i+=`?${s}`);let c=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!c.ok){let e=await c.json(),t=nW(e);throw k(t),Error(t)}let u=await c.json();return console.log("Spend Logs Response:",u),u}catch(e){throw console.error("Failed to fetch spend logs:",e),e}},eJ=async e=>{try{let t=C?`${C}/global/spend/logs`:"/global/spend/logs",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eK=async e=>{try{let t=C?`${C}/global/spend/keys?limit=5`:"/global/spend/keys?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},eX=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/end_users`:"/global/spend/end_users",a="";a=t?JSON.stringify({api_key:t,startTime:r,endTime:n}):JSON.stringify({startTime:r,endTime:n});let i={method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:a},l=await fetch(o,i);if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}let s=await l.json();return console.log(s),s}catch(e){throw console.error("Failed to create key:",e),e}},eY=async(e,t,r,n)=>{try{let o=C?`${C}/global/spend/provider`:"/global/spend/provider";r&&n&&(o+=`?start_date=${r}&end_date=${n}`),t&&(o+=`&api_key=${t}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eZ=async(e,t,r)=>{try{let n=C?`${C}/global/activity`:"/global/activity";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},eQ=async(e,t,r)=>{try{let n=C?`${C}/global/activity/cache_hits`:"/global/activity/cache_hits";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e0=async(e,t,r)=>{try{let n=C?`${C}/global/activity/model`:"/global/activity/model";t&&r&&(n+=`?start_date=${t}&end_date=${r}`);let o={method:"GET",headers:{[F]:`Bearer ${e}`}},a=await fetch(n,o);if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e1=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions`:"/global/activity/exceptions";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e2=async(e,t,r,n)=>{try{let o=C?`${C}/global/activity/exceptions/deployment`:"/global/activity/exceptions/deployment";t&&r&&(o+=`?start_date=${t}&end_date=${r}`),n&&(o+=`&model_group=${n}`);let a={method:"GET",headers:{[F]:`Bearer ${e}`}},i=await fetch(o,a);if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log(l),l}catch(e){throw console.error("Failed to fetch spend data:",e),e}},e4=async e=>{try{let t=C?`${C}/global/spend/models?limit=5`:"/global/spend/models?limit=5",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to create key:",e),e}},e6=async(e,t)=>{try{let r=C?`${C}/v2/key/info`:"/v2/key/info",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({keys:t})});if(!n.ok){let e=await n.text();if(e.includes("Invalid proxy server token passed"))throw Error("Invalid proxy server token passed");throw k(e),Error("Network response was not ok")}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},e3=async(e,t,r,n)=>{try{console.log("Sending model connection test request:",JSON.stringify(t));let o=C?`${C}/health/test_connection`:"/health/test_connection",a=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({litellm_params:t,model_info:r,mode:n})}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||"error"===l.status)&&"error"!==l.status)return{status:"error",message:l.error?.message||`Connection test failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("Model connection test error:",e),e}},e7=async(e,t)=>{try{console.log("entering keyInfoV1Call");let r=C?`${C}/key/info`:"/key/info";r=`${r}?key=${t}`;let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(console.log("response",n),!n.ok){let e=await n.text();k(e),g.default.fromBackend("Failed to fetch key info - "+e)}let o=await n.json();return console.log("data",o),o}catch(e){throw console.error("Failed to fetch key info:",e),e}},e5=async(e,t,r,n,o,a,i,l,s=null,c=null,u=null,d=null)=>{try{let f=C?`${C}/key/list`:"/key/list";console.log("in keyListCall");let p=new URLSearchParams;r&&p.append("team_id",r.toString()),t&&p.append("organization_id",t.toString()),n&&p.append("key_alias",n),a&&p.append("key_hash",a),o&&p.append("user_id",o.toString()),i&&p.append("page",i.toString()),l&&p.append("size",l.toString()),s&&p.append("sort_by",s),c&&p.append("sort_order",c),u&&p.append("expand",u),d&&p.append("status",d),p.append("return_full_object","true"),p.append("include_team_keys","true"),p.append("include_created_by_keys","true");let m=p.toString();m&&(f+=`?${m}`);let h=await fetch(f,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!h.ok){let e=await h.json(),t=nW(e);throw k(t),Error(t)}let g=await h.json();return console.log("/team/list API Response:",g),g}catch(e){throw console.error("Failed to create key:",e),e}},e9=async(e,t=1,r=50,n)=>{try{let o=new URLSearchParams(Object.entries({page:String(t),size:String(r),...n?{search:n}:{}})),a=C?`${C}/key/aliases`:"/key/aliases";a=`${a}?${o}`;let i=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("/key/aliases API Response:",l),l}catch(e){throw console.error("Failed to fetch key aliases:",e),e}},e8=async(e,t)=>{try{let r=C?`${C}/spend/users`:"/spend/users";console.log("in spendUsersCall:",r);let n=await fetch(`${r}?user_id=${t}`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get spend for user",e),e}},te=async(e,t,r,n)=>{try{let o=C?`${C}/user/request_model`:"/user/request_model",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({models:[t],user_id:r,justification:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log(i),i}catch(e){throw console.error("Failed to create key:",e),e}},tt=async e=>{try{let t=C?`${C}/user/get_requests`:"/user/get_requests";console.log("in userGetRequesedtModelsCall:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log(n),n}catch(e){throw console.error("Failed to get requested models:",e),e}},tr=async(e,t,r,n=null)=>{try{let o=C?`${C}/user/daily/activity/aggregated`:"/user/daily/activity/aggregated",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),a.append("timezone",new Date().getTimezoneOffset().toString()),n&&a.append("user_id",n);let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch aggregated user daily activity:",e),e}},tn=async(e,t)=>{try{let r=C?`${C}/user/get_users?role=${t}`:`/user/get_users?role=${t}`;console.log("in userGetAllUsersCall:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to get requested models:",e),e}},to=async e=>{try{let t=C?`${C}/user/available_roles`:"/user/available_roles",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("response from user/available_role",n),n}catch(e){throw e}},ta=async(e,t)=>{try{if(console.log("Form Values in teamCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/team/new`:"/team/new",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},ti=async(e,t)=>{try{if(console.log("Form Values in credentialCreateCall:",t),t.metadata){console.log("formValues.metadata:",t.metadata);try{t.metadata=JSON.parse(t.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let r=C?`${C}/credentials`:"/credentials",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tl=async e=>{try{let t=C?`${C}/credentials`:"/credentials";console.log("in credentialListCall");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("/credentials API Response:",n),n}catch(e){throw console.error("Failed to create key:",e),e}},ts=async(e,t,r)=>{try{let n=C?`${C}/credentials`:"/credentials";t?n+=`/by_name/${t}`:r&&(n+=`/by_model/${r}`),console.log("in credentialListCall");let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("/credentials API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tc=async(e,t)=>{try{let r=C?`${C}/credentials/${t}`:`/credentials/${t}`;console.log("in credentialDeleteCall:",t);let n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to delete key:",e),e}},tu=async(e,t,r)=>{try{if(console.log("Form Values in credentialUpdateCall:",r),r.metadata){console.log("formValues.metadata:",r.metadata);try{r.metadata=JSON.parse(r.metadata)}catch(e){throw Error("Failed to parse metadata: "+e)}}let n=C?`${C}/credentials/${t}`:`/credentials/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},td=async(e,t)=>{try{if(console.log("Form Values in keyUpdateCall:",t),t.model_tpm_limit){console.log("formValues.model_tpm_limit:",t.model_tpm_limit);try{t.model_tpm_limit=JSON.parse(t.model_tpm_limit)}catch(e){throw Error("Failed to parse model_tpm_limit: "+e)}}if(t.model_rpm_limit){console.log("formValues.model_rpm_limit:",t.model_rpm_limit);try{t.model_rpm_limit=JSON.parse(t.model_rpm_limit)}catch(e){throw Error("Failed to parse model_rpm_limit: "+e)}}let r=C?`${C}/key/update`:"/key/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let o=await n.json();return console.log("Update key Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},tf=async(e,t)=>{try{console.log("Form Values in teamUpateCall:",t);let r=C?`${C}/team/update`:"/team/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error response from the server:",e),g.default.fromBackend("Failed to update team settings: "+e),Error(e)}let o=await n.json();return console.log("Update Team Response:",o),o}catch(e){throw console.error("Failed to update team:",e),e}},tp=async(e,t,r)=>{try{console.log("Form Values in modelUpateCall:",t);let n=C?`${C}/model/${r}/update`:`/model/${r}/update`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let a=await o.json();return console.log("Update model Response:",a),a}catch(e){throw console.error("Failed to update model:",e),e}},tm=async(e,t)=>{try{console.log("Form Values in modelUpateCall:",t);let r=C?`${C}/model/update`:"/model/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),console.error("Error update from the server:",e),Error("Network response was not ok")}let o=await n.json();return console.log("Update model Response:",o),o}catch(e){throw console.error("Failed to update model:",e),e}},th=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_add`:"/team/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,member:r})});if(!o.ok){let e=await o.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tg=async(e,t,r,n,o)=>{try{console.log("Bulk add team members:",{teamId:t,members:r,maxBudgetInTeam:n});let a=C?`${C}/team/bulk_member_add`:"/team/bulk_member_add",i={team_id:t};o?i.all_users=!0:i.members=r,null!=n&&(i.max_budget_in_team=n);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to bulk add team members",n=Error(r);throw n.raw=t,n}let s=await l.json();return console.log("Bulk team member add API Response:",s),s}catch(e){throw console.error("Failed to bulk add team members:",e),e}},tv=async(e,t,r)=>{try{console.log("Form Values in teamMemberUpdateCall:",r),console.log("Budget value:",r.max_budget_in_team),console.log("TPM limit:",r.tpm_limit),console.log("RPM limit:",r.rpm_limit);let n=C?`${C}/team/member_update`:"/team/member_update",o={team_id:t,role:r.role,user_id:r.user_id};void 0!==r.user_email&&(o.user_email=r.user_email),void 0!==r.max_budget_in_team&&null!==r.max_budget_in_team&&(o.max_budget_in_team=r.max_budget_in_team),void 0!==r.tpm_limit&&null!==r.tpm_limit&&(o.tpm_limit=r.tpm_limit),void 0!==r.rpm_limit&&null!==r.rpm_limit&&(o.rpm_limit=r.rpm_limit),console.log("Final request body:",o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!a.ok){let e=await a.text(),t={};try{t=JSON.parse(e)}catch(t){console.warn("Failed to parse error body as JSON:",e)}let r=t?.detail?.error||"Failed to add team member",n=Error(r);throw n.raw=t,n}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to update team member:",e),e}},ty=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/team/member_delete`:"/team/member_delete",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({team_id:t,...void 0!==r.user_email&&{user_email:r.user_email},...void 0!==r.user_id&&{user_id:r.user_id}})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create key:",e),e}},tb=async(e,t,r)=>{try{console.log("Form Values in teamMemberAddCall:",r);let n=C?`${C}/organization/member_add`:"/organization/member_add",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,member:r})});if(!o.ok){let e=await o.text();throw k(e),console.error("Error response from the server:",e),Error(e)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to create organization member:",e),e}},tw=async(e,t,r)=>{try{console.log("Form Values in organizationMemberDeleteCall:",r);let n=C?`${C}/organization/member_delete`:"/organization/member_delete",o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,user_id:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to delete organization member:",e),e}},t$=async(e,t,r)=>{try{console.log("Form Values in organizationMemberUpdateCall:",r);let n=C?`${C}/organization/member_update`:"/organization/member_update",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({organization_id:t,...r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("API Response:",a),a}catch(e){throw console.error("Failed to update organization member:",e),e}},tC=async(e,t,r)=>{try{console.log("Form Values in userUpdateUserCall:",t);let n=C?`${C}/user/update`:"/user/update",o={...t};null!==r&&(o.user_role=r),o=JSON.stringify(o);let a=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}let i=await a.json();return console.log("API Response:",i),i}catch(e){throw console.error("Failed to create key:",e),e}},tE=async(e,t,r,n=!1)=>{try{let o;console.log("Form Values in userUpdateUserCall:",t);let a=C?`${C}/user/bulk_update`:"/user/bulk_update";if(n)o=JSON.stringify({all_users:!0,user_updates:t});else if(r&&r.length>0){let e=[];for(let n of r)e.push({user_id:n,...t});o=JSON.stringify({users:e})}else throw Error("Must provide either userIds or set allUsers=true");let i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:o});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}let l=await i.json();return console.log("API Response:",l),l}catch(e){throw console.error("Failed to create key:",e),e}},tS=async(e,t)=>{try{let r=C?`${C}/global/predict/spend/logs`:"/global/predict/spend/logs",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({data:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log(o),o}catch(e){throw console.error("Failed to create key:",e),e}},tx=async e=>{try{let t=C?`${C}/health/services?service=slack_budget_alerts`:"/health/services?service=slack_budget_alerts";console.log("Checking Slack Budget Alerts service health");let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}let n=await r.json();return g.default.success("Test Slack Alert worked - check your Slack!"),console.log("Service Health Response:",n),n}catch(e){throw console.error("Failed to perform health check:",e),e}},tj=async(e,t)=>{try{let r=C?`${C}/health/services?service=${t}`:`/health/services?service=${t}`;console.log("Checking Slack Budget Alerts service health");let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}return await n.json()}catch(e){throw console.error("Failed to perform health check:",e),e}},tk=async e=>{try{let t=C?`${C}/budget/list`:"/budget/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tO=async e=>{try{let t=C?`${C}/budget/settings`:"/budget/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tT=async(e,t,r)=>{try{let t=C?`${C}/get/config/callbacks`:"/get/config/callbacks",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tF=async e=>{try{let t=C?`${C}/config/list?config_type=general_settings`:"/config/list?config_type=general_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},t_=async e=>{try{let t=C?`${C}/router/settings`:"/router/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get router settings:",e),e}},tI=async e=>{try{let t=C?`${C}/cache/settings`:"/cache/settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get cache settings:",e),e}},tP=async(e,t)=>{try{let r=C?`${C}/cache/settings/test`:"/cache/settings/test",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to test cache connection:",e),e}},tN=async(e,t)=>{try{let r=C?`${C}/cache/settings`:"/cache/settings",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({cache_settings:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update cache settings:",e),e}},tR=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint";t&&(r+=`/team/${t}`);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tM=async(e,t)=>{try{let r=C?`${C}/config/field/info?field_name=${t}`:`/config/field/info?field_name=${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tB=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tA=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint`:"/config/pass_through_endpoint",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tz=async(e,t,r)=>{try{let n=C?`${C}/config/field/update`:"/config/field/update",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,field_value:r,config_type:"general_settings"})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Successfully updated value!"),a}catch(e){throw console.error("Failed to set callbacks:",e),e}},tL=async(e,t)=>{try{let r=C?`${C}/config/field/delete`:"/config/field/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({field_name:t,config_type:"general_settings"})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return g.default.success("Field reset on proxy"),o}catch(e){throw console.error("Failed to get callbacks:",e),e}},tH=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${t}`:`/config/pass_through_endpoint?endpoint_id=${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tD=async(e,t)=>{try{let r=C?`${C}/config/update`:"/config/update",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to set callbacks:",e),e}},tV=async e=>{try{let t=C?`${C}/health`:"/health",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to call /health:",e),e}},tW=async(e,t)=>{try{let r=C?`${C}/health?model_id=${encodeURIComponent(t)}`:`/health?model_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to call /health for model id ${t}:`,e),e}},tG=async e=>{try{let t=C?`${C}/cache/ping`:"/cache/ping",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /cache/ping:",e),e}},tU=async(e,t,r,n=100,o=0)=>{try{let a=C?`${C}/health/history`:"/health/history",i=new URLSearchParams;t&&i.append("model",t),r&&i.append("status_filter",r),i.append("limit",n.toString()),i.append("offset",o.toString()),i.toString()&&(a+=`?${i.toString()}`);let l=await fetch(a,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.text();throw k(e),Error(e)}return await l.json()}catch(e){throw console.error("Failed to call /health/history:",e),e}},tq=async e=>{try{let t=C?`${C}/health/latest`:"/health/latest",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error(e)}return await r.json()}catch(e){throw console.error("Failed to call /health/latest:",e),e}},tJ=async e=>{try{console.log("Getting proxy UI settings"),console.log("proxyBaseUrl in getProxyUISettings:",C);let t=C?`${C}/sso/get/ui_settings`:"/sso/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get callbacks:",e),e}},tK=async e=>{try{let t=C?`${C}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);return console.error("Failed to get UI settings:",t),null}return await r.json()}catch(e){return console.error("Failed to get UI settings:",e),null}},tX=async(e,t)=>{try{let r=C?`${C}/update/ui_settings`:"/update/ui_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update UI settings:",e),e}},tY=async e=>{try{let t=C?`${C}/get/mcp_semantic_filter_settings`:"/get/mcp_semantic_filter_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get MCP semantic filter settings:",e),e}},tZ=async(e,t)=>{try{let r=C?`${C}/update/mcp_semantic_filter_settings`:"/update/mcp_semantic_filter_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP semantic filter settings:",e),e}},tQ=async(e,t,r)=>{try{let n=C?`${C}/v1/responses`:"/v1/responses",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:t,input:[{role:"user",content:r,type:"message"}],tools:[{type:"mcp",server_url:"litellm_proxy",require_approval:"never"}],tool_choice:"required"})}),a=o.headers.get("x-litellm-semantic-filter"),i=o.headers.get("x-litellm-semantic-filter-tools");if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return{data:await o.json(),headers:{filter:a,tools:i}}}catch(e){throw console.error("Failed to test MCP semantic filter:",e),e}},t0=async e=>{try{let t=C?`${C}/v2/guardrails/list`:"/v2/guardrails/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get guardrails list:",e),e}},t1=async(e,t,r)=>{try{let n=C?`${C}/guardrails/usage/overview`:"/guardrails/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get guardrails usage overview:",e),e}},t2=async(e,t,r,n)=>{try{let o=C?`${C}/guardrails/usage/detail/${encodeURIComponent(t)}`:`/guardrails/usage/detail/${encodeURIComponent(t)}`,a=new URLSearchParams;r&&a.append("start_date",r),n&&a.append("end_date",n),a.toString()&&(o+=`?${a.toString()}`);let i=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json();throw Error(nW(e))}return i.json()}catch(e){throw console.error("Failed to get guardrails usage detail:",e),e}},t4=async(e,t)=>{try{let r=C?`${C}/guardrails/usage/logs`:"/guardrails/usage/logs",n=new URLSearchParams;t.guardrailId&&n.append("guardrail_id",t.guardrailId),t.policyId&&n.append("policy_id",t.policyId),null!=t.page&&n.append("page",String(t.page)),null!=t.pageSize&&n.append("page_size",String(t.pageSize)),t.action&&n.append("action",t.action),t.startDate&&n.append("start_date",t.startDate),t.endDate&&n.append("end_date",t.endDate),n.toString()&&(r+=`?${n.toString()}`);let o=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json();throw Error(nW(e))}return o.json()}catch(e){throw console.error("Failed to get guardrails usage logs:",e),e}},t6=async(e,t,r)=>{try{let n=C?`${C}/policies/usage/overview`:"/policies/usage/overview",o=new URLSearchParams;t&&o.append("start_date",t),r&&o.append("end_date",r),o.toString()&&(n+=`?${o.toString()}`);let a=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!a.ok){let e=await a.json();throw Error(nW(e))}return a.json()}catch(e){throw console.error("Failed to get policies usage overview:",e),e}},t3=async e=>{try{let t=C?`${C}/policies/list`:"/policies/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policies list:",e),e}},t7=async(e,t,r)=>{try{let n=C?`${C}/utils/test_policies_and_guardrails`:"/utils/test_policies_and_guardrails",o=await fetch(n,{method:"POST",signal:r,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({policy_names:t.policy_names??null,guardrail_names:t.guardrail_names??null,inputs:t.inputs??null,inputs_list:t.inputs_list??null,request_data:t.request_data??{},input_type:t.input_type??"request",agent_id:t.agent_id??null})});if(!o.ok){let e=await o.text(),t="Failed to test policies and guardrails";try{let r=JSON.parse(e);r.detail?t="string"==typeof r.detail?r.detail:JSON.stringify(r.detail):r.message&&(t=r.message)}catch{t=e||t}throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test policies and guardrails:",e),e}},t5=async(e,t)=>{try{let r=C?`${C}/policy/info/${t}`:`/policy/info/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error(`Failed to get policy info for ${t}:`,e),e}},t9=async e=>{try{let t=C?`${C}/policy/templates`:"/policy/templates",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy templates:",e),e}},t8=async(e,t,r,n,o)=>{try{let a=C?`${C}/policy/templates/enrich`:"/policy/templates/enrich",i={template_id:t,parameters:r};n&&(i.model=n),o&&(i.competitors=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to enrich policy template:",e),e}},re=async(e,t,r,n)=>{try{let o=C?`${C}/policy/templates/suggest`:"/policy/templates/suggest",a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({attack_examples:t.filter(e=>e.trim()),description:r,model:n})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return a.json()}catch(e){throw console.error("Failed to suggest policy templates:",e),e}},rt=async(e,t,r)=>{try{let n=C?`${C}/policy/templates/test`:"/policy/templates/test",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail_definitions:t,text:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return o.json()}catch(e){throw console.error("Failed to test policy template:",e),e}},rr=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/policy/templates/enrich/stream`:"/policy/templates/enrich/stream",u={template_id:t,parameters:r,model:n};l?.instruction&&(u.instruction=l.instruction),l?.existingCompetitors&&(u.competitors=l.existingCompetitors);let d=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(u)});if(!d.ok){let e=nW(await d.json());throw k(e),Error(e)}let f=d.body?.getReader();if(!f)throw Error("No response body");let p=new TextDecoder,m="";for(;;){let{done:e,value:t}=await f.read();if(e)break;let r=(m+=p.decode(t,{stream:!0})).split("\n");for(let e of(m=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"competitor"===t.type?o(t.name):"status"===t.type?s?.(t.message):"done"===t.type?a(t):"error"===t.type&&i?.(t.message)}catch{}}},rn=async(e,t,r,n,o,a,i,l,s)=>{let c=C?`${C}/usage/ai/chat`:"/usage/ai/chat",u=await fetch(c,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({messages:t,model:r}),signal:s});if(!u.ok){let e=nW(await u.json());throw k(e),Error(e)}let d=u.body?.getReader();if(!d)throw Error("No response body");let f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await d.read();if(e)break;let r=(p+=f.decode(t,{stream:!0})).split("\n");for(let e of(p=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));"chunk"===t.type?n(t.content):"status"===t.type?i?.(t.message):"tool_call"===t.type?l?.(t):"done"===t.type?o():"error"===t.type&&a?.(t.message)}catch{}}},ro=async(e,t)=>{try{let r=C?`${C}/policies`:"/policies",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy:",e),e}},ra=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}`:`/policies/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy:",e),e}},ri=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/policies/name/${r}/versions`:`/policies/name/${r}/versions`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to list policy versions:",e),e}},rl=async(e,t,r)=>{try{let n=encodeURIComponent(t),o=C?`${C}/policies/name/${n}/versions`:`/policies/name/${n}/versions`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({source_policy_id:r??void 0})});if(!a.ok){let e=await a.json(),t=nW(e);throw k(t),Error(t)}return await a.json()}catch(e){throw console.error("Failed to create policy version:",e),e}},rs=async(e,t,r)=>{try{let n=C?`${C}/policies/${t}/status`:`/policies/${t}/status`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({version_status:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update policy version status:",e),e}},rc=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy:",e),e}},ru=async(e,t)=>{try{let r=C?`${C}/policies/${t}`:`/policies/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get policy info:",e),e}},rd=async e=>{try{let t=C?`${C}/policies/attachments/list`:"/policies/attachments/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get policy attachments list:",e),e}},rf=async(e,t)=>{try{let r=C?`${C}/policies/attachments`:"/policies/attachments",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create policy attachment:",e),e}},rp=async(e,t)=>{try{let r=C?`${C}/policies/attachments/${t}`:`/policies/attachments/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete policy attachment:",e),e}},rm=async(e,t,r)=>{try{let n=C?`${C}/policies/test-pipeline`:"/policies/test-pipeline",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({pipeline:t,test_messages:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to test pipeline:",e),e}},rh=async(e,t)=>{try{let r=C?`${C}/policies/${t}/resolved-guardrails`:`/policies/${t}/resolved-guardrails`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get resolved guardrails:",e),e}},rg=async(e,t)=>{try{let r=C?`${C}/policies/resolve`:"/policies/resolve",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to resolve policies:",e),e}},rv=async(e,t)=>{try{let r=C?`${C}/policies/attachments/estimate-impact`:"/policies/attachments/estimate-impact",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to estimate attachment impact:",e),e}},ry=async e=>{try{let t=C?`${C}/prompts/list`:"/prompts/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to get prompts list:",e),e}},rb=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/info`:`/prompts/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt info:",e),e}},rw=async(e,t)=>{try{let r=C?`${C}/prompts/${t}/versions`:`/prompts/${t}/versions`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw 404!==n.status&&k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to get prompt versions:",e),e}},r$=async(e,t)=>{try{let r=C?`${C}/prompts`:"/prompts",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to create prompt:",e),e}},rC=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to update prompt:",e),e}},rE=async(e,t)=>{try{let r=C?`${C}/prompts/${t}`:`/prompts/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete prompt:",e),e}},rS=async(e,t)=>{try{let r=new FormData;r.append("file",t);let n=C?`${C}/utils/dotprompt_json_converter`:"/utils/dotprompt_json_converter",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`},body:r});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to convert prompt file:",e),e}},rx=async(e,t,r)=>{try{let n=C?`${C}/prompts/${t}`:`/prompts/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to patch prompt:",e),e}},rj=async(e,t)=>{try{let r=C?`${C}/v1/agents`:"/v1/agents",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create agent response:",o),o}catch(e){throw console.error("Failed to create agent:",e),e}},rk=async(e,t)=>{try{let r=C?`${C}/guardrails`:"/guardrails",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({guardrail:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Create guardrail response:",o),o}catch(e){throw console.error("Failed to create guardrail:",e),e}},rO=async(e,t,r)=>{try{let n=C?`${C}/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`:`/spend/logs/ui/${t}?start_date=${encodeURIComponent(r)}`;console.log("Fetching log details from:",n);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Fetched log details:",a),a}catch(e){throw console.error("Failed to fetch log details:",e),e}},rT=async e=>{try{let t=C?`${C}/get/internal_user_settings`:"/get/internal_user_settings";console.log("Fetching SSO settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO settings:",n),n}catch(e){throw console.error("Failed to fetch SSO settings:",e),e}},rF=async(e,t)=>{try{let r=C?`${C}/update/internal_user_settings`:"/update/internal_user_settings";console.log("Updating internal user settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Updated internal user settings:",o),g.default.success("Internal user settings updated successfully"),o}catch(e){throw console.error("Failed to update internal user settings:",e),e}},r_=async e=>{try{let t=C?`${C}/v1/mcp/discover`:"/v1/mcp/discover",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch discoverable MCP servers:",e),e}},rI=async e=>{try{let t=C?`${C}/v1/mcp/server`:"/v1/mcp/server";console.log("Fetching MCP servers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP servers:",n),n}catch(e){throw console.error("Failed to fetch MCP servers:",e),e}},rP=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server/health`:"/v1/mcp/server/health";if(t&&t.length>0){let e=new URLSearchParams;t.forEach(t=>e.append("server_ids",t)),r=`${r}?${e.toString()}`}console.log("Fetching MCP server health from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched MCP server health:",o),o}catch(e){throw console.error("Failed to fetch MCP server health:",e),e}},rN=async e=>{try{let t=C?`${C}/v1/mcp/access_groups`:"/v1/mcp/access_groups";console.log("Fetching MCP access groups from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched MCP access groups:",n),n.access_groups||[]}catch(e){throw console.error("Failed to fetch MCP access groups:",e),e}},rR=async e=>{try{let t=C?`${C}/v1/mcp/network/client-ip`:"/v1/mcp/network/client-ip",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok)return null;return(await r.json()).ip||null}catch{return null}},rM=async(e,t)=>{try{console.log("Form Values in createMCPServer:",t);let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({...t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("API Response:",o),o}catch(e){throw console.error("Failed to create key:",e),e}},rB=async(e,t)=>{try{let r=C?`${C}/v1/mcp/server`:"/v1/mcp/server",n=await fetch(r,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to update MCP server:",e),e}},rA=async(e,t)=>{try{let r=(C?`${C}`:"")+`/v1/mcp/server/${t}`;console.log("in deleteMCPServer:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}}catch(e){throw console.error("Failed to delete key:",e),e}},rz=async e=>{try{let t=C?`${C}/search_tools/list`:"/search_tools/list";console.log("Fetching search tools from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched search tools:",n),n}catch(e){throw console.error("Failed to fetch search tools:",e),e}},rL=async(e,t)=>{try{let r=C?`${C}/search_tools/${t}`:`/search_tools/${t}`;console.log("Fetching search tool by ID from:",r);let n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Fetched search tool:",o),o}catch(e){throw console.error("Failed to fetch search tool:",e),e}},rH=async(e,t)=>{try{console.log("Creating search tool with values:",t);let r=C?`${C}/search_tools`:"/search_tools",n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Created search tool:",o),o}catch(e){throw console.error("Failed to create search tool:",e),e}},rD=async(e,t,r)=>{try{console.log("Updating search tool with ID:",t,"values:",r);let n=C?`${C}/search_tools/${t}`:`/search_tools/${t}`,o=await fetch(n,{method:"PUT",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({search_tool:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Updated search tool:",a),a}catch(e){throw console.error("Failed to update search tool:",e),e}},rV=async(e,t)=>{try{let r=(C?`${C}`:"")+`/search_tools/${t}`;console.log("Deleting search tool:",t);let n=await fetch(r,{method:x,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Deleted search tool:",o),o}catch(e){throw console.error("Failed to delete search tool:",e),e}},rW=async e=>{try{let t=C?`${C}/search_tools/ui/available_providers`:"/search_tools/ui/available_providers";console.log("Fetching available search providers from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched available search providers:",n),n}catch(e){throw console.error("Failed to fetch available search providers:",e),e}},rG=async(e,t)=>{try{let r=C?`${C}/search_tools/test_connection`:"/search_tools/test_connection";console.log("Testing search tool connection:",r);let n=await fetch(r,{method:S,headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({litellm_params:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Test connection response:",o),o}catch(e){throw console.error("Failed to test search tool connection:",e),e}},rU=async(e,t,r)=>{try{let n=C?`${C}/mcp-rest/tools/list?server_id=${t}`:`/mcp-rest/tools/list?server_id=${t}`;console.log("Fetching MCP tools from:",n);let o={[F]:`Bearer ${e}`,"Content-Type":"application/json",...r},a=await fetch(n,{method:"GET",headers:o}),i=await a.json();if(console.log("Fetched MCP tools response:",i),!a.ok){if(i.error&&i.message)throw Error(i.message);throw Error("Failed to fetch MCP tools")}return i}catch(e){return console.error("Failed to fetch MCP tools:",e),{tools:[],error:"network_error",message:e instanceof Error?e.message:"Failed to fetch MCP tools",stack_trace:null}}},rq=async(e,t,r,n,o)=>{try{let a=C?`${C}/mcp-rest/tools/call`:"/mcp-rest/tools/call";console.log("Calling MCP tool:",r,"with arguments:",n,"for server:",t);let i={[F]:`Bearer ${e}`,"Content-Type":"application/json",...o?.customHeaders||{}},l={server_id:t,name:r,arguments:n};o?.guardrails&&o.guardrails.length>0&&(l.litellm_metadata={guardrails:o.guardrails});let s=await fetch(a,{method:"POST",headers:i,body:JSON.stringify(l)});if(!s.ok){let e="Network response was not ok",t=null,r=await s.text();try{let n=JSON.parse(r);n.detail?"string"==typeof n.detail?e=n.detail:"object"==typeof n.detail&&(e=n.detail.message||n.detail.error||"An error occurred",t=n.detail):e=n.message||n.error||e}catch(t){console.error("Failed to parse JSON error response:",t),r&&(e=r)}let n=Error(e);throw n.status=s.status,n.statusText=s.statusText,n.details=t,k(e),n}let c=await s.json();return console.log("MCP tool call response:",c),c}catch(e){throw console.error("Failed to call MCP tool:",e),console.error("Error type:",typeof e),e instanceof Error&&(console.error("Error message:",e.message),console.error("Error stack:",e.stack)),e}},rJ=async(e,t)=>{try{let r=C?`${C}/tag/new`:"/tag/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error creating tag:",e),e}},rK=async(e,t)=>{try{let r=C?`${C}/tag/update`:"/tag/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error updating tag:",e),e}},rX=async(e,t)=>{try{let r=C?`${C}/tag/info`:"/tag/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({names:t})});if(!n.ok){let e=await n.text();return await k(e),{}}return await n.json()}catch(e){throw console.error("Error getting tag info:",e),e}},rY=async e=>{try{let t=C?`${C}/tag/list`:"/tag/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.text();return await k(e),{}}return await r.json()}catch(e){throw console.error("Error listing tags:",e),e}},rZ=async(e,t)=>{try{let r=C?`${C}/tag/delete`:"/tag/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({name:t})});if(!n.ok){let e=await n.text();await k(e);return}return await n.json()}catch(e){throw console.error("Error deleting tag:",e),e}},rQ=async e=>{try{let t=C?`${C}/get/default_team_settings`:"/get/default_team_settings";console.log("Fetching default team settings from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched default team settings:",n),n}catch(e){throw console.error("Failed to fetch default team settings:",e),e}},r0=async(e,t)=>{try{let r=C?`${C}/update/default_team_settings`:"/update/default_team_settings";console.log("Updating default team settings:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Updated default team settings:",o),g.default.success("Default team settings updated successfully"),o}catch(e){throw console.error("Failed to update default team settings:",e),e}},r1=async(e,t)=>{try{let r=C?`${C}/team/permissions_list?team_id=${t}`:`/team/permissions_list?team_id=${t}`,n=await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=await n.json();return console.log("Team permissions response:",o),o}catch(e){throw console.error("Failed to get team permissions:",e),e}},r2=async(e,t,r)=>{try{let n=C?`${C}/team/permissions_update`:"/team/permissions_update",o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({team_id:t,team_member_permissions:r})});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return console.log("Team permissions response:",a),a}catch(e){throw console.error("Failed to update team permissions:",e),e}},r4=async(e,t)=>{try{let r=C?`${C}/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`:`/spend/logs/session/ui?session_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to fetch session logs:",e),e}},r6=async(e,t)=>{try{let r=C?`${C}/vector_store/new`:"/vector_store/new",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to create vector store")}return await n.json()}catch(e){throw console.error("Error creating vector store:",e),e}},r3=async(e,t=1,r=100)=>{try{let t=C?`${C}/vector_store/list`:"/vector_store/list",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to list vector stores")}return await r.json()}catch(e){throw console.error("Error listing vector stores:",e),e}},r7=async(e,t)=>{try{let r=C?`${C}/vector_store/delete`:"/vector_store/delete",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to delete vector store")}return await n.json()}catch(e){throw console.error("Error deleting vector store:",e),e}},r5=async(e,t)=>{try{let r=C?`${C}/vector_store/info`:"/vector_store/info",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify({vector_store_id:t})});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to get vector store info")}return await n.json()}catch(e){throw console.error("Error getting vector store info:",e),e}},r9=async(e,t)=>{try{let r=C?`${C}/vector_store/update`:"/vector_store/update",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json();throw Error(e.detail||"Failed to update vector store")}return await n.json()}catch(e){throw console.error("Error updating vector store:",e),e}},r8=async(e,t,r,n,o,a,i)=>{try{let l=C?`${C}/rag/ingest`:"/rag/ingest",s=new FormData;s.append("file",t);let c={ingest_options:{vector_store:{custom_llm_provider:r,...n&&{vector_store_id:n},...i&&i}}};(o||a)&&(c.ingest_options.litellm_vector_store_params={},o&&(c.ingest_options.litellm_vector_store_params.vector_store_name=o),a&&(c.ingest_options.litellm_vector_store_params.vector_store_description=a)),s.append("request",JSON.stringify(c));let u=await fetch(l,{method:"POST",headers:{[F]:`Bearer ${e}`},body:s});if(!u.ok){let e=await u.json();throw Error(e.error?.message||e.detail||"Failed to ingest document")}return await u.json()}catch(e){throw console.error("Error ingesting document:",e),e}},ne=async e=>{try{let t=C?`${C}/email/event_settings`:"/email/event_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get email event settings")}let n=await r.json();return console.log("Email event settings response:",n),n}catch(e){throw console.error("Failed to get email event settings:",e),e}},nt=async(e,t)=>{try{let r=C?`${C}/email/event_settings`:"/email/event_settings",n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to update email event settings")}let o=await n.json();return console.log("Update email event settings response:",o),o}catch(e){throw console.error("Failed to update email event settings:",e),e}},nr=async e=>{try{let t=C?`${C}/email/event_settings/reset`:"/email/event_settings/reset",r=await fetch(t,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to reset email event settings")}let n=await r.json();return console.log("Reset email event settings response:",n),n}catch(e){throw console.error("Failed to reset email event settings:",e),e}},nn=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete agent response:",o),o}catch(e){throw console.error("Failed to delete agent:",e),e}},no=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}/make_public`:`/v1/agents/${t}/make_public`,n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agent public response:",o),o}catch(e){throw console.error("Failed to make agent public:",e),e}},na=async(e,t)=>{try{let r=C?`${C}/v1/agents/make_public`:"/v1/agents/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({agent_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},ni=async(e,t)=>{try{let r=C?`${C}/v1/mcp/make_public`:"/v1/mcp/make_public",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({mcp_server_ids:t})});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Make agents public response:",o),o}catch(e){throw console.error("Failed to make agents public:",e),e}},nl=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,n=await fetch(r,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error(e)}let o=await n.json();return console.log("Delete guardrail response:",o),o}catch(e){throw console.error("Failed to delete guardrail:",e),e}},ns=async e=>{try{let t=C?`${C}/guardrails/ui/add_guardrail_settings`:"/guardrails/ui/add_guardrail_settings",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail UI settings")}let n=await r.json();return console.log("Guardrail UI settings response:",n),n}catch(e){throw console.error("Failed to get guardrail UI settings:",e),e}},nc=async e=>{try{let t=C?`${C}/guardrails/ui/provider_specific_params`:"/guardrails/ui/provider_specific_params",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get guardrail provider specific parameters")}let n=await r.json();return console.log("Guardrail provider specific params response:",n),n}catch(e){throw console.error("Failed to get guardrail provider specific parameters:",e),e}},nu=async(e,t)=>{try{let r=encodeURIComponent(t),n=C?`${C}/guardrails/ui/category_yaml/${r}`:`/guardrails/ui/category_yaml/${r}`;console.log(`Fetching category YAML from: ${n}`);let o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text();throw console.error(`Failed to get category YAML. Status: ${o.status}, Error:`,e),k(e),Error(`Failed to get category YAML: ${o.status} ${e}`)}let a=await o.json();return console.log("Category YAML response:",a),a}catch(e){throw console.error("Failed to get category YAML:",e),e}},nd=async e=>{try{let t=C?`${C}/guardrails/ui/major_airlines`:"/guardrails/ui/major_airlines",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw console.error(`Failed to get major airlines. Status: ${r.status}, Error:`,e),k(e),Error(`Failed to get major airlines: ${r.status} ${e}`)}return await r.json()}catch(e){throw console.error("Failed to get major airlines:",e),e}},nf=async e=>{try{let t=C?`${C}/v1/agents`:"/v1/agents",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.text();throw k(e),Error("Failed to get agents list")}let n=await r.json();return console.log("Agents list response:",n),{agents:n}}catch(e){throw console.error("Failed to get agents list:",e),e}},np=async(e,t)=>{try{let r=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get agent info")}let o=await n.json();return console.log("Agent info response:",o),o}catch(e){throw console.error("Failed to get agent info:",e),e}},nm=async(e,t)=>{try{let r=C?`${C}/guardrails/${t}/info`:`/guardrails/${t}/info`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to get guardrail info")}let o=await n.json();return console.log("Guardrail info response:",o),o}catch(e){throw console.error("Failed to get guardrail info:",e),e}},nh=async(e,t,r)=>{try{let n=C?`${C}/v1/agents/${t}`:`/v1/agents/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to patch agent")}let a=await o.json();return console.log("Patch agent response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},ng=async(e,t,r)=>{try{let n=C?`${C}/guardrails/${t}`:`/guardrails/${t}`,o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.text();throw k(e),Error("Failed to update guardrail")}let a=await o.json();return console.log("Update guardrail response:",a),a}catch(e){throw console.error("Failed to update guardrail:",e),e}},nv=async(e,t,r,n,o)=>{try{let a=C?`${C}/guardrails/apply_guardrail`:"/guardrails/apply_guardrail",i={guardrail_name:t,text:r};n&&(i.language=n),o&&o.length>0&&(i.entities=o);let l=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!l.ok){let e=await l.text(),t="Failed to apply guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let s=await l.json();return console.log("Apply guardrail response:",s),s}catch(e){throw console.error("Failed to apply guardrail:",e),e}},ny=async(e,t)=>{try{let r=C?`${C}/guardrails/test_custom_code`:"/guardrails/test_custom_code",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.text(),t="Failed to test custom code guardrail";try{let r=JSON.parse(e);r.error?.message?t=r.error.message:r.detail?t=r.detail:r.message&&(t=r.message)}catch(r){t=e||t}throw k(e),Error(t)}let o=await n.json();return console.log("Test custom code guardrail response:",o),o}catch(e){throw console.error("Failed to test custom code guardrail:",e),e}},nb=async(e,t)=>{try{let r=C?`${C}/guardrails/validate_blocked_words_file`:"/guardrails/validate_blocked_words_file",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({file_content:t})});if(!n.ok){let e=await n.text();throw k(e),Error("Failed to validate blocked words file")}let o=await n.json();return console.log("Validate blocked words file response:",o),o}catch(e){throw console.error("Failed to validate blocked words file:",e),e}},nw=async e=>{try{let t=C?`${C}/get/sso_settings`:"/get/sso_settings";console.log("Fetching SSO configuration from:",t);let r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}let n=await r.json();return console.log("Fetched SSO configuration:",n),n}catch(e){throw console.error("Failed to fetch SSO configuration:",e),e}},n$=async(e,t)=>{try{let r=C?`${C}/update/sso_settings`:"/update/sso_settings";console.log("Updating SSO configuration:",t);let n=await fetch(r,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){let e=await n.json(),t="object"==typeof e?.detail?e.detail?.error||e.detail?.message:e?.detail,r="string"==typeof t&&t.length>0?t:nW(e);k(r);let o=Error(r);throw e?.detail!==void 0&&(o.detail=e.detail),o.rawError=e,o}let o=await n.json();return console.log("Updated SSO configuration:",o),o}catch(e){throw console.error("Failed to update SSO configuration:",e),e}},nC=async(e,t,r,n,o)=>{try{let t=C?`${C}/audit`:"/audit",r=new URLSearchParams;n&&r.append("page",n.toString()),o&&r.append("page_size",o.toString());let a=r.toString();a&&(t+=`?${a}`);let i=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=nW(e);throw k(t),Error(t)}return await i.json()}catch(e){throw console.error("Failed to fetch audit logs:",e),e}},nE=async e=>{try{let t=C?`${C}/user/available_users`:"/user/available_users",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch remaining users:",e),e}},nS=async e=>{try{let t=C?`${C}/health/license`:"/health/license",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`}});if(!r.ok){if(404===r.status)return null;let e=await r.text();throw k(e),Error("Network response was not ok")}return await r.json()}catch(e){throw console.error("Failed to fetch license info:",e),e}},nx=async(e,t,r)=>{try{let n=C?`${C}/config/pass_through_endpoint/${encodeURIComponent(t)}`:`/config/pass_through_endpoint/${encodeURIComponent(t)}`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){let e=await o.json(),t=nW(e);throw k(t),Error(t)}let a=await o.json();return g.default.success("Pass through endpoint updated successfully"),a}catch(e){throw console.error("Failed to update pass through endpoint:",e),e}},nj=async(e,t)=>{try{let r=C?`${C}/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`:`/config/pass_through_endpoint?endpoint_id=${encodeURIComponent(t)}`,n=await fetch(r,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}let o=(await n.json()).endpoints;if(!o||0===o.length)throw Error("Pass through endpoint not found");return o[0]}catch(e){throw console.error("Failed to get pass through endpoint info:",e),e}},nk=async(e,t)=>{try{let r=C?`${C}/config/callback/delete`:"/config/callback/delete",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({callback_name:t})});if(!n.ok){let e=await n.json(),t=nW(e);throw k(t),Error(t)}return await n.json()}catch(e){throw console.error("Failed to delete specific callback:",e),e}},nO=async e=>{let t=E(),r=await fetch(`${t}/v1/mcp/tools`,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(`HTTP error! status: ${r.status}`);return await r.json()},nT=async(e,t)=>{try{console.log("Testing MCP connection with config:",JSON.stringify(t));let r=C?`${C}/mcp-rest/test/connection`:"/mcp-rest/test/connection",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",[F]:`Bearer ${e}`},body:JSON.stringify(t)}),o=n.headers.get("content-type");if(!o||!o.includes("application/json")){let e=await n.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${n.status}: ${n.statusText}). Check network tab for details.`)}let a=await n.json();if((!n.ok||"error"===a.status)&&"error"!==a.status)return{status:"error",message:a.error?.message||`MCP connection test failed: ${n.status} ${n.statusText}`};return a}catch(e){throw console.error("MCP connection test error:",e),e}},nF=async(e,t,r)=>{try{console.log("Testing MCP tools list with config:",JSON.stringify(t));let n=C?`${C}/mcp-rest/test/tools/list`:"/mcp-rest/test/tools/list",o={"Content-Type":"application/json"};e&&(o["x-litellm-api-key"]=e),r?o.Authorization=`Bearer ${r}`:e&&(o[F]=`Bearer ${e}`);let a=await fetch(n,{method:"POST",headers:o,body:JSON.stringify(t)}),i=a.headers.get("content-type");if(!i||!i.includes("application/json")){let e=await a.text();throw console.error("Received non-JSON response:",e),Error(`Received non-JSON response (${a.status}: ${a.statusText}). Check network tab for details.`)}let l=await a.json();if((!a.ok||l.error)&&!l.error)return{tools:[],error:"request_failed",message:l.message||`MCP tools list failed: ${a.status} ${a.statusText}`};return l}catch(e){throw console.error("MCP tools list test error:",e),e}},n_=async(e,t)=>{let r=C?`${C}/v1/mcp/server/oauth/session`:"/v1/mcp/server/oauth/session",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)}),o=await n.json();if(!n.ok)throw Error(nW(o)||o?.error||"Failed to cache MCP server");return o},nI=async(e,t,r)=>{let n=E(),o=encodeURIComponent(t.trim()),a=`${n}/v1/mcp/server/oauth/${o}/register`,i=await fetch(a,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json, text/event-stream"},body:JSON.stringify(r)}),l=await i.json();if(!i.ok)throw Error(nW(l)||l?.detail||"Failed to register OAuth client");return l},nP=({serverId:e,clientId:t,redirectUri:r,state:n,codeChallenge:o,scope:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/authorize`,c=new URLSearchParams({redirect_uri:r,state:n,response_type:"code",code_challenge:o,code_challenge_method:"S256"});return t&&t.trim().length>0&&c.set("client_id",t),a&&a.trim().length>0&&c.set("scope",a),`${s}?${c.toString()}`},nN=async({serverId:e,code:t,clientId:r,clientSecret:n,codeVerifier:o,redirectUri:a})=>{let i=E(),l=encodeURIComponent(e.trim()),s=`${i}/v1/mcp/server/oauth/${l}/token`,c=new URLSearchParams;c.set("grant_type","authorization_code"),c.set("code",t),r&&r.trim().length>0&&c.set("client_id",r),n&&n.trim().length>0&&c.set("client_secret",n),c.set("code_verifier",o),c.set("redirect_uri",a);let u=await fetch(s,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}),d=await u.json();if(!u.ok)throw Error(nW(d)||d?.detail||"OAuth token exchange failed");return d},nR=async(e,t,r)=>{try{let n=`${E()}/v1/vector_stores/${t}/search`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r})});if(!o.ok){let e=await o.text();return await k(e),null}return await o.json()}catch(e){throw console.error("Error testing vector store search:",e),e}},nM=async(e,t,r,n)=>{try{let o=`${E()}/v1/search/${t}`,a=await fetch(o,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({query:r,max_results:n||5})});if(!a.ok){let e=await a.text();return await k(e),null}return await a.json()}catch(e){throw console.error("Error querying search tool:",e),e}},nB=async(e,t,r,n=1,o=50,a)=>{try{let i=C?`${C}/tag/user-agent/analytics`:"/tag/user-agent/analytics",l=new URLSearchParams,s=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};l.append("start_date",s(t)),l.append("end_date",s(r)),l.append("page",n.toString()),l.append("page_size",o.toString()),a&&l.append("user_agent_filter",a);let c=l.toString();c&&(i+=`?${c}`);let u=await fetch(i,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch user agent analytics:",e),e}},nA=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/dau`:"/tag/dau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch DAU:",e),e}},nz=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/wau`:"/tag/wau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch WAU:",e),e}},nL=async(e,t,r,n)=>{try{let o,a,i,l=C?`${C}/tag/mau`:"/tag/mau",s=new URLSearchParams;s.append("end_date",(o=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),`${o}-${a}-${i}`)),n&&n.length>0?n.forEach(e=>{s.append("tag_filters",e)}):r&&s.append("tag_filter",r);let c=s.toString();c&&(l+=`?${c}`);let u=await fetch(l,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!u.ok){let e=await u.json(),t=nW(e);throw k(t),Error(t)}return await u.json()}catch(e){throw console.error("Failed to fetch MAU:",e),e}},nH=async e=>{try{let t=C?`${C}/tag/distinct`:"/tag/distinct",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok){let e=await r.json(),t=nW(e);throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch distinct tags:",e),e}},nD=async(e,t,r,n)=>{try{let o=C?`${C}/tag/summary`:"/tag/summary",a=new URLSearchParams,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`};a.append("start_date",i(t)),a.append("end_date",i(r)),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let l=a.toString();l&&(o+=`?${l}`);let s=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!s.ok){let e=await s.json(),t=nW(e);throw k(t),Error(t)}return await s.json()}catch(e){throw console.error("Failed to fetch user agent summary:",e),e}},nV=async(e,t=1,r=50,n)=>{try{let o=C?`${C}/tag/user-agent/per-user-analytics`:"/tag/user-agent/per-user-analytics",a=new URLSearchParams;a.append("page",t.toString()),a.append("page_size",r.toString()),n&&n.length>0&&n.forEach(e=>{a.append("tag_filters",e)});let i=a.toString();i&&(o+=`?${i}`);let l=await fetch(o,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!l.ok){let e=await l.json(),t=nW(e);throw k(t),Error(t)}return await l.json()}catch(e){throw console.error("Failed to fetch per-user analytics:",e),e}},nW=e=>e?.error&&(e.error.message||e.error)||e?.message||e?.detail||e?.error||JSON.stringify(e),nG=async(e,t)=>{let r=E(),n=r?`${r}/v2/login`:"/v2/login",o=JSON.stringify({username:e,password:t}),a=await fetch(n,{method:"POST",body:o,credentials:"include",headers:{"Content-Type":"application/json"}});if(!a.ok)throw Error(nW(await a.json()));return await a.json()},nU=async()=>{let e=E(),t=e?`${e}/get/ui_settings`:"/get/ui_settings",r=await fetch(t,{method:"GET"});if(!r.ok)throw Error(nW(await r.json()));return await r.json()},nq=async(e,t)=>{let r=E(),n=r?`${r}/update/ui_settings`:"/update/ui_settings",o=await fetch(n,{method:"PATCH",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw Error(nW(await o.json()));return await o.json()},nJ=async()=>{try{let e=E(),t=e?`${e}/claude-code/marketplace.json`:"/claude-code/marketplace.json",r=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){let e=await r.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await r.json()}catch(e){throw console.error("Failed to fetch Claude Code marketplace:",e),e}},nK=async(e,t=!1)=>{try{let r=E(),n=r?`${r}/claude-code/plugins?enabled_only=${t}`:`/claude-code/plugins?enabled_only=${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to fetch Claude Code plugins list:",e),e}},nX=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to fetch plugin "${t}":`,e),e}},nY=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins`:"/claude-code/plugins",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error("Failed to register Claude Code plugin:",e),e}},nZ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/enable`:`/claude-code/plugins/${t}/enable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to enable plugin "${t}":`,e),e}},nQ=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}/disable`:`/claude-code/plugins/${t}/disable`,o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to disable plugin "${t}":`,e),e}},n0=async(e,t)=>{try{let r=E(),n=r?`${r}/claude-code/plugins/${t}`:`/claude-code/plugins/${t}`,o=await fetch(n,{method:"DELETE",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!o.ok){let e=await o.text(),t=nW(JSON.parse(e));throw k(t),Error(t)}return await o.json()}catch(e){throw console.error(`Failed to delete plugin "${t}":`,e),e}},n1=async(e,t)=>{let r=C?`${C}/compliance/eu-ai-act`:"/compliance/eu-ai-act",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n2=async(e,t)=>{let r=C?`${C}/compliance/gdpr`:"/compliance/gdpr",n=await fetch(r,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error(await n.text());return n.json()},n4=async e=>{let t=C?`${C}/v1/tool/list`:"/v1/tool/list",r=await fetch(t,{method:"GET",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!r.ok)throw Error(await r.text());return(await r.json()).tools??[]},n6=async(e,t,r)=>{let n=C?`${C}/v1/tool/policy`:"/v1/tool/policy",o=await fetch(n,{method:"POST",headers:{[F]:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({tool_name:t,call_policy:r})});if(!o.ok)throw Error(await o.text());return o.json()}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/turbopack-901b35f89c1f6751.js b/litellm/proxy/_experimental/out/_next/static/chunks/turbopack-901b35f89c1f6751.js
index 1acb812765e..9668a5b9bde 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/turbopack-901b35f89c1f6751.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/turbopack-901b35f89c1f6751.js
@@ -1,4 +1,4 @@
-(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/6774f9c1f201e744.js","static/chunks/1300460219810c10.js","static/chunks/e96398764f77c728.js","static/chunks/7f9e9c54ac262de2.js"],runtimeModuleIds:[494553]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/litellm-asset-prefix/_next/",r=(self.TURBOPACK_CHUNK_SUFFIX??document?.currentScript?.getAttribute?.("src")?.replace(/^(.*(?=\?)|^.*$)/,""))||"",n=new WeakMap;function o(e,t){this.m=e,this.e=t}let l=o.prototype,i=Object.prototype.hasOwnProperty,s="u">typeof Symbol&&Symbol.toStringTag;function u(e,t,r){i.call(e,t)||Object.defineProperty(e,t,r)}function c(e,t){let r=e[t];return r||(r=a(t),e[t]=r),r}function a(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function f(e,t){u(e,"__esModule",{value:!0}),s&&u(e,s,{value:"Module"});let r=0;for(;rObject.getPrototypeOf(e):e=>e.__proto__,h=[null,p({}),p([]),p(p)];function d(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!h.includes(t);t=p(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),f(t,n),t}function m(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=d(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function b(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function y(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}l.i=m,l.A=function(e){return this.r(e)(m.bind(this))},l.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},l.r=function(e){return B(e,this.m).exports},l.f=function(e){function t(t){if(t=b(t),i.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=b(t),i.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let O=Symbol("turbopack queues"),g=Symbol("turbopack exports"),w=Symbol("turbopack error");function C(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}l.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:l,reject:i,promise:s}=y(),u=Object.assign(s,{[g]:r.exports,[O]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),c={get:()=>u,set(e){e!==u&&(u[g]=e)}};Object.defineProperty(r,"exports",c),Object.defineProperty(r,"namespaceObject",c),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(O in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[g]:{},[O]:e=>e(t)};return e.then(e=>{r[g]=e,C(t)},e=>{r[w]=e,C(t)}),r}}return{[g]:e,[O]:()=>{}}}),r=()=>t.map(e=>{if(e[w])throw e[w];return e[g]}),{promise:l,resolve:i}=y(),s=Object.assign(()=>i(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[O](u)),s.queueCount?l:r()},function(e){e?i(u[w]=e):l(u[g]),C(n)}),n&&-1===n.status&&(n.status=0)};let U=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}U.prototype=URL.prototype,l.U=U,l.z=function(e){throw Error("dynamic usage of require is not supported")},l.g=globalThis;let j=o.prototype;var k,_=((k=_||{})[k.Runtime=0]="Runtime",k[k.Parent=1]="Parent",k[k.Update=2]="Update",k);let v=new Map;l.M=v;let $=new Map,P=new Map;async function S(e,t,r){let n;if("string"==typeof r)return E(e,t,K(r));let o=r.included||[],l=o.map(e=>!!v.has(e)||$.get(e));if(l.length>0&&l.every(e=>e))return void await Promise.all(l);let i=r.moduleChunks||[],s=i.map(e=>P.get(e)).filter(e=>e);if(s.length>0){if(s.length===i.length)return void await Promise.all(s);let r=new Set;for(let e of i)P.has(e)||r.add(e);for(let n of r){let r=E(e,t,K(n));P.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=E(e,t,K(r.path)),i))P.has(o)||P.set(o,n)}for(let e of o)$.has(e)||$.set(e,n);await n}j.l=function(e){return S(1,this.m.id,e)};let T=Promise.resolve(void 0),A=new WeakMap;function E(t,r,n){let o=e.loadChunkCached(t,n),l=A.get(o);if(void 0===l){let e=A.set.bind(A,o,T);l=o.then(e).catch(e=>{let o;switch(t){case 0:o=`as a runtime dependency of chunk ${r}`;break;case 1:o=`from module ${r}`;break;case 2:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),A.set(o,l)}return l}function K(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}j.L=function(e){return E(1,this.m.id,e)},j.R=function(e){let t=this.r(e);return t?.default??t},j.P=function(e){return`/ROOT/${e??""}`},j.b=function(e){let t=new Blob([`self.TURBOPACK_WORKER_LOCATION = ${JSON.stringify(location.origin)};
+(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/6774f9c1f201e744.js","static/chunks/1300460219810c10.js","static/chunks/e96398764f77c728.js","static/chunks/7f9e9c54ac262de2.js"],runtimeModuleIds:[494553]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/my-custom-path/_next/",r=(self.TURBOPACK_CHUNK_SUFFIX??document?.currentScript?.getAttribute?.("src")?.replace(/^(.*(?=\?)|^.*$)/,""))||"",n=new WeakMap;function o(e,t){this.m=e,this.e=t}let l=o.prototype,i=Object.prototype.hasOwnProperty,s="u">typeof Symbol&&Symbol.toStringTag;function u(e,t,r){i.call(e,t)||Object.defineProperty(e,t,r)}function c(e,t){let r=e[t];return r||(r=a(t),e[t]=r),r}function a(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function f(e,t){u(e,"__esModule",{value:!0}),s&&u(e,s,{value:"Module"});let r=0;for(;rObject.getPrototypeOf(e):e=>e.__proto__,h=[null,p({}),p([]),p(p)];function d(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!h.includes(t);t=p(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),f(t,n),t}function m(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=d(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function b(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function y(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}l.i=m,l.A=function(e){return this.r(e)(m.bind(this))},l.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},l.r=function(e){return B(e,this.m).exports},l.f=function(e){function t(t){if(t=b(t),i.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=b(t),i.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let O=Symbol("turbopack queues"),g=Symbol("turbopack exports"),w=Symbol("turbopack error");function C(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}l.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:l,reject:i,promise:s}=y(),u=Object.assign(s,{[g]:r.exports,[O]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),c={get:()=>u,set(e){e!==u&&(u[g]=e)}};Object.defineProperty(r,"exports",c),Object.defineProperty(r,"namespaceObject",c),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(O in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[g]:{},[O]:e=>e(t)};return e.then(e=>{r[g]=e,C(t)},e=>{r[w]=e,C(t)}),r}}return{[g]:e,[O]:()=>{}}}),r=()=>t.map(e=>{if(e[w])throw e[w];return e[g]}),{promise:l,resolve:i}=y(),s=Object.assign(()=>i(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[O](u)),s.queueCount?l:r()},function(e){e?i(u[w]=e):l(u[g]),C(n)}),n&&-1===n.status&&(n.status=0)};let U=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}U.prototype=URL.prototype,l.U=U,l.z=function(e){throw Error("dynamic usage of require is not supported")},l.g=globalThis;let j=o.prototype;var k,_=((k=_||{})[k.Runtime=0]="Runtime",k[k.Parent=1]="Parent",k[k.Update=2]="Update",k);let v=new Map;l.M=v;let $=new Map,P=new Map;async function S(e,t,r){let n;if("string"==typeof r)return E(e,t,K(r));let o=r.included||[],l=o.map(e=>!!v.has(e)||$.get(e));if(l.length>0&&l.every(e=>e))return void await Promise.all(l);let i=r.moduleChunks||[],s=i.map(e=>P.get(e)).filter(e=>e);if(s.length>0){if(s.length===i.length)return void await Promise.all(s);let r=new Set;for(let e of i)P.has(e)||r.add(e);for(let n of r){let r=E(e,t,K(n));P.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=E(e,t,K(r.path)),i))P.has(o)||P.set(o,n)}for(let e of o)$.has(e)||$.set(e,n);await n}j.l=function(e){return S(1,this.m.id,e)};let T=Promise.resolve(void 0),A=new WeakMap;function E(t,r,n){let o=e.loadChunkCached(t,n),l=A.get(o);if(void 0===l){let e=A.set.bind(A,o,T);l=o.then(e).catch(e=>{let o;switch(t){case 0:o=`as a runtime dependency of chunk ${r}`;break;case 1:o=`from module ${r}`;break;case 2:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),A.set(o,l)}return l}function K(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}j.L=function(e){return E(1,this.m.id,e)},j.R=function(e){let t=this.r(e);return t?.default??t},j.P=function(e){return`/ROOT/${e??""}`},j.b=function(e){let t=new Blob([`self.TURBOPACK_WORKER_LOCATION = ${JSON.stringify(location.origin)};
self.TURBOPACK_CHUNK_SUFFIX = ${JSON.stringify(r)};
self.TURBOPACK_NEXT_CHUNK_URLS = ${JSON.stringify(e.reverse().map(K),null,2)};
importScripts(...self.TURBOPACK_NEXT_CHUNK_URLS.map(c => self.TURBOPACK_WORKER_LOCATION + c).reverse());`],{type:"text/javascript"});return URL.createObjectURL(t)};let x=/\.js(?:\?[^#]*)?(?:#.*)?$/,N=/\.css(?:\?[^#]*)?(?:#.*)?$/;function M(e){return N.test(e)}l.w=function(t,r,n){return e.loadWebAssembly(1,this.m.id,t,r,n)},l.u=function(t,r){return e.loadWebAssemblyModule(1,this.m.id,t,r)};let L={};l.c=L;let B=(e,t)=>{let r=L[e];if(r){if(r.error)throw r.error;return r}return q(e,_.Parent,t.id)};function q(e,t,r){let n=v.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let l=a(e),i=l.exports;L[e]=l;let s=new o(l,i);try{n(s,l,i)}catch(e){throw l.error=e,e}return l.namespaceObject&&l.exports!==l.namespaceObject&&d(l.exports,l.namespaceObject),l}function I(r){let n,o=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(("u">typeof TURBOPACK_NEXT_CHUNK_URLS?TURBOPACK_NEXT_CHUNK_URLS.pop():e.getAttribute("src")).replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(r[0]);return 2===r.length?n=r[1]:(n=void 0,!function(e,t,r,n){let o=1;for(;o{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},W.set(e,t)}return t}e={async registerChunk(e,t){if(H(K(e)).resolve(),null!=t){for(let e of t.otherChunks)H(K("string"==typeof e?e:e.path));if(await Promise.all(t.otherChunks.map(t=>S(0,e,t))),t.runtimeModuleIds.length>0)for(let r of t.runtimeModuleIds)!function(e,t){let r=L[t];if(r){if(r.error)throw r.error;return}q(t,_.Runtime,e)}(e,r)}},loadChunkCached:(e,t)=>(function(e,t){let r=H(t);if(r.loadingStarted)return r.promise;if(e===_.Runtime)return r.loadingStarted=!0,M(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(M(t));else if(x.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(TURBOPACK_WORKER_LOCATION+t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(M(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(x.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let l=fetch(K(r)),{instance:i}=await WebAssembly.instantiateStreaming(l,o);return i.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(K(r));return await WebAssembly.compileStreaming(o)}};let F=globalThis.TURBOPACK;globalThis.TURBOPACK={push:I},F.forEach(I)})();
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_not-found.txt b/litellm/proxy/_experimental/out/_not-found.txt
index bf012f0defc..24f3a7278c3 100644
--- a/litellm/proxy/_experimental/out/_not-found.txt
+++ b/litellm/proxy/_experimental/out/_not-found.txt
@@ -1,16 +1,16 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-5:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+5:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
6:"$Sreact.suspense"
-8:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
-c:I[168027,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true}
+8:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+a:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+c:I[168027,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true}
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
-d:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+d:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
7:null
b:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$Ld","4",{}]]
diff --git a/litellm/proxy/_experimental/out/_not-found/__next._full.txt b/litellm/proxy/_experimental/out/_not-found/__next._full.txt
index bf012f0defc..24f3a7278c3 100644
--- a/litellm/proxy/_experimental/out/_not-found/__next._full.txt
+++ b/litellm/proxy/_experimental/out/_not-found/__next._full.txt
@@ -1,16 +1,16 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-5:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+5:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
6:"$Sreact.suspense"
-8:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-a:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
-c:I[168027,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true}
+8:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+a:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+c:I[168027,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c","$undefined"],"S":true}
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
-d:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+d:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
7:null
b:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$Ld","4",{}]]
diff --git a/litellm/proxy/_experimental/out/_not-found/__next._head.txt b/litellm/proxy/_experimental/out/_not-found/__next._head.txt
index 7b7b5307806..8e05e69a023 100644
--- a/litellm/proxy/_experimental/out/_not-found/__next._head.txt
+++ b/litellm/proxy/_experimental/out/_not-found/__next._head.txt
@@ -1,6 +1,6 @@
1:"$Sreact.fragment"
-2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+2:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+3:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
-5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+5:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/_not-found/__next._index.txt b/litellm/proxy/_experimental/out/_not-found/__next._index.txt
index 6eba887c4de..4658e20bb47 100644
--- a/litellm/proxy/_experimental/out/_not-found/__next._index.txt
+++ b/litellm/proxy/_experimental/out/_not-found/__next._index.txt
@@ -1,7 +1,7 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt b/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt
index 3768b1690c1..333f77dbce8 100644
--- a/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt
+++ b/litellm/proxy/_experimental/out/_not-found/__next._not-found.__PAGE__.txt
@@ -1,5 +1,5 @@
1:"$Sreact.fragment"
-2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+2:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
3:"$Sreact.suspense"
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false}
4:null
diff --git a/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt b/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt
index cedb180a0b7..2ccccda999c 100644
--- a/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt
+++ b/litellm/proxy/_experimental/out/_not-found/__next._not-found.txt
@@ -1,4 +1,4 @@
1:"$Sreact.fragment"
-2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
+2:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+3:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/_not-found/__next._tree.txt b/litellm/proxy/_experimental/out/_not-found/__next._tree.txt
index db3cbb7a81f..ecd5c33163d 100644
--- a/litellm/proxy/_experimental/out/_not-found/__next._tree.txt
+++ b/litellm/proxy/_experimental/out/_not-found/__next._tree.txt
@@ -1,3 +1,3 @@
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
diff --git a/litellm/proxy/_experimental/out/_not-found/index.html b/litellm/proxy/_experimental/out/_not-found/index.html
index 0f45eb1aa33..b14dfa6c348 100644
--- a/litellm/proxy/_experimental/out/_not-found/index.html
+++ b/litellm/proxy/_experimental/out/_not-found/index.html
@@ -1 +1 @@
-404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
+404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/api-reference.txt b/litellm/proxy/_experimental/out/api-reference.txt
index 8f433c700dd..f659e50add4 100644
--- a/litellm/proxy/_experimental/out/api-reference.txt
+++ b/litellm/proxy/_experimental/out/api-reference.txt
@@ -1,27 +1,27 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-5:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"]
-6:I[216370,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js"],"default"]
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+5:I[92825,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"]
+6:I[216370,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","/my-custom-path/_next/static/chunks/31fef81668006b2c.js","/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/1736d3b163900b37.js"],"default"]
b:I[168027,[],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
-0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js","async":true,"nonce":"$undefined"}]],["$","$L5",null,{"Component":"$6","slots":{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@7"]}}]]}],{"children":["$L8",{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true}
-c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
-d:I[191905,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js","/litellm-asset-prefix/_next/static/chunks/4a0199c823d1ff8f.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"]
-10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+:HL["/my-custom-path/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
+0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/my-custom-path/_next/static/chunks/31fef81668006b2c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/my-custom-path/_next/static/chunks/1736d3b163900b37.js","async":true,"nonce":"$undefined"}]],["$","$L5",null,{"Component":"$6","slots":{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@7"]}}]]}],{"children":["$L8",{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true}
+c:I[347257,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
+d:I[191905,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","/my-custom-path/_next/static/chunks/31fef81668006b2c.js","/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/1736d3b163900b37.js","/my-custom-path/_next/static/chunks/4a0199c823d1ff8f.js","/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"]
+10:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
11:"$Sreact.suspense"
-13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+13:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+15:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
8:["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
-9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4a0199c823d1ff8f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}]
+9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/4a0199c823d1ff8f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}]
a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]
7:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params"
e:{}
f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params"
14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
-17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+17:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
12:null
16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]]
diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt
index 16310159df4..03fa097b254 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt
@@ -1,9 +1,9 @@
1:"$Sreact.fragment"
-2:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
-3:I[191905,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js","/litellm-asset-prefix/_next/static/chunks/4a0199c823d1ff8f.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"]
-6:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+2:I[347257,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
+3:I[191905,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","/my-custom-path/_next/static/chunks/31fef81668006b2c.js","/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/1736d3b163900b37.js","/my-custom-path/_next/static/chunks/4a0199c823d1ff8f.js","/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"]
+6:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
7:"$Sreact.suspense"
-0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4a0199c823d1ff8f.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
+0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/4a0199c823d1ff8f.js","async":true}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","async":true}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
4:{}
5:{}
8:null
diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt
index cedb180a0b7..2ccccda999c 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.api-reference.txt
@@ -1,4 +1,4 @@
1:"$Sreact.fragment"
-2:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-3:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
+2:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+3:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt
index 9e1104ae61b..8c996d75a17 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next.!KGRhc2hib2FyZCk.txt
@@ -1,7 +1,7 @@
1:"$Sreact.fragment"
-2:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"]
-3:I[216370,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js"],"default"]
-4:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-5:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js","async":true}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],"loading":null,"isPartial":false}
+2:I[92825,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"]
+3:I[216370,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","/my-custom-path/_next/static/chunks/31fef81668006b2c.js","/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/1736d3b163900b37.js"],"default"]
+4:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+5:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","async":true}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","async":true}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","async":true}],["$","script","script-3",{"src":"/my-custom-path/_next/static/chunks/31fef81668006b2c.js","async":true}],["$","script","script-4",{"src":"/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","async":true}],["$","script","script-5",{"src":"/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","async":true}],["$","script","script-6",{"src":"/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","async":true}],["$","script","script-7",{"src":"/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","async":true}],["$","script","script-8",{"src":"/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","async":true}],["$","script","script-9",{"src":"/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","async":true}],["$","script","script-10",{"src":"/my-custom-path/_next/static/chunks/1736d3b163900b37.js","async":true}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],"loading":null,"isPartial":false}
6:"$0:rsc:props:children:1:props:serverProvidedParams:params"
diff --git a/litellm/proxy/_experimental/out/api-reference/__next._full.txt b/litellm/proxy/_experimental/out/api-reference/__next._full.txt
index 8f433c700dd..f659e50add4 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next._full.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next._full.txt
@@ -1,27 +1,27 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-5:I[92825,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"]
-6:I[216370,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js"],"default"]
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+5:I[92825,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientSegmentRoot"]
+6:I[216370,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","/my-custom-path/_next/static/chunks/31fef81668006b2c.js","/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/1736d3b163900b37.js"],"default"]
b:I[168027,[],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
-0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js","async":true,"nonce":"$undefined"}]],["$","$L5",null,{"Component":"$6","slots":{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@7"]}}]]}],{"children":["$L8",{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true}
-c:I[347257,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
-d:I[191905,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","/litellm-asset-prefix/_next/static/chunks/260c6cbf0713f405.js","/litellm-asset-prefix/_next/static/chunks/8a58a9001bce1201.js","/litellm-asset-prefix/_next/static/chunks/738c339383c3b4b6.js","/litellm-asset-prefix/_next/static/chunks/31fef81668006b2c.js","/litellm-asset-prefix/_next/static/chunks/0a6c418370a8c183.js","/litellm-asset-prefix/_next/static/chunks/00ff280cdb7d7ee5.js","/litellm-asset-prefix/_next/static/chunks/53218dce8acb3bff.js","/litellm-asset-prefix/_next/static/chunks/eea976cf4a05fc92.js","/litellm-asset-prefix/_next/static/chunks/f1575239d7b0b673.js","/litellm-asset-prefix/_next/static/chunks/ad426ab08aee6c64.js","/litellm-asset-prefix/_next/static/chunks/1736d3b163900b37.js","/litellm-asset-prefix/_next/static/chunks/4a0199c823d1ff8f.js","/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"]
-10:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+:HL["/my-custom-path/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
+0:{"P":null,"b":"U_YrOOnSehrpkdU42KJ-W","c":["","api-reference"],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/my-custom-path/_next/static/chunks/31fef81668006b2c.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/my-custom-path/_next/static/chunks/1736d3b163900b37.js","async":true,"nonce":"$undefined"}]],["$","$L5",null,{"Component":"$6","slots":{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@7"]}}]]}],{"children":["$L8",{"children":["$L9",{},null,false,false]},null,false,false]},null,false,false]},null,false,false],"$La",false]],"m":"$undefined","G":["$b",[]],"S":true}
+c:I[347257,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ClientPageRoot"]
+d:I[191905,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","/my-custom-path/_next/static/chunks/260c6cbf0713f405.js","/my-custom-path/_next/static/chunks/8a58a9001bce1201.js","/my-custom-path/_next/static/chunks/738c339383c3b4b6.js","/my-custom-path/_next/static/chunks/31fef81668006b2c.js","/my-custom-path/_next/static/chunks/0a6c418370a8c183.js","/my-custom-path/_next/static/chunks/00ff280cdb7d7ee5.js","/my-custom-path/_next/static/chunks/53218dce8acb3bff.js","/my-custom-path/_next/static/chunks/eea976cf4a05fc92.js","/my-custom-path/_next/static/chunks/f1575239d7b0b673.js","/my-custom-path/_next/static/chunks/ad426ab08aee6c64.js","/my-custom-path/_next/static/chunks/1736d3b163900b37.js","/my-custom-path/_next/static/chunks/4a0199c823d1ff8f.js","/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js"],"default"]
+10:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"OutletBoundary"]
11:"$Sreact.suspense"
-13:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-15:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+13:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+15:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
8:["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
-9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/4a0199c823d1ff8f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}]
+9:["$","$1","c",{"children":[["$","$Lc",null,{"Component":"$d","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@e","$@f"]}}],[["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/4a0199c823d1ff8f.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/7e417dd24c8becd0.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/my-custom-path/_next/static/chunks/6c4c97f1ea6e7d77.js","async":true,"nonce":"$undefined"}]],["$","$L10",null,{"children":["$","$11",null,{"name":"Next.MetadataOutlet","children":"$@12"}]}]]}]
a:["$","$1","h",{"children":[null,["$","$L13",null,{"children":"$L14"}],["$","div",null,{"hidden":true,"children":["$","$L15",null,{"children":["$","$11",null,{"name":"Next.Metadata","children":"$L16"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]
7:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params"
e:{}
f:"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params"
14:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
-17:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+17:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
12:null
16:[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L17","4",{}]]
diff --git a/litellm/proxy/_experimental/out/api-reference/__next._head.txt b/litellm/proxy/_experimental/out/api-reference/__next._head.txt
index c38954c59a7..a56d6459359 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next._head.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next._head.txt
@@ -1,6 +1,6 @@
1:"$Sreact.fragment"
-2:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
-3:I[897367,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
+2:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"ViewportBoundary"]
+3:I[897367,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"MetadataBoundary"]
4:"$Sreact.suspense"
-5:I[27201,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
+5:I[27201,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"IconMark"]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.1d32c690.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"./favicon.ico"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/api-reference/__next._index.txt b/litellm/proxy/_experimental/out/api-reference/__next._index.txt
index 6eba887c4de..4658e20bb47 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next._index.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next._index.txt
@@ -1,7 +1,7 @@
1:"$Sreact.fragment"
-2:I[71195,["/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
-3:I[339756,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-4:I[837457,["/litellm-asset-prefix/_next/static/chunks/d96012bcfc98706a.js","/litellm-asset-prefix/_next/static/chunks/dbca964212122d58.js"],"default"]
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/26adfa4e8ffc85c7.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/e8ed72789c2b42ff.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
+2:I[71195,["/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js"],"default"]
+3:I[339756,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+4:I[837457,["/my-custom-path/_next/static/chunks/d96012bcfc98706a.js","/my-custom-path/_next/static/chunks/dbca964212122d58.js"],"default"]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","precedence":"next"}],["$","script","script-0",{"src":"/my-custom-path/_next/static/chunks/26adfa4e8ffc85c7.js","async":true}],["$","script","script-1",{"src":"/my-custom-path/_next/static/chunks/e8ed72789c2b42ff.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"loading":null,"isPartial":false}
diff --git a/litellm/proxy/_experimental/out/api-reference/__next._tree.txt b/litellm/proxy/_experimental/out/api-reference/__next._tree.txt
index 6295ab284f6..0ff0dbc8f5c 100644
--- a/litellm/proxy/_experimental/out/api-reference/__next._tree.txt
+++ b/litellm/proxy/_experimental/out/api-reference/__next._tree.txt
@@ -1,4 +1,4 @@
-:HL["/litellm-asset-prefix/_next/static/chunks/4e20891f2fd03463.css","style"]
-:HL["/litellm-asset-prefix/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
-:HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
+:HL["/my-custom-path/_next/static/chunks/4e20891f2fd03463.css","style"]
+:HL["/my-custom-path/_next/static/chunks/6fabf2cec1bd2d6e.css","style"]
+:HL["/my-custom-path/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
0:{"buildId":"U_YrOOnSehrpkdU42KJ-W","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"(dashboard)","paramType":null,"paramKey":"(dashboard)","hasRuntimePrefetch":false,"slots":{"children":{"name":"api-reference","paramType":null,"paramKey":"api-reference","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
diff --git a/litellm/proxy/_experimental/out/api-reference/index.html b/litellm/proxy/_experimental/out/api-reference/index.html
index 37ea612f814..1ff56c553e5 100644
--- a/litellm/proxy/_experimental/out/api-reference/index.html
+++ b/litellm/proxy/_experimental/out/api-reference/index.html
@@ -1 +1 @@
-LiteLLM DashboardLoading...
\ No newline at end of file
+LiteLLM DashboardLoading...
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/assets/logos/aws.svg b/litellm/proxy/_experimental/out/assets/logos/aws.svg
index 53896fa05f4..bb8cbc1d39a 100644
--- a/litellm/proxy/_experimental/out/assets/logos/aws.svg
+++ b/litellm/proxy/_experimental/out/assets/logos/aws.svg
@@ -1,34 +1,34 @@
-
-
-
+
+
+
diff --git a/litellm/proxy/_experimental/out/assets/logos/cerebras.svg b/litellm/proxy/_experimental/out/assets/logos/cerebras.svg
index 426f6430c23..1ff347220c5 100644
--- a/litellm/proxy/_experimental/out/assets/logos/cerebras.svg
+++ b/litellm/proxy/_experimental/out/assets/logos/cerebras.svg
@@ -1,89 +1,89 @@
-
-
-
+
+
+
diff --git a/litellm/proxy/_experimental/out/assets/logos/deepseek.svg b/litellm/proxy/_experimental/out/assets/logos/deepseek.svg
index c4754047da2..61760f13190 100644
--- a/litellm/proxy/_experimental/out/assets/logos/deepseek.svg
+++ b/litellm/proxy/_experimental/out/assets/logos/deepseek.svg
@@ -1,25 +1,25 @@
-
-
-
+
+
+
diff --git a/litellm/proxy/_experimental/out/assets/logos/perplexity-ai.svg b/litellm/proxy/_experimental/out/assets/logos/perplexity-ai.svg
index e828b6dfbf1..e3a32be9809 100644
--- a/litellm/proxy/_experimental/out/assets/logos/perplexity-ai.svg
+++ b/litellm/proxy/_experimental/out/assets/logos/perplexity-ai.svg
@@ -1,16 +1,16 @@
-
-
-